Unable to load dynamic library '/usr/lib/php4/20020429/gd.so

If none of the more specific forums is the right place to ask

Unable to load dynamic library '/usr/lib/php4/20020429/gd.so

Postby claw » 2005-10-20 13:04

Hi everyone,

My first post here. Normally I can nut these problems out by myself but this one has me completely stumped. I have a Debian Sarge LAMP server and when I set it all up I installed php4-gd so that I could get GD support for PHP. Unfortunately I've never been able to get it to work and when I look in ...

/var/log/apache/error.log

I get the following error message which is probably the reason the GD support for PHP is not working ...

"PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/20020429/gd.so' - libXpm.so.4: cannot open shared object file: No such file or directory in Unknown on line 0"

I'm not gifted enough to do anything fancy with my Debian server and religously rely on apt-get to install all that I need. I've Googled the error above until the cows come home but have not been able to find out why the error is generated and how I get rid of it so that the gd.so module loads.

Can anyone shed any light on this error message and perhaps point me in the direction of a solution?

Many thanks

Craig
claw
 
Posts: 1
Joined: 2005-10-20 02:18

Postby anon » 2005-10-20 20:36

What package contains the file: http://packages/debian.org/ (search content) says/usr/lib/php4/20020429/gd.so is in php4-gd and libXpm.so.4 is in libxpm4 (usr/X11R6/lib/libXpm.so.4) and libxpm4-dbg (usr/X11R6/lib/debug/libXpm.so.4).
Does a clean run of apt-get update produce any errors (not fully installed packages etc) Can you find the files on your hd, if not I'd assume a media error an apt-get install --reinstall php4-gd will reinstall the package but before doing that i would force an fsck ie shutdown -hF 0
anon
 

Postby Guest » 2005-10-20 21:56

I've done and apt-get update and apt-get upgrade with no errors being reported. I've checked that I have the packages php4-gd and libxpm4 listed in a dpkg --list and they appear to be installed with no problems. I've checked that the files libXpm.so.4 (in /usr/X11R6/lib/libXpm.so.4) and gd.so (in /usr/lib/php4/20020429) exist. I've done a shutdown -hF 0 and then ran apt-get install --reinstall php4-gd but I still have the same error message appearing and no GD support for PHP.

Anything else I can check? This server is really an out of the box Debian Sarge installation and I haven't done any customisations or anything.

Many thanks

Craig
Guest
 

Postby Jeroen » 2005-10-24 19:08

add a proper line to /etc/php4/apache/php.ini, like extension=gd.so. Due to a bug, you'll need to enable php modules yourself in some (but not all) cases. Restart apache afterwards.
Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
 
Posts: 571
Joined: 2004-04-06 18:19
Location: Utrecht, NL

Postby Guest » 2005-10-26 00:40

I've checked the php.ini file and there is a line that says ...

extension=gd.so

I deleted the line and added it again and then restarted Apache but I still get the same error message.

I'm really baffled with this one.

Thanks

Craig
Guest
 

Postby Jeroen » 2005-10-26 00:44

Are you sure you're looking at the correct php.ini file? Try to introduce an intentional syntax error in it, and see if your apache indeed fails to start then due to it (or at least the php engine of it). Or maybe the gd.so cannot be found after all because of API version mismatch (shouldn't happen unless you've got multiple different sources in your apt sources.list and have php4 from say woody and php4-gd from sarge).

Also check your logfiles (apache error log, for example).
Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
 
Posts: 571
Joined: 2004-04-06 18:19
Location: Utrecht, NL


Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable