php-gd installed but gd not showing up in phpinfo on CentOS 5.3 server running nginx
How are you running PHP? If you're running it in FCGI mode with an external spawner, restarting nginx will have no effect on the PHP server, so you'll need to restart that separately.
Related videos on Youtube
Neil Sarkar
Updated on September 17, 2022Comments
-
Neil Sarkar over 1 year
Logged in as root, I installed the php-gd libraries using
$ yum install php-gd
it said everything worked fine, so i did
$ /etc/init.d/nginx restart
But the code I had been working on still complained of not having the gd libraries and when I went to check the output of
phpinfo
there was no 'gd' section.I should note that
yum list | grep gd
showsgd.i386 2.0.33-9.4.el5_1.1 installed gd-devel.i386 2.0.33-9.4.el5_1.1 installed gdb.i386 6.8-27.el5 installed gdbm.i386 1.8.0-26.2.1 installed php-gd.i386 5.1.6-23.2.el5_3 installed
I also added
extension=gd.so
manually to/etc/php.ini
and it is still not showing up or raising an error which leads me to believe my php.ini is not being re-parsed when I restart nginx. Is there something outside of restarting nginx I have to do to get php.ini changes loaded?I have a fair amount (like 3 years) of ad-hoc server administration experience although no formal training, but I'm relatively new to nginx and have never worked with CentOS before, so any help would be much appreciated.
-
Neil Sarkar over 14 yearsnevermind I found the script in /etc/init.d/fcgi-php thanks for all your help!
-
Neil Sarkar over 14 yearsFirst, check to make sure there is a gd.so line in your php.ini, then you need to restart whatever process is executing the php. Chances are you are using a standard LAMP system so that would mean restarting apache. To see if fcgi is running, issue a
ps aux | grep cgi
and see if there are matching enries