I am using ubuntu 11.04 and when I am opening terminal and typing php -a
it is showing some error like this
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/gd.so' - /usr/lib/php5/20090626/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
I think there is some problem with GD library.Is there any option to solve it?
Probably something like
should do it, if not try
For me the solution was:
Which returned the location of all the libraries that my php5 install was having trouble finding:
I was a little worried that these look they might be old versions, but I used their paths anyway. Stefgosselin identified the location of the ini files,
/etc/php5/conf.d/
. I modified them all. The command below will modify all of the*.ini
files there, so make sure all of yours really need modifying. Obviously you need to use the target path you discovered with the locate command in place of mine,/usr/lib/php5/20090626+lfs/
:Before finding this solution I tried several
apt-get purge
andapt-get reinstall
commands without luck. I'm not sure, but my problem may have originated with installation of zend from source or phpmyadmin with aptitude. It never caused any php errors, just the annoying warning you mentioned. Finally php5 can launch without errors:php5 --version
gives ...
Yeah. Just try:
You probably will have to remove the offending line in your php.ini, either in php.ini or in /etc/php5/conf.d/gd.ini maybe.