Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Upgrading PHP from 5.1.x to 5.2.9
Google
Post new topic Reply to topic
Author Message
dorbar
 
 


Joined: 16 Mar 2009
Posts: 3

PostPosted: Mon Mar 16, 2009 3:31 pm Reply with quoteBack to top

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


Last edited by dorbar on Mon Mar 30, 2009 10:25 pm; edited 1 time in total
View user's profileSend private message
gray_bale
 
 


Joined: 30 Sep 2007
Posts: 16

PostPosted: Mon Mar 30, 2009 8:33 pm Reply with quoteBack to top

Any chance of listing your httpd.conf - #php config - paths

I just cannot get mine to work.
View user's profileSend private message
dorbar
 
 


Joined: 16 Mar 2009
Posts: 3

PostPosted: Mon Mar 30, 2009 10:24 pm Reply with quoteBack to top

Look in the attached file.

Cheers, D.
View user's profileSend private message
gray_bale
 
 


Joined: 30 Sep 2007
Posts: 16

PostPosted: Tue Mar 31, 2009 5:42 am Reply with quoteBack to top

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.
View user's profileSend private message
dorbar
 
 


Joined: 16 Mar 2009
Posts: 3

PostPosted: Tue Mar 31, 2009 10:28 am Reply with quoteBack to top

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!?
View user's profileSend private message
sunbeam
 
 


Joined: 16 Oct 2007
Posts: 9

PostPosted: Tue Mar 31, 2009 12:04 pm Reply with quoteBack to top

worked fine here Smile thank you so much
View user's profileSend private message
gray_bale
 
 


Joined: 30 Sep 2007
Posts: 16

PostPosted: Tue Mar 31, 2009 9:07 pm Reply with quoteBack to top

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.
View user's profileSend private message
sunbeam
 
 


Joined: 16 Oct 2007
Posts: 9

PostPosted: Tue Mar 31, 2009 9:57 pm Reply with quoteBack to top

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 Smile
View user's profileSend private message
gray_bale
 
 


Joined: 30 Sep 2007
Posts: 16

PostPosted: Wed Apr 01, 2009 6:49 am Reply with quoteBack to top

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.
View user's profileSend private message
sunbeam
 
 


Joined: 16 Oct 2007
Posts: 9

PostPosted: Wed Apr 01, 2009 8:40 am Reply with quoteBack to top

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
View user's profileSend private message
gray_bale
 
 


Joined: 30 Sep 2007
Posts: 16

PostPosted: Wed Apr 01, 2009 1:00 pm Reply with quoteBack to top

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
View user's profileSend private message
sunbeam
 
 


Joined: 16 Oct 2007
Posts: 9

PostPosted: Wed Apr 01, 2009 1:16 pm Reply with quoteBack to top

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 Smile

ps: please change the path of the sections !!! i have my installation under d:\ change it according to your installation
View user's profileSend private message
gray_bale
 
 


Joined: 30 Sep 2007
Posts: 16

PostPosted: Wed Apr 01, 2009 3:34 pm Reply with quoteBack to top

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
View user's profileSend private message
sunbeam
 
 


Joined: 16 Oct 2007
Posts: 9

PostPosted: Wed Apr 01, 2009 5:14 pm Reply with quoteBack to top

very nice, 2 thumbs up !!!

try to write your php code with
Code:
<?php

?>
and not with
Code:

<?

?>


worked for me Smile
View user's profileSend private message
gray_bale
 
 


Joined: 30 Sep 2007
Posts: 16

PostPosted: Wed Apr 01, 2009 6:31 pm Reply with quoteBack to top

What makes you say "try to write your php code with ...."

Have I done something wrong again ???
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT