Difference between revisions of "PHP"

From Atomicorp Wiki
Jump to: navigation, search
m
Line 7: Line 7:
  
 
Step 2) Upgrade to php5.2.x
 
Step 2) Upgrade to php5.2.x
  yum install php-pear
+
  yum update
  
 
Step 3) Replace the PHP 4 ini with PHP 5.2.x's (if applicable)
 
Step 3) Replace the PHP 4 ini with PHP 5.2.x's (if applicable)
Line 17: Line 17:
 
'''Checklist'''
 
'''Checklist'''
  
1) Source code  installations of extensions, like Ioncube loader, or other extensions that have to be updated
+
1) Source code  installations of extensions, like Ioncube loader, or other extensions that have to be updated. Ive created php-ioncube-loader, php-zend-optimizer, and php-eaccelerator packages to fix this for you automatically.
  
 
2) php.ini settings, like memory_limit
 
2) php.ini settings, like memory_limit
  
3) execstack -c on any extensions that claim to need an executible stack (ASL users only)
+
3) execstack -c on any extensions that claim to need an executible stack (ASL users only).
 +
 
  
  

Revision as of 14:22, 1 December 2007

PHP 5.2.x installation

To upgrade to PHP 5.2.x on CentOS/RHEL/Fedora:

Step 1) Set up the atomic channel:

wget -q -O - http://www.atomicorp.com/installers/atomic.sh |sh

Step 2) Upgrade to php5.2.x

yum update

Step 3) Replace the PHP 4 ini with PHP 5.2.x's (if applicable)

mv /etc/php.ini.rpmnew /etc/php.ini

Step 4) Replace the php.conf with the PHP 5.2 php.conf (if applicable)

 mv /etc/httpd/conf.d/php.conf.rpmnew /etc/httpd/conf.d/php.conf

Checklist

1) Source code installations of extensions, like Ioncube loader, or other extensions that have to be updated. Ive created php-ioncube-loader, php-zend-optimizer, and php-eaccelerator packages to fix this for you automatically.

2) php.ini settings, like memory_limit

3) execstack -c on any extensions that claim to need an executible stack (ASL users only).



Known Issues

1) VPS and RHEL users, If you dont use the atomic installer, you're going to miss some dependencies, like sqlite3. Have fun with that!

2) RHEL4 users (and possibly others) can resolve the sqlite3 dependencies by grabbing rpms from the centOS repositories. The atomic installer fixes this for you automatically. If you dont use it... have fun with that! http://isoredirect.centos.org/centos/4/os/i386/CentOS/RPMS/

wget http://isoredirect.centos.org/centos/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm wget http://isoredirect.centos.org/centos/4/os/i386/CentOS/RPMS/sqlite-devel-3.3.6-2.i386.rpm

rpm -i *.rpm

up2date php OR yum upgrade php

Works like a charm


3) PHP 5.2.5 causes problems with Horde on PSA 8.2.1 and lower. PSA 8.3 is supposed to fix it, in the mean time you'll need to modify /etc/httpd/conf.d/zz010_psa_httpd.conf

Change this:

php_admin_value include_path "/usr/share/psa-horde:/usr/share/psa-horde/pear:."

to

php_admin_value include_path "/usr/share/psa-horde/lib:/usr/share/psa-horde:/usr/share/psa-horde/pear:."

Note this file is changed every time plesk is updated, so you'll need to go back and fix this when it does.

Personal tools