the new php add on is 5.3.1 needs 5.33
Posted by: kaizerking (117.195.191.---)
Date: April 14, 2013 09:08AM

The Php add on is limited to 5.3.1.
Drupal 8 requires minimum Php version 5.3.3 ,and Drupal has issues on Php 5.4 version,so cannot be used
could please also provide 5.3.3 add on Plz

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: RiggsFolly (---.as13285.net)
Date: April 14, 2013 02:32PM

There seems to be no intention to provide php addons, but I have a tutorial you can follow if you feel up to it.


Before you start

On Apache and PHP you will see the acronym VC6 and VC9. This denotes the compiler version used to compile that program or dll. It stands for Visual C V6 or Visual C V9.
Unfortunately you cannot mix the two when it comes to Apache and PHP.
So first you must find out which compiler was used to compile the Apache you are currently using, so you can get the PHP that was compiled with the same version of the compiler.

The way PHP and Apache interact in the default WAMPServer install is that Apache launches the PHP Interpereter as a dll (php5apachex_y.dll) as this is a very close relationship i.e. not communication via a TCP port like PHP and MySQL, so they both have to have been compiled using the same version of Microsoft Visual C Compiler.


1. From WampManager "Stop All Services".

2. Download the PHP Release you want to install from www.php.net/download
You should use the Thread Safe build.
Make sure its built with the same compiler versions as you Apache ( VC6 or VC9 )

3. Create a new folder under c:\wamp\bin\php\ with the name = the version you are installing
So make a folder called php5.5.11 for example.

4. Now from the folder containing your most recent ( and working ) verions of PHP copy the file called wampserver.conf and paste it into your new PHP folder created in the previous setp.
This file is required by wamp server to properly identify that this is a valid PHP version folder.
The file contains references to the names of the dll files that contain the PHP interpreter, so that the correct file can be copied to the Apache folder when you activate this new version of the PHP interpreter.

5. Now unzip the downloaded PHP into your new folder, make sure the folder hierarchy looks like this.


6. Now in your new folder copy the file php.ini_development into a new file called php.ini

Do the same again but paste into a file called phpForApache.ini
You should now have the original file called php.ini_development PLUS 2 more, one called php.ini and one called phpForApache.ini

The php.ini file is used if you are using the PHP CLI i.e. running php from the command line > php script.php
The phpForApache.ini is the php config used by Apache. This file is copied into the currently active Apache's folder and renamed to php.ini by WAMPmaneger when you activate this version of PHP.

It should look something like this:


7. We must now make some change to the php.ini files to WAMPise them.
Edit the newly created phpForApache.ini file

Search for extension_dir and change to
extension_dir = "d:/wamp/bin/php/phpx.y.z/ext/" <- where x,y,z match the folder you are putting the new PHP into.

Search for ;error_log = php_errors.log and change to
error_log = c:\wamp\logs\php_errors.log
Search for anything 'php/' and make sure you change it to you c:\wamp\bin\php\php.x.y.z folder name.

As of PHP5.4 the timezone need to be set
Search for [Date] and put an entry into the date.timezone field as a minimum

date.timezone = "Europe/London"
date.default_latitude = 0.0
date.default_longitude = 51.502973

look here for a list of supported timezone values [www.php.net]

Now there may well be other configuration changes you had made to your existing PHP, these you will have to find and transfer yourself.
I suggest you compare your last phpForApache.ini with this new one and move over anything you believe is relevant.



8. Make sure all services are stopped in wampmanager, and then right click over the wamp manager icon in the system tray and select the 'refresh' menu item.
When you left click on wamp manager -> PHP -> Version you should see your new version in the list.

If the new version does not appear, then you have probably spelt the pgpForApache.ini file name wrong. Correct it and redo the 'refresh'.

9. You can now 'restart all services' from the wamp manager menus.

NOTE: You have not actually changed anything yet, so if wamp,Apache,PHP etc were working before they still should be.

10. Activate your new PHP version.
Using the wamp manager menus again you just need to click on the new version number to activate it.
wamp manager -> PHP -> Version -> 5.5.11 ( <- or whatever the version number is you have just added )

This will cause wamp manager to stop Apache ( the icon will go Orange )
Copy the correct files from the PHP folder to the Apache folder
php5apachex_y.dll, the php interpreter dll used by Apache
phpForApache.ini the php config file
etc

And then restart Apache. So the wamp manager icon should go GREEN again.

If the wamp manager icon stays ORANGE, then you have missed something, probably a file name spelt wrong. The phpForApache.ini file must exists.

11. Now run localhost from the wamp manager menu, and check the wamp server home page. It should tell you which version of PHP is loaded.




TROUBLE SHOOTING
If it all goes wrong when you activate the new PHP, you can easily back out of trouble by just activating whatever version of PHP you were using before, and then going back to see what you did wrong.


ADDING IONCUBE

You must ensure that you download the correct version to match your PHP :-
compiler( VC6 or VC9 ) compiled ionCube dll
correct 32 or 64 bit code
and the Thread Safe version which is the one that is not NON-TS


1. Download the correct ionCube loader from [www.ioncube.com]
2. Place it somewhere on your disk, but not in the WAMP folder.
for example c:\webstuff\ioncube\vc9\
2. Edit the new php.ini Using the wamp manager menus
Add these 2 lines at the bottom of the file.
Remeber the version you load will depend upon which MAJOR version of PHP you are using i.e. 5.2,5.3 or 5.4

