简体   繁体   中英

PHP scws extention is not loaded by MAMP

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM