[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] [Cube 3] Howto: Upgrade PHP to 4.3.3 - Admin UI Intact



Will Install all packages from /home/packages

Get php-4.3.3.tar.gz from here
(http://www.php.net/get_download.php?df=php-4.3.3.tar.gz) 

cd /home/packages
wget http://us2.php.net/get/php-4.3.3.tar.gz/from/us4.php.net/mirror
tar xzvf php-4.3.3.tar.gz

Copy all files from /usr/lib/apache to /usr/lib/apache.backup

mkdir /usr/lib/apache.backup
cd /usr/lib/apache
tar cvhf - .| (cd /usr/lib/apache.backup ; tar xfBp -)

Install libPNG on the Qube3.  It can be downloaded from here
(http://www.libpng.org/pub/png/)
zlib does not have to be installed first.

cd /home/packages
wget
http://twtelecom.dl.sourceforge.net/sourceforge/png-mng/libpng-1.2.5.tar.gz
tar xzvf libpng-1.2.5.tar.gz
cd libpng-1.2.5
cp scripts/makefile.linux makefile
make
make install
cd ..

Install JPEG support on the Qube3.  First, install the library from here
(http://www.ijg.org/)

cd /home/packages
wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar xzvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --enable-shared --enable-static
make
make install
cd ..

Configuring PHP. Go to /home/packages/php-4.3.3 and use the following
commands. 
Be sure to specify the correct install directory for jpeg and png.

cd php-4.3.3
./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --enable-safe-mode
--with-config-file-path=/etc/httpd/ --with-exec-dir=/usr/bin --with-zlib
--enable-magic-quotes --with-regex=system --with-pear --enable-calendar
--with-gd --with-iconv --disable-debug --with-gettext
--with-ttf=/usr/lib/libttf.so --enable-mbstring --with-interbase=shared
--with-mysql=shared --with-pgsql=shared --with-jpeg-dir=/usr/local/bin
--with-png-dir=/usr/local/bin
make
make install 

Copy all files from: /usr/src/php-4.3.0/modules to /usr/lib/apache/php

cp /home/packages/php-4.3.3/modules/* /usr/lib/apache/php

vi /etc/admserv/conf/httpd.conf
Modify the line:

LoadModule php4_module /usr/lib/apache.backup/libphp4.so

vi /etc/httpd/conf/httpd.conf
Modify the line:

LoadModule php4_module /usr/lib/apache/libphp4.so

vi /etc/httpd/php.ini
Modify the lines

include_path =
".:/usr/lib/php:/usr/local/lib:./includes:/usr/sausalito/ui/libPhp" 
extension_dir = /usr/lib/apache/php

; Dynamic Extensions
extension=pgsql.so
extension=mysql.so

Type the following commands:

/etc/rc.d/init.d/admserv restart
/etc/rc.d/init.d/httpd restart

Check the UI and the web site to make sure they work.  
PHP 4.3 should now be installed.