[nycphp-talk] PHP segmentation fault with custom-compiled binaries - Zen Cart
Jayesh Sheth
jayeshsh at ceruleansky.com
Sun Feb 13 15:06:18 EST 2005
Hi Hans,
thanks for your reply.
>>Does it seem to be a problem with MySQL ?
>>
>>
>
>Seems like it might be. From looking at the ./configure you used at http://www.moztips.com/php5_install/ you didn't specify any mysql options. Depending on the version of MySQL being used, try adding:
>
>--with-mysql=/usr
>
>or
>
>--with-mysqli=/usr/bin/mysql_config
>
>
I did change the page moztips.com/php5_install from what I originally
did, since it also serves as a guide for other people. Originally, I
tried compiling PHP 5 by linking it against the system MySQL libraries -
by using --with-mysql=/usr. But for some reason, that was not working.
The configure script would produce an error when I tried that. I
downloaded PHP 4.3.10, and could build it using its built-in MySQL
client libraries. But PHP 5 does not come with MySQL client libraries.
So I downloaded the MySQL source and compiled just the client libraries
( --without-server ) locally. Then I tried compiling PHP 5 against those
libraries. This got past configure, make and make install. But when any
PHP script encountered a mysql_fetch_row function (or something
similar), the PHP binary segfaulted. I boiled it down to a testcase, and
reproduced this.
So my last hope (I think), is to build PHP 5 against a MySQL shared
object library ( libmysqlclient.so ). But when I tried doing this on
Dreamhost (Debian Stable, shared hosting), it would not output the
shared object files, even after 'make install'. I tried doing the same
thing on my SuSe box (dedicated server, root access) and it worked fine.
So my question is: can I build a MySQL shared object library on one
system, then copy that to Dreamhost, and then build PHP 5 against this
shared object using something like:
--with-mysql=shared,/home/myusername/shared_so
?
Do I need to build the shared object on a Debian system if it is going
to be copied to a Debian system ? Do shared object work just like dlls
on Windows - i.e. they can be copied from system to system and just
"swapped in"?
Thanks in advance for any help.
Best Regards,
- Jay
More information about the talk
mailing list