Upgrade PHP 4.x to 5.x issues

rszkutak

Verified User
Joined
Dec 22, 2003
Messages
176
Location
Scottsdale, AZ & Clam Gulch, AK
I guess i just can't follow directions and or think outside of the box, so that said I'm having issues upgrading my PHP from version 4 to version 5. I have been following the guide (http://help.directadmin.com/item.php?id=135) and ran into a snag, being cautious I stopped right where I am as to not screw anything up too badly where it cannot be undone.

Below is a copy / paste from the SSH session logged in as root into the server. Can you tell me what is going on here, and or how I can correct this issue and upgrade to the newer version of PHP?


[root@dfw1 ~]# cd ..
[root@dfw1 /]# cd ..
[root@dfw1 /]# cd /usr/local/directadmin/customapache
[root@dfw1 customapache]# wget http://files.directadmin.com/services/customapache/php-5.2.4.tar.gz
--11:42:00-- http://files.directadmin.com/services/customapache/php-5.2.4.tar.gz
=> `php-5.2.4.tar.gz.1'
Resolving files.directadmin.com... 72.35.85.222
Connecting to files.directadmin.com|72.35.85.222|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9,705,468 (9.3M) [application/x-gzip]

100%[====================================>] 9,705,468 867.91K/s ETA 00:00

11:42:11 (856.42 KB/s) - `php-5.2.4.tar.gz.1' saved [9705468/9705468]

[root@dfw1 customapache]#
[root@dfw1 customapache]# nano build
[root@dfw1 customapache]# ./build clean
All clean!
[root@dfw1 customapache]# ./build php n
*** Cannot find /usr/local/directadmin/customapache/php-unrnt.tar.gz. Aborting ***
[root@dfw1 customapache]# ./build clean
All clean!
[root@dfw1 customapache]# ./build php_ap2 n
*** Cannot find /usr/local/directadmin/customapache/php-unrnt.tar.gz. Aborting ***
 
Hi there, if you look at the error, the system is trying to build off of /usr/local/directadmin/customapache/php-unrnt.tar.gz.

When really it should be looking for /usr/local/directadmin/customapache/php-5.2.4.tar.gz

This article should help you out nicel: http://www.directadmin.com/forum/archive/index.php/t-13424.html

It did for me...pay close attention to PERL script line.
perl -pi -e 's/PHP_VER=4.4.2/PHP_VER=5.1.4/' build

Replace the PHP Versions with the versions you are trying to build...in this case 5.2.4.

In your actual directions you have been following, make sure you did and read this step:
2) change your build script for the new version:
nano build

change: PHP_VER=4.4.4
to: PHP_VER=5.2.4
 
Last edited:
thank you, looks like that did it on that end... guess i wasn't paying very close attention, but then again i'm a windows systems enginner and i'm a little outside comfort zone in *nix.

I have one more erorr, perhaps you can assist with (or someone else for that fact). I have a client installing Megento on the DA box through installatron and they are getting an error, but i don't know where to modify this line or add it.



php-pdo-mysql-version-minimum v1 (detected: OFF)

CAUSE
Magento requires the PDO_MYSQL PHP extension, which is not standard on all hosting control panels.
SOLUTION
Add the PHP_MYSQL extension to PHP, or disable Magento in Installatron Admin > Applications > Catalogs.


--------------------------------------------------------------------------------




So that said, how and where do i edit this file?

Add the PHP_MYSQL extension to PHP
 
Hmm..when you compile PHP via Custombuild it should take care of installing all of the proper extensions into the PHP.INI file. I don't think you are particularly missing the PHP_MYSQL extension...

But you may want to read this: http://dev.mysql.com/tech-resources/articles/mysql-pdo.html

This may help...as for PHP, you'd have to recompile and include this extension when you recompile PHP.

Also, you can see what extension(s) you are running database specific by accessing PHPMyAdmin on your server and logging into a DB. (at least that is how I've done it in the past)

EDIT: There is a link within the Admin Console at the User Level, OR I think the link looks like http:<IP>/phpmyadmin
 
Last edited:
Try using custombuild rather then customapache....

It will be seemless for you if you do, it works very well.

First set the preferred PHP version in the config file of custom build.

You can see this thread for the commands you will need to run.

http://www.directadmin.com/forum/showthread.php?t=29824

In your first post and link the first step is to use custom build as the preferred method... and a link to this page for instructions as well. http://files.directadmin.com/services/custombuild/1.1/
 
Last edited:
Back
Top