;ioncube Extension
zend_extension = "c:/webstuff/ioncube/vc9/ioncube_loader_win_5.3.dll"



ADDING XDEBUG
XDEBUG comes with WAMP Server and is incredibly useful for debugging CLI or WEB scripts.
But it does not come with the PHP you have downloaded from the PHP website.
When upgrading PHP to a major version release you may need to get an up to date version of xdebug from
http://xdebug.org/download.php
For a minor version upgrade you can probably use the existing xdebug version you already have on disk.

So for a minor PHP version upgrade, copy the folder c:\wamp\bin\php\php5.y.z\zend_ext from your old PHP to your new php folder.
For a major PHP version upgrade get a new dll from the xdebug website and put it in a newly created folder called c:\wamp\bin\php\php5.y.z\zend_ext

Now add a line like this ( version specific of course ) to your php.ini ( using the wamp manager menus, to ensure you are editing the correct file )

;XDEBUG Extension
zend_extension = "d:/wamp/bin/php/phpx.y.z/zend_ext/php_xdebug-2.2.2-5.3-vc9.dll"

[xdebug]
xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "d:/wamp/tmp"

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: kaizerking (117.195.179.---)
Date: April 17, 2013 01:59PM

Hi Thanks it is really nice tutorial,

I got the php version number in the list but the indicator remains orange


1.Php 5.3.24 latest old stable version is only on VC9 though it is said in the website that 5.3+ are available in both VC6 and VC9 compiled, it is not clear whether the download link downloads BOTH VC6 abd VC9 complied .and since there are no separate links for them I assumed the downloaded package includes(works) for both.

2. The apache or for that matter the downloads provided here on wampserver doesnt indicate which version of VC is used to compile, i.e if i download add on Apache 2.2.9 it is not indicated on the download page

3.Should we also do the same on phpForApache which we did on php.ini ?

4 'Search for anything 'php/' and make sure you change it to you c:\wamp\bin\php\php.x.y.z folder name. " I have following :
1.
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
where as there is no include folder in the php directory what should we do?

mainly the problem is the VC version what is provided here to download and the php provided on php.net
please can you clarify



Edited 1 time(s). Last edit at 04/17/2013 02:02PM by kaizerking.

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: RiggsFolly (---.as13285.net)
Date: April 17, 2013 02:49PM

1. No the download only has ONE version. See 2. You have to get the correct mix and I know its not always that obvious, however I dont work for or with alterway so I too have the same problem making sure I download the correct versions.

2. This is all they provide.
WARNING : All the components of the v2.2 WampServer stack have been compiled with VC9 version of Microsoft compiler.
Earlier versions of Wampserver have been made with VC6 version of Microsoft compiler.
So, You can't mix components of 2.2 stack with previous version of Wampserver Stack components.
If you do it you will get an instable Wampserver.


3.
No wamp copies the apache/php.ini back over the php/pgpForApache.ini file when you switch php versions.
Maintain the php.ini file using the wamp manager menu system and you should not go wrong, dont edit php.ini files manually you will probably get the wrong one, there are a few and they have different purposes.

4. If they are commented out ( winking smiley you can ignore them.

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: kaizerking (117.213.213.---)
Date: April 17, 2013 03:00PM

wamserver "DOWNLOAD WAMPSERVER (32 BITS & PHP 5.3) 2.2E" has VC10 dependency . this is another confusion, do they always work for VC9? I mean higher VC version compiled packages work for lower version redists?

I have installed the package mentioned here and followed the procedure mentioned here to add 5.3.24
I am getting the version in the list when i clcik on restart all services the indicator turns orange and never goes to green, if i try refresh the i get out bound index (0)

i do not have this file in my php folder :"php5apachex_y.dll, the php interpreter dll used by Apache

to which folder of apache we should copy these files?

what should i do now?



Edited 2 time(s). Last edit at 04/17/2013 03:28PM by kaizerking.

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: RiggsFolly (---.as13285.net)
Date: April 17, 2013 03:23PM

Yea this is also confusing

Visual C++ 2010 SP1 Redistributable Package is the Visual C++ Version 9 compiler redist runtimes

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: kaizerking (117.213.213.---)
Date: April 17, 2013 03:34PM

i do not have this file in my php folder :"php5apachex_y.dll, the php interpreter dll used by Apache

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: kaizerking (117.213.213.---)
Date: April 17, 2013 03:34PM

i do not have this file in my php folder :"php5apachex_y.dll, the php interpreter dll used by Apache

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: RiggsFolly (---.as13285.net)
Date: April 17, 2013 04:24PM

Where I use x or y or z they are placeholders, you are supposed to replace those values with whatever version of ?? you are using.

So look for something like php5apache2_2.dll if you want php5 to run in apache 2.2
or php5apache2_4.dll if you want to run php5 in apache 2.4

So what you are doing is loading the php interpreter version into apache

Options: ReplyQuote
Re: the new php add on is 5.3.1 needs 5.33
Posted by: kaizerking (117.195.182.---)
Date: April 17, 2013 06:01PM

The php packages downloaded from here [windows.php.net] works fine
just need to copy the three files from your working php directory and change the extension directory path in both .ini files it works fine no need to copy again to apache folder
php.ini,
phpForApache.ini
wmaserver.config



Edited 2 time(s). Last edit at 04/17/2013 06:43PM by kaizerking.

Options: ReplyQuote


Sorry, only registered users may post in this forum.