Page 1 of 1

PHP on linux can't find mysql/gd/curl .so files

Posted: Mon Jan 14, 2008 5:35 pm
by vigge89
I've been trying to set up a old computer as a server running linux (ubuntu 7.10-server to be specific) and have successfully installed apache, mysql, openssh, proftpd and samba. I have, however, run into a problem with php as it complains about missing .so files for mysql, gd2 and curl. I've downloaded and installed (./configure, make && make install) gd2 and curl along with a binary release of mysql 5, but can't find any .so-files anywhere?

PHP (5.2.5) has been configured with the following:

Code: Select all

./configure --with-apxs2=/usr/local/apache/bin/apxs --with-libxml-dir --with-curl --with-gd --enable-gd-native-ttf --with-gettext --with-mysql=/usr/local/mysql --enable-mbstring
Locations of the different packages:
Apache (2.2.6): /usr/local/apache
MySQL (5.0.45-linux-i686-glibc23): /usr/local/mysql
curl (7.17.1): default
gd (2.0.35): default

Error log for apache when starting up:

Code: Select all

PHP Warning:  PHP Startup: Unable to load dynamic library './php_curl.so' - ./php_curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library './php_gd2.so' - ./php_gd2.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library './php_mysql.so' - ./php_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Tue Jan 15 00:13:15 2008] [notice] Apache/2.2.6 (Unix) PHP/5.2.5 configured -- resuming normal operations
 
php.ini excerpt:

Code: Select all

;include_path = ".:/php/includes"
 
doc_root =
user_dir =
 
extension_dir = "./"
 
extension=php_curl.so
extension=php_gd2.so
extension=php_mysql.so
 
 
Am I missing something simple here?
Cheers

Re: PHP on linux can't find mysql/gd/curl .so files

Posted: Mon Jan 14, 2008 6:15 pm
by VladSun
I don't think you should load them by using php.ini. I suppose they are already loadded, according to your ./configure options.
Comment out these "extension" lines and restart Apache. Then try to use mysql from a PHP script...

Re: PHP on linux can't find mysql/gd/curl .so files

Posted: Tue Jan 15, 2008 4:40 pm
by vigge89
Commenting them out again removed the errors, I haven't been able to test the availability for those extensions yet though.
Onto something related: how does one acquire .so-files for these extensions so that building PHP with them isn't required? I think I've read about it but can't recall from where, if it's even possible.

Thanks by the way ;)

Re: PHP on linux can't find mysql/gd/curl .so files

Posted: Tue Jan 15, 2008 5:24 pm
by Zoxive
vigge89 wrote:Commenting them out again removed the errors, I haven't been able to test the availability for those extensions yet though.

Code: Select all

phpinfo();
??

Re: PHP on linux can't find mysql/gd/curl .so files

Posted: Wed Jan 16, 2008 12:45 am
by vigge89
I was thinking of some more practical testing, already done a phpinfo() and all of the extensions shows up as enabled :)
Sorry, wasn't clear enough ;)

Re: PHP on linux can't find mysql/gd/curl .so files

Posted: Wed Jan 16, 2008 11:18 am
by vigge89
Yep, phpmyadmin up and running - thanks :)