• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

How to upgrade php from 4.3 to 5.2 on Plesk

N

nickgetzen

Guest
I am running Plesk version 8.2 all current and am trying to upgrade my php to version 5.2. I have had a friend attemp it once and it somehow uninstalled Plesk and really killed me as my system was down for two days trying to reinstall everything.

Anything that can help would be greatly appreciated.

I must get this right this time.

Thanks,

Nick G
 
That is so useful to know! I have just tried this and it worked beautifully! The only problem I've run into is that the version of PHP it has installed (5.2.3) is configured '--without-pear' - How do I go about changing this?
 
Update:
I used the atomic 'yum install pear-php' command over SSH to install Pear, but it's still not working.

I've done a little digging in google, and tried changing the include_path variable in /etc/php.ini.

Running the command 'pear config-show' tells me that PEAR directory (php_dir) is '/usr/share/pear' so I added this to the include_path variable in PHP.ini, but when I restart apache, it's still not working.

This must be because of the '--without-pear' configure command, but I've no idea how to change this - anyone?

Thanks in advance.
 
PEAR works fine with ART's packages, if you've installed the php-pear package. It says '--whitout-pear' because PEAR was built separately.

To be able to actually use PEAR under Plesk I believe you may want to include /usr/share/pear to your include_path (can be done globally through /etc/php.ini or in a vhost.conf) and open_basedir (you have to override the open_basedir setting through a vhost.conf file).
 
Hi Breun,

Thanks for the help, I have moved the php.ini.rpmnew file and renamed it php.ini in /etc. Once moved, I double checked the settings for error reporting in php.ini, and also the include path which now reads:

include_path = "/php/includes:/usr/share/pear"

However, when I restart apache, it's still giving me the error:

Warning: include() [function.include]: Failed opening 'PEAR.php' for inclusion (include_path='/php/includes:/usr/share/pear') in /var/www/vhosts/.......

Unfortunately, I've not used PEAR before, but the client demands it for their hosting... is there another way I can check to see if the PEAR classes are working other than including the name of one of them in the php file like:

PHP:
include("PEAR.php");
PEAR::setErrorHandling(PEAR_ERROR_DIE);

One last thing - I originally ran the
yum update php -y
suggested by Highland. Ever since, the '--without-pear' configuration command has been present. Is this because I did not run the 'yum update php-pear' command instead?
 
Forget about that '--without-pear' switch. Do you have the php-pear package installed? And does its version correspond with your php package version? Does /usr/share/pear/PEAR.php actually exist?

Note: the client could also just download the PEAR modules he needs and upload them to his webspace. In this way he can manage what is available himself and use the versions and packages he wants. I'd add '.' to the include_path.
 
yum info php-pear produces:

Reading repository metadata in from local files
Installed Packages
Name : php-pear
Arch : noarch
Version: 1.5.0
Release: 5.fc4.art
Size : 2.1 M
Repo : installed
Summary: PHP Extension and Application Repository framework

Description:
PEAR is a framework and distribution system for reusable PHP
components. This package contains the basic PEAR components.


Available Packages
Name : php-pear
Arch : i386
Version: 5.0.4
Release: 10.5
Size : 371 k
Repo : updates-released
Summary: PHP Extension and Application Repository Components
Description:
PEAR is a framework and distribution system for reusable PHP
components. This package contains a set of PHP components from the
PEAR repository.

Running yum info php produces:


Reading repository metadata in from local files
Installed Packages
Name : php
Arch : i386
Version: 5.2.3
Release: 4.fc4.art
Size : 9.6 M
Repo : installed
Summary: The PHP HTML-embedded scripting language

Description:
PHP is an........etc

PEAR.php does exist in /usr/share/pear/.

Adding '.' to the include path has no effect unfortunately. include path now reads:
include_path = ".:/php/includes.:/usr/share/pear"
 
Just check the output of rpm -q php-pear, checking what yum has available does't tell you what you have installed.

And that include_path is not correct. It should read something like:

Code:
include_path = ".:/php/includes:/usr/share/pear"

I assume you created /php/includes yourself, as that is not a common entry.
 
Ok, the output is:

php-pear-1.5.0-5.fc4.art

I changed the iNCLUDE_PATH variable to your suggestion and it's not happening. The other path in the variable was already in the php.ini when I upgraded via yum.
 
Ok, so you got the right php-pear package installed.

If the dir /php/includes doesn't actually exist then you might as well remove it from your include_path.

What is the error message you're getting now when trying to include PEAR.php?

P.S. Fedora Core 4 is no longer maintained by the Fedora Project (for a while now) and I believe ART has also dropped support for FC4.
 
OK. I have removed the unnecessary included directory, and restarted apache.

The errors I get are:

Warning: include(PEAR.php) [function.include]: failed to open stream: No such file or directory in /var/www/vhosts/jongibbard.co.uk/httpdocs/peartest.php on line 3

Warning: include() [function.include]: Failed opening 'PEAR.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/vhosts/jongibbard.co.uk/httpdocs/peartest.php on line 3

Fatal error: Class 'PEAR' not found in /var/www/vhosts/jongibbard.co.uk/httpdocs/peartest.php on line 4

This is produced from the following code:

PHP:
<?php
include("PEAR.php");
PEAR::setErrorHandling(PEAR_ERROR_DIE);
?>

The file does exist in /usr/share/pear/PEAR.php
 
I have been attempting to run this update, i do the first step is is the wget command and all seems to work, but when i do the second command the yum upadte line it goes through processing dependencies and then says
--> Running transaction check
--> Processing Dependency: php-common = 5.2.3-2.el4.art for package: php-xml
--> Processing Dependency: php-common = 5.2.3-1.el4.art for package: php-pdo
--> Finished Dependency Resolution
Error: Missing Dependency: php-common = 5.2.3-2.el4.art is needed by package php-xml
Error: Missing Dependency: php-common = 5.2.3-1.el4.art is needed by package php-pdo


and quits? What am i doing wrong?

Thanks.

Nick
 
Yes:


[root@plesk nickgetzen]# rpm -qa | grep php5
php5sb-5.2.1-10swsoft
php5-ioncube-php52-4.0-rhas4.07041615
 
ANY idea if that is what is causing the php5 upgrade error message posted earlier?
 
Back
Top