Wampserver 3.0.0 - how to add latest php7?
Posted by: enorog (---.dynamic.t-2.net)
Date: November 29, 2015 02:14PM

Hi,

I'm trying to add the latest php7 (7.0.0RC8) to the new Wampserver 3.0.0. I see in Otomatic's footer that he is running that combination. Otomatic - could you share your settings to make this work? I know there will eventually be an installer, but just basic instructions would be really handy for the mean time.

I tried following this tutorial - [blog.saiashirwad.com] - but even after setting everything up the new version is not showing in the system tray popup menu for php versions. I'm guessing it's because of changes in Wampserver 3.0.0?

Thank you!

Options: ReplyQuote
Re: Wampserver 3.0.0 - how to add latest php7?
Posted by: Otomatic (Moderator)
Date: November 29, 2015 03:05PM

Hi,

There will be an "add on" Wampserver 3.0.0 PHP 7.0.0, but only when PHP 7.0.0 will be officially released.

For PHP 7, Apache does not load does not load php5apache2_4.dll but php7apache2_4.dll, so wampserver.conf in php7 folder must be :
<?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
//and php7_module, not php5_module
$phpConf['apache']['2.4']['LoadModuleName'] = 'php7_module';
$phpConf['apache']['2.4']['LoadModuleFile'] = 'php7apache2_4.dll';
$phpConf['apache']['2.4']['AddModule'] =  '';

?>

Note : Wampserver 3.0.0 is ready to support PHP 7.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 11/29/2015 05:44PM by Otomatic.

Options: ReplyQuote
Re: Wampserver 3.0.0 - how to add latest php7?
Posted by: enorog (---.dynamic.t-2.net)
Date: November 29, 2015 03:26PM

Thank you, that helped.
Just a note - you said to put it in "wampmanager.conf" but it's really "wampserver.conf". Just a typo, but wanted to warn anyone following these instructions.

Options: ReplyQuote
Re: Wampserver 3.0.0 - how to add latest php7?
Posted by: Otomatic (Moderator)
Date: November 29, 2015 04:23PM

Hi,

Yes, it was a typo, it is wamp/bin/php/php7.0.0rc8/wampserver.conf.
So I will not speak of this point in the procedure which can only function with WampServer 3.0.0.

It is absolutely imperative to download archives Thread Safe and never NTS archives.
http://windows.php.net/downloads/qa/php-7.0.0RC8-Win32-VC14-x86.zip

I done and I write this procedure in real time.
WARNING: my installation is in J:\wamp and to avoid nonsense, I will not change it in this procedure. So, for you, modify according to your installation.

- Create a folder J:/wamp/bin/php/php7.0.0rc8/
- Unzip archive downloaded into this folder.
- Put the file wampserver.conf (as in previous message) in this folder.
- Copy the file php.ini-development with the new name php.ini
- Edit the file php.ini
- Replace
max_execution_time = 30
by
max_execution_time = 120
- Replace
; max_input_vars = 1000
by
max_input_vars = 2500
- Replace
;error_log = php_errors.log
by
error_log = J:/wamp/logs/php_error.log
- Replace
auto_globals_jit = On
by
auto_globals_jit = Off
- Replace
; extension_dir = "ext"
by
extension_dir = "J:/Wamp/bin/php/php7.0.0rc8/ext/"
- Replace
;upload_tmp_dir =
by
upload_tmp_dir = "J:/wamp/tmp"

To simplify, replace all the block between
; Be sure to appropriately set the extension_dir directive.
and
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
by
; Be sure to appropriately set the extension_dir directive.
;
extension=php_bz2.dll
extension=php_curl.dll
;extension=php_com_dotnet.dll
;extension=php_enchant.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll      ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_odbc.dll
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_phpdbg_webhelper.dll
;extension=php_shmop.dll

; The MIBS data available in the PHP distribution must be installed.
; See [www.php.net]
;extension=php_snmp.dll

extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite3.dll
;extension=php_sysvshm.dll
;extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
- Replace
;date.timezone =
by
date.timezone = UTC
or your own, for example date.timezone = Europe/Paris
- Replace
;sendmail_from = me@example.com
by
sendmail_from = valid@email-address
- Replace
;session.save_path = "/tmp"
by
session.save_path = "J:/wamp/tmp"
- Replace
soap.wsdl_cache_dir="/tmp"
by
soap.wsdl_cache_dir="J:/wamp/tmp"
- Save the file modified.
- Copy this modified php.ini file under the name phpForApache.ini (Respect the case)

You may add at the beginning of the php.ini file (not into phpForApache.ini)
[PHP]
; **************************************************************
; ****** DO NOT EDIT THIS FILE **** DO NOT EDIT THIS FILE ******
; * This file is only use by PHP CLI (Command Line Interface)  *
; * that is to say by Wampserver internal PHP scripts          *
; * THE CORRECT FILE TO EDIT is Wampmanager Icon->PHP->php.ini *
; * that is wamp/bin/apache/apache2.x.y/bin/php.ini            *
; **************************************************************


Launch Wampserver.
Switch PHP version :
- Wampmanager Icon -> PHP -> Version -> 7.0.0rc8

I just do exactly this and Wampserver returns green after switching to PHP 7.0.0rc8.
It's going a hundred times faster to do than write.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Wampserver 3.0.0 - how to add latest php7?
Posted by: enorog (---.dynamic.t-2.net)
Date: November 29, 2015 06:29PM

Thank you Otomatic, it's working great. Really appreciate it. Vive la France! smiling smiley

Options: ReplyQuote
Re: Wampserver 3.0.0 - how to add latest php7?
Posted by: Otomatic (Moderator)
Date: November 29, 2015 06:51PM



---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.