[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] php4 how to install it.
- Subject: RE: [cobalt-users] php4 how to install it.
- From: "Andrew Smith" <asmith@xxxxxxxxxxxx>
- Date: Tue Jul 25 17:58:39 2000
Hi Soler,
> -----Original Message-----
> I would like to know if it's possible to upgrade a raq2 with php4
> extension,
> and how i can do it... because i need to implement the php4 in my
> webserver,
> it's a raq2 and other server is a raq3 i tried to find some information
> throught the knowledgebase but it seems there's no info about php4 ...
> can someone help me out ?
> thx be4 hand,
> Oriol Soler
> Tech. Dept. Conecta-t.com (SPAiN)
I've had no problems compiling php4 on a raq3. RPM's are always out of date
and never a good idea since there are so many options when compiling php.
Download the src from www.php.net unpack it and there are instructions
inside for compiling, but in essence
[root@lightspeed /tmp]# tar -xzvf php-4.0.1pl2.tar.gz
[root@lightspeed /tmp]# cd php-4.0.1pl2
[root@lightspeed /php-4.0.1pl2]#
./configure --with-apxs=/usr/sbin/apxs --with-config-file-path=/etc/php
[root@lightspeed /tmp]# make
[root@lightspeed /tmp]# make install
[root@lightspeed /tmp]# mkdir /etc/php
[root@lightspeed /tmp]# cp php.ini-optimized /etc/php/php.ini
[root@lightspeed /tmp]# vim /etc/httpd/conf/httpd.conf
If you not familiar with vi pres "i" to get into insert mode
Edit the LoadModule line to be
LoadModule php4_module /usr/lib/apache/libphp4.so
exit vim by pressing "Esc" then typeing ":wq"
rather than teach you how to edit in vi, if you make a mistake press
"Esc" then type ":q!" to quit without saving and start again.
[root@lightspeed /tmp]# vim /etc/httpd/conf/srm.conf
find the directory index line and add index.php to the end
then find the AddType directives and add some like so:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
save and quit vim
[root@lightspeed /tmp]# /etc/rc.d/init.d/httpd restart
Then you can set about editing your php.ini to your liking. There are also
lots of things you can compile into php but this should get you going. If
you have any problems let me know.
Andrew