Thursday, July 9, 2009

Php-gd installed but not working in CentOS 5?

I keep getting this error when doing php -v, pls help as I also cannot see my gd info in phpinfo. I saw somewhere that I might need to recomplie php with gd option but will that affect my current php settings? Do I need to backup php.ini before doing recomplie, pls kindly list the steps. Much appreciated. :)





[root@server ~]# php -v


PHP Warning: PHP Startup: gd: Unable to initialize module


Module compiled with module API=20050922, debug=0, thread-safety=0


PHP compiled with module API=20060613, debug=0, thread-safety=0


These options need to match


in Unknown on line 0


PHP 5.2.3 (cli) (built: Jul 2 2007 15:08:13)


Copyright (c) 1997-2007 The PHP Group


Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Php-gd installed but not working in CentOS 5?
Try running this in a .php file to see if the gd is loading properly.





This should dump the gd variables.





%26lt;?php


var_dump(gd_info());


?%26gt;





You could also check to see if the gd extension is uncommented in the php.ini file





;comments in php.ini are semicolon





It's extension=php_gd2.dll for php5





If you need to recompile just save php.ini (if you've made changes like virtualhosts or basic settings)





hope that helps


No comments:

Post a Comment