Running PHP6 in WAMP
by Jeremy on Feb.07, 2007, under Uncategorized
I’ve been wanting to start using PHP6 snapshots as part of my development process to ensure that my work (especially the Engine) is forward-compatible with the changes being made across the PHP Core. So, I set out on a little endeavor to make the PHP6 snapshots work in WAMP.
First, you’re going to need the latest version of WAMP. So, go to the site using the link above and grab the download. Now, my change is based on the PHP 4.4.4 Add-On (also, don’t install this Add-On if you want the switch to work properly), so it’s pretty simple to do.
Go grab the latest Win32 6.0-dev Snapshot from snaps.php.net. You’re going to need to extract this into your wamp directory as “php6″ so that you’ve got <path_to_wamp>\php6\php6apache2.dll … Now, copy the php.ini-dist file into <path_to_wamp>\Apache2\bin\ and rename it to php6.ini. You’re also going to want to open this file and change your extension_dir to <path_to_wamp>/php6/ext/ …
Now, save this file into your <path_to_wamp>\scripts\ directory as switch.php … You may have to modify this file to change the line:
$mphp6 = “php5_module”;
to
$mphp6 = “php6_module”;
This tripped me up last night, because php6apache2.dll was still registering as php5_module as of last night’s snapshot. I poked the internals mailing list and found this out from Antony Dovgal, who also said that this should be fixed in the next snapshot. I haven’t tested this to see if it has been fixed yet, though.
Anyway, after you’re done with all of the above, fire up WAMP and then open the command line. cd to <path_to_wamp>\scripts\ and then php switch.php (assuming you’ve got a path to a PHP binary in your system path — if not, you’ll need to use <path_to_wamp>\php\php.exe switch.php). This should shutdown Apache and swap out the PHP5 data for your PHP6 data. After it’s complete, and Apache restarts, check your phpinfo() and you should see PHP 6.0.0-dev.
And that’s all there is to it.
June 30th, 2007 on 9:55 pm
Hi,
After follow Jeremy’s tutor “Running PHP6 in WAMP”, I’ve got a little problem as follows:
Please wait while stopping Apache service…
Switching from PHP5 to PHP6…
‘mysqli’ not found in config file
Please wait while restarting Apache service…
fichier httpd.conf non trouve
Then, after that I couldn’t start wampserver no more
Have any idea what causes it and the solution for it?
Thanks in advance