简体   繁体   中英

Wamp Server 2.2 not working after enabling a PHP Extension

I've been working on Wamp Server 2.2 . Everything is ok but when I tried to enable a PHP Extension from the icon tray then Apache won't work anymore. Unless I re-install it then it will work. But I need to enable some PHP Extensions like curl and postgre pdo for my project.

I also tried manually editing the php.ini to enable php extensions, still wamp server apache won't work. Any ideas?

Just enabling a php extension from wamp does not work sometimes because if there is no extension for that module in the php's extension folder then wamp will either stop working or might give out some windows pop up error message when you start wamp. So please check if those modules exists in the extension directory of your php's root folder.

I hope this helps you.

WAMPServer has more than one php.ini file and it is easy for beginners to get confused.

The safest way to edit the Correct php.ini file is to use the wampmanager.exe menu links

left click wampmanager -> PHP -> php.ini

This will edit the \\wamp\\bin\\apache\\apache{version}\\bin\\php.ini file, which is the correct one for effecting php changes for the PHP used on your web site.

The menu links should also work to activate/deactivate PHP extensions as follows :-

wampmanager -> PHP -> PHP Extensions -> click an extension

If the extension has a TICK then it is activated, if not then it is not activated. Each time you click on an extensions name, it will restart Apache to action the activation or deactivation of that extension, so give it a few seconds to complete this restart before checking it worked.

There is also a php.ini file in the \\wamp\\bin\\php\\php{version} folder, however this file is only used by the PHP CLI ( Command Line Interface ) so if you chnage this it will have no effect on the php used by Apache.

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