PHP extensions not loading in phpinfo

So, I run MAMP on Mountain Lion, and I installed gmagick and imagick using pecl, both are relase candidates (mainly because gmagick does not have a stable version, and imagick 3.0.0 does not install, this gives a make error). The modules appear when I run php -i in the terminal, but not in phpinfo (), I checked php.ini, this is the same for both, so this is not a problem. However, I installed bitet (which is a stable release) and appears in phpinfo () and php -i. So my question is, does PHP have any configuration option that doesn't load extensions if they are unstable? Btw, I restarted my server after changes to the ini file.

+6
source share
4 answers

You will now probably have two php installations on your computer. Mountain Lion comes with a pre-installed php version. Try locate php.ini in the terminal to find out how many php.inis is installed.

The phpinfo () page also indicates which php.ini is being used. You might want to open the exact php.ini that is used for your phpinfo () and make sure the sizes are loaded. There should be two lines, such as extension=/path/to/gemagicext/gmagic.so extension=/path/to/imagick/imagick.so

+6
source

I had a similar problem with php-fpm and nginx server. The problem was that the updated php configuration was not reflected in the current active php-fpm workflows. I need to manually kill the fpm process and restart it again to update the extension information.

The steps that worked for me:

1) Look for the active php-fpm process

  ps ax | grep "fpm" 

This will mainly result in multiple processes being displayed.

2) manual destruction process

 kill -9 [pid_got_from_previous_command] 

3) restart php-fpm process

 sudo service php5-fpm start 

Note. Trying to do something like sudo service php-fpm reload or sudo service php-fpm restart did not work, as the old child processes kept the previous configuration. Killing active processes and restarting php fpm, which updated phpinfo for me.

+4
source

I had the same issue CentOS 6.6 x64, php 5.5.27 and I followed the steps from http://php.net/manual/en/imagick.installation.php

First of all, download the ImageMagick tar image from here: sourceforge.net/projects/imagemagick/files/

Unzip it, and then from the terminal, run the following commands:

 1. "cd ImageMagick-6.9.1-10" - go where you placed the folder 2. ./configure 3. make 4. make install 5. make check 6. install imagick extension from pecl.php.net/package/imagick/download 3.1.2 7. cd imagick-3.1.2 8. phpize 9. ./configure --with-imagick=/opt/local 10. make 11. make install 12. Copy imagick.so in your PHP extensions folder and add extension=imagick.so in php.ini 

Restart apache: httpd restart service

+2
source

I am sure this problem is related to your extension and PHP server support. I encountered such problems when I created my own extensions. Your extension must be compatible with your PHP server in three main attributes:

1- The Zend API number that your PHP server is configured with (in phpinfo () you can find this number), this number should match your extension header during build.

2- The compiler version on your PHP server and your extension should be the same.

3 Thread safety on your PHP server is important. If you use a stream-safe server, then your extension must be built using a php-stream library, and if you use a secure server other than a stream server, you must build the extension using the PHP-nts library.

0
source

All Articles