[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] How to install php4 on a raq 3 ?
- Subject: Re: [cobalt-developers] How to install php4 on a raq 3 ?
- From: Kul <WebMaster@xxxxxxx>
- Date: Mon Mar 5 15:39:04 2001
- Organization: Qax
- List-id: Discussion Forum for developers on Cobalt Networks products <cobalt-developers.list.cobalt.com>
jsmit@xxxxxxxxxx wrote:
> How to install php4 on a raq 3 ?
>
> Thanks for your help
Hi,
This works (cut'n'pasted from a sucessfull installation on a Raq3 in January), but I know there is a slightly quicker & cleaner way to install php4, but hey what the heck ! This also includes Zend optimizer, its supposed to make it 2 times as quick etc.... (see zend website for more info) If you need mysql, email back I have a nice little set of instructions to cut'n'paste !
How to Install PHP with Zend Optimizer
If you plan to use MySQL with PHP, it would best to upgrade/install first!
You should install PHP first - then Zend can be done afterwards.
Installing PHP
Logged in as 'root' (SSH/Telnet) perform the following commands
su
<ENTER YOUR ROOT PASSWORD WHEN PROMPTED>
cd /usr/local/download
wget http://php.net/distributions/php-4.0.4pl1.tar.gz
tar -xvzf php-4.0.4pl1.tar.gz
cd php-4.0.4pl1
mkdir /usr/local/php
mv * /usr/local/php
cd /usr/local/php
rmdir /usr/local/download/php-4.0.4pl1
# Use ONE of these TWO lines, NOT both!
# Use this line if you do NOT want IMAP support
./configure --with-mysql --with-apxs --enable-track-vars
# Use this line to include IMAP support
./configure --enable-trans-sid --with-mysql --with-apxs --enable-track-vars --with-imap
make
make install
cp php.ini-dist /usr/local/lib/php.ini
pico -w /etc/httpd/conf/httpd.conf
Change this line:
LoadModule php4_module lib/apache/libphp4.so
to
LoadModule php4_module /usr/lib/apache/libphp4.so
pico -w /etc/httpd/conf/srm.conf
Find the following line in srm.conf
#AddType application/x-httpd-php .phtml
After it, add this line
AddType application/x-httpd-php .php .php4 .phtml
This associates the .php file extension with PHP4
(If you want index.php to be served by default you need also to add/alter this as well in the section UserDir web of the same file)
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
DirectoryIndex index.html index.htm index.shtml home.html home.htm index.php index.php4 index.p$
Still logged in as 'root' perform the following commands to stop and restart the HTTP server
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start
Now to test the installation
cp /usr/local/php/sapi/servlet/jinfo.php /home/sites/home/web/jinfo.php
(you can place the jinfo.php in any suitable web directory)
Then open jinfo.php in your browser and you will see details of the installed program.
Then Install Zend
Download the zend optimiser https://www.zend.com/store/free_download.php?pid=13 you can't do a wget unfortunately - you have to register and then login and download it to your local machine.
The file you need is ZendOptimizer-1[1].0.0-PHP_4.0.4-Linux_glibc21-i386.tar/gz
I then transfered it to my RAQ via FTP to a web directory and moved it to "/usr/local/download" (has to be an easier way but I gave up and did it this way)
Logged in as 'root' perform the following commands
mv /home/thedircontaingZendfromFTP/ZendOptimizer-1[1].0.0-PHP_4.0.4-Linux_glibc21-i386.tar.gz /usr/local/download
su
<ENTER YOUR ROOT PASSWORD WHEN PROMPTED>
mkdir /usr/local/Zend
mkdir /usr/local/Zend/lib
cd /usr/local/download
tar -xvzf ZendOptimizer-1[1].0.0-PHP_4.0.4-Linux_glibc21-i386.tar.gz
cd ZendOptimizer-1[1].0.0-PHP_4.0.4-Linux_glibc21-i386
mv * /usr/local/Zend
cd /usr/local/Zend
mv ZendOptimizer.so /usr/local/Zend/lib
Now we need to amend your php.ini file
pico -w /usr/local/lib/php.ini
Find the following section;
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
allow_url_fopen = On ; Wheter to allow trating URLs like http:... or ftp:... like files
Now add the follwing lines after the lines above!
;Zend stuff
zend_optimizer.optimization_level=15
zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"
Save and exit
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start
Done
in your phpinfo web page (jinfo.php) you will now see that there is an additional line "with Zend Optimizer v1.0.0, Copyright (c) 1998-2000, by Zend Technologies" this shows Optimizer has installed correctly
Have fun !
--
Regards,
Kul