Using PHP 7 with WAMP

My OS is Windows 10 Pro x64, and I installed the VC14 x86 and x64 packages.

I added the php7.0.0 directory to wamp/bin/php , copied the php.ini , phpForApache.ini and wampserver.conf , and also changed the php directories and extensions in these files.

There is my wampserver.conf :

 <?php $phpConf['phpIniDir'] = '.'; $phpConf['phpExeDir'] = '.'; $phpConf['phpConfFile'] = 'php.ini'; //PHP 7 needs Apache 2.4.x and doesn't works with Apache 2.2.x $phpConf['apache']['2.4']['LoadModuleName'] = 'php7_module'; $phpConf['apache']['2.4']['LoadModuleFile'] = 'php7apache2_4.dll'; $phpConf['apache']['2.4']['AddModule'] = ''; ?> 

It reads WAMP correctly, because when I select the php7.0.0 version, Apache httpd.conf gets this line:

 LoadModule php7_module "c:/wamp/bin/php/php7.0.0/php7apache2_4.dll" 

The path is correct and the dll file exists, but the Apache service does not start, and if I check the Apache extensions, then php7_module is indicated as not found (red square).

If I check the apache error log, the only one reported is

[Tue Dec 08 11: 02: 14.021018 2015] [core: warn] [pid 5008: tid 516] AH00098: pid file C: /wamp/bin/apache/apache2.4.9/logs/httpd.pid overwritten - - Fuzzy shutdown of previous Apache ?

Does anyone who successfully runs PHP 7 on a WAMP server know to fix this problem? Thanks.

+8
php apache php-7 wampserver
source share
3 answers

There's an answer:

I worked with the latest official wampserver, which seems to be incompatible with php7 (I did several tests on 4 computers with the same result from my problem).

One of my colleagues provided me with this link: http://forum.wampserver.com/read.php?1,126455 with some tutorials to upgrade wampserver to unofficial new versions. Following these instructions, I updated the wamp / scripts and wamp / lang folders. After that, apache usually starts using php 7.

PS: these are apparently some bugs with php certains functions. Another fix is ​​to update some other wampserver files, details are in the link. But at the moment I do not have such errors.

Thanks to all the people who come to this page and help me.

I hope in the future some other developers will find answers here.

+4
source share

In windows click on wamp php version, then select your version enter image description here

+5
source share

I am just fixing the same error before. All links are on the wampserver forum in French, perhaps the same links can be found in English.

First follow all the steps described here (omatomatic answer, it works great for me with php7.0.0 release): http://forum.wampserver.com/read.php?1,133587,133587#msg-133618

take care of updating the version of your Wamperver server by following these steps: (if you do not run wampserver 3.0) http://forum.wampserver.com/read.php?1,126455

Remember to install all the packages in step 20 (both x86 and x64) in the wampserver forum. CONSEILS DE DEPANNAGE Section: forum.wampserver.com/read.php?1,88043

After that, some symbolic links may be missing in php7 dll. Thus, you should add some lines to wamp / scripts / config.inc.php (see otomati # msg-135093 in the first link): forum.wampserver.com/read.php?1,133587,133587#msg-133618

I hope this can help you.

0
source share

All Articles