0
votes

I have a problem about loading extension of PHP in MAMP:

I have compiled and installed scws.so (PHP extension for Chinese words segmentation) into folder '/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions' together with other extensions like pgsql.so, etc.

Also, I've updated the php.ini under '/Applications/MAMP/bin/php/php5.3.6' by adding 'extension=scws.so'.

If I issue command '/Applications/MAMP/bin/php/php5.3.6/bin/php -m' in console, I can see 'scws' is in the output list. But it has not been loaded after starting MAMP, also, I can not see 'scws' is listed with function phpinfo().

Could anyone help me about how to force the load of the new PHP extension? Why it is listed by 'php -m', but actually not loaded by MAMP?

Thanks in advance!

1

1 Answers

0
votes

The configuration for PHP called from web server is different from command line php. In phpinfo() check the path to the php.ini file that is being used and make sure that it is the same file that you edited to add the extensions.