Hello, I am having major problems getting php-gd working properly in my LAMP environment. I am running 64 bit CentOS and PHP 5.2.6. I am trying to get gd working with PHP. Here are my currently installed packages related to gd: rpm -qa | grep gd gdb-6.5-25.el5_1.1 gdbm-1.8.0-26.2.1 php-gd-5.1.6-20.el5 gd-2.0.33-9.4.el5_1.1 sysklogd-1.4.1-40.el5 gd-2.0.33-9.4.el5_1.1 I have copied the gd.so from /usr/lib64/php/modules to the "extension location" specified in my php.ini and I have enabled the gd extension. But when I restart apache I get this error in the error log: PHP Warning: PHP Startup: gd: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to ma tch\n in Unknown on line 0 And when I look at phpinfo(), gd does not show up. Any suggestions I have run out of ideas! Thanks
The APIs are mismatching meaning there are two types of gd extensions. It happened to me but with some other extension. It means that when php was compiled the gd at that time was well... at their current version, but now since you rpm'ed a new gd version the mismatch continues. Note, I haven't fixed my issue but you can probably recompile php again (P.S the flags are in phpinfo() ) so it can use the newest gd devel files.
Thanks for the feedback. Does this seem strange to you: rpm -qa | grep php php-cli-5.1.6-20.el5 php-5.1.6-20.el5 php-common-5.1.6-20.el5 php-devel-5.1.6-20.el5 But I am running PHP 5.2.6 (php -v and phpinfo() confirm..
Yea... that is strange, I know this is a silly question but did you updated the sources (yum update && yum upgrade ?) Well, maybe the system came with 5.1.6 and the install you did placed it in a different system folder/etc etc. It's really hard to tell what's wrong, sorry. I can only make assumptions, you better start looking