| View previous topic :: View next topic |
| Author |
Message |
dorbar
Joined: 16 Mar 2009
Posts: 3
|
| Posted: Mon Mar 16, 2009 3:31 pm Post subject: Upgrading PHP from 5.1.x to 5.2.9 |
|
|
I too looked through the entire forum and I didn't found any clever solution. So I tried the following solution and work perfectly for me.
Here it is; How to upgrade PHP 5.1.x to the latest PHP 5.2.9
Befor continuing STOP the Apache service!!!
1.) Download an adequate PHP: php-5.2.9-1-win32-installer.msi
2.) Rename your old C:\apache2triad\php folder to C:\apache2triad\php-old
in case you screw something.
3.) Install the downloaded MSI. I checked all options (for complete installation) and when asked I chose Apache2.2. Oh yes installation should be in the C:\apache2triad\php folder
4.) Now you have a brand new php 5.2.9
5.) Changing Apache configuration; go in C:\apache2triad\conf folder and open httpd.conf file. Find a #php config section (around line 1076) and change the paths accordingly. Note that a new PHP doesn't have a bin folder anymore and that a exe is located in the root of php folder. Also note, that you have to coment out the line LoadFile php\bin\ntwdblib.dll
5.a) Oh, forgot to say!! Restart your WinXP
6.) That's it. It worked for me! :wink: |
|
| Back to top |
|
gray_bale
Joined: 30 Sep 2007
Posts: 16
|
| Posted: Mon Mar 30, 2009 8:33 pm Post subject: |
|
|
Any chance of listing your httpd.conf - #php config - paths
I just cannot get mine to work. |
|
| Back to top |
|
dorbar
Joined: 16 Mar 2009
Posts: 3
|
| Posted: Mon Mar 30, 2009 10:24 pm Post subject: |
|
|
Look in the attached file.
Cheers, D. |
|
| Back to top |
|
gray_bale
Joined: 30 Sep 2007
Posts: 16
|
| Posted: Tue Mar 31, 2009 5:42 am Post subject: |
|
|
Many thanks for that.
I have directories PEAR and SMARTY in my old PHP directory. Do I just copy them over. Do I also have to keep any of the other files/directories. |
|
| Back to top |
|
dorbar
Joined: 16 Mar 2009
Posts: 3
|
| Posted: Tue Mar 31, 2009 10:28 am Post subject: |
|
|
Basically,... I not sure! I mostly develop/work on Joomla and Magento stuff and this procedure was successful for me. I don't know for you because I don't know what libraries you are using. But as far as I can see the PHP engine is working fine and there are no problems.
You might be confused in A2T control panel because there is still and old version shown. That's because it's hard coded in html. Beside this no problema at all.
Well try it. You still have your old folder and old files don't you!? |
|
| Back to top |
|
sunbeam
Joined: 16 Oct 2007
Posts: 9
|
| Posted: Tue Mar 31, 2009 12:04 pm Post subject: |
|
|
| worked fine here :) thank you so much |
|
| Back to top |
|
gray_bale
Joined: 30 Sep 2007
Posts: 16
|
| Posted: Tue Mar 31, 2009 9:07 pm Post subject: |
|
|
Does not work for me.
After using the php installer, it all seemed to install OK.
I modified the httpd.conf and then restarted XP
None of my websites work (via virtualhosts), just blank web pages on my browser, and with no error messages.
But in trying to 'stop' Apache it said that Apache was not running ??
I noticed a new php.ini is in the new php directory, and my original php.ini is still in the windows directory. Do I have to delete the original php.ini
Or any other ideas, please. |
|
| Back to top |
|
sunbeam
Joined: 16 Oct 2007
Posts: 9
|
| Posted: Tue Mar 31, 2009 9:57 pm Post subject: |
|
|
here is what i did:
1. stopped the apache2triad service
2. renamed the php directory inside apache2triad directory to php-old
3. installed the php package normally (selected apache 2.2 webserver and complete installation)
4. after install, i opened the httpd.conf file, located in D:\apache2triad\conf (d:\ is my installtion drive of apache2triad and also php) and changed the last block of infomation from
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
ScriptAlias /php/ "D:/apache2triad/php/"
Action application/x-httpd-php "D:/apache2triad/php/php-cgi.exe"
PHPIniDir "D:/apache2triad/php/"
LoadModule php5_module "D:/apache2triad/php/php5apache2_2.dll"
PHPIniDir "D:/apache2triad/php/"
LoadModule php5_module "D:/apache2triad/php/php5apache2.dll"
PHPIniDir "D:/apache2triad/php/"
LoadModule php5_module "D:/apache2triad/php/php5apache.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
to
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "D:/Apache2triad/php/"
LoadModule php5_module "D:/Apache2triad/php/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
finally, a few lines up, there is another block of settings, that i changed.
from:
#php config
LoadFile php\bin\php5ts.dll
LoadFile php\bin\fdftk.dll
LoadFile d:/apache2triad/mysql/bin/libmysql.dll
LoadModule php5_module modules/mod_php.so
<IfModule mod_php5.c>
LoadFile php\bin\ntwdblib.dll
AddHandler php5-script .php
AddHandler php5-script .inc
AddType application/x-httpd-php .php
AddType application/x-httpd-php .inc
AddType application/x-httpd-php-source .phps
</IfModule>
#uncoment below and comment #LoadModule php5_module to enable php as cgi
##ScriptAlias /php/ "d:/apache2triad/php/bin/"
##Action application/x-httpd-php "/php/php-cgi.exe"
#AddType application/x-httpd-php .php
#AddHandler application/x-httpd-php .php
to:
#php config
LoadFile php\php5ts.dll
LoadFile php\fdftk.dll
LoadFile D:/apache2triad/mysql/bin/libmysql.dll
#LoadModule php5_module modules/mod_php.so
<IfModule mod_php5.c>
#LoadFile php\bin\ntwdblib.dll-----------------------
AddHandler php5-script .php
AddHandler php5-script .inc
AddType application/x-httpd-php .php
AddType application/x-httpd-php .inc
AddType application/x-httpd-php-source .phps
</IfModule>
#uncoment below and comment #LoadModule php5_module to enable php as cgi
##ScriptAlias /php/ "D:/apache2triad/php/"
##Action application/x-httpd-php "/php/php-cgi.exe"
#AddType application/x-httpd-php .php
#AddHandler application/x-httpd-php .php
started the apache2triad service, and everything worked fine
sorry to say that, but if you take a look in your event viewer, you will see the errors, reported by apache2triad service, and you will be able to fix them :) |
|
| Back to top |
|
gray_bale
Joined: 30 Sep 2007
Posts: 16
|
| Posted: Wed Apr 01, 2009 6:49 am Post subject: |
|
|
Sorry to be so stupid but which apache2triad service event viewer. Any idea on the file name.
As I have a few error log files, but none seem to give any info.
I will have another go later on today. |
|
| Back to top |
|
sunbeam
Joined: 16 Oct 2007
Posts: 9
|
| Posted: Wed Apr 01, 2009 8:40 am Post subject: |
|
|
nobody said u r stupid, dude. take it easy.
the apache2triad service can be found in your control panel -> administrative tools -> services.
the event viewer can be found in your control panel -> administrative tools -> event viewer. there you should look at the Application log to determine what eror the apache2triad service gives you |
|
| Back to top |
|
gray_bale
Joined: 30 Sep 2007
Posts: 16
|
| Posted: Wed Apr 01, 2009 1:00 pm Post subject: |
|
|
Right I now am getting some where, not sure where thou.
Event Viewer says ---
The Apache service named Apache2Triad Apache2 Service reported the following error:
>>> httpd.exe: Syntax error on line 1160 of C:/apache2triad/conf/httpd.conf: Cannot load php\\bin\\php5ts.dll into server: The specified module could not be found.
Any ideas |
|
| Back to top |
|
sunbeam
Joined: 16 Oct 2007
Posts: 9
|
| Posted: Wed Apr 01, 2009 1:16 pm Post subject: |
|
|
if you are getting this message, then you didn't do the editing of the httpd.conf right
i posted the 2 sections that you have to change a few post above. check again please, im sure you will get it to work :)
ps: please change the path of the sections !!! i have my installation under d:\ change it according to your installation |
|
| Back to top |
|
gray_bale
Joined: 30 Sep 2007
Posts: 16
|
| Posted: Wed Apr 01, 2009 3:34 pm Post subject: |
|
|
I am now installing php5.2.9installer.msi.
error message - a script could not be accessed (via Microsoft XP event viewer - Product: PHP 5.2.9-1 -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action configApache script error -2146828218, Microsoft VBScript runtime error: Permission denied Line 63, Column 5, ).
Re run php5.2.9installer.msi and do a repair.
Completed OK
Change httpd.conf re #php config.
Cannot however change ScriptAlias, PHPIniDir , LoadModule as the 8 lines do not appear in my httpd.conf
I have
Line 517
#ScriptAlias /cgi-bin/ "C:/apache2triad/htdocs/cgi-bin/"
Line 1173
#ScriptAlias /php/ "C:/apache2triad/php/bin/"
Anyhow saved httpd.conf and restarted XP.
Browser displays all html pages but only lists the text of any php page (not the actual page).
Any help or guidance, as I am getting closer.
Just a quick addition to this message.
Just added below the #php config code the following
PHPIniDir "D:/Apache2triad/php/"
LoadModule php5_module "D:/Apache2triad/php/php5apache2_2.dll"
All works OK now.
Many thanks too all |
|
| Back to top |
|
sunbeam
Joined: 16 Oct 2007
Posts: 9
|
| Posted: Wed Apr 01, 2009 5:14 pm Post subject: |
|
|
very nice, 2 thumbs up !!!
try to write your php code with
Code: <?php
?> and not with Code:
<?
?>
worked for me :) |
|
| Back to top |
|
gray_bale
Joined: 30 Sep 2007
Posts: 16
|
| Posted: Wed Apr 01, 2009 6:31 pm Post subject: |
|
|
What makes you say "try to write your php code with ...."
Have I done something wrong again ??? |
|
| Back to top |
|
| |