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

RE: [cobalt-users] [Raq3 PHP4]



> server (A Raq3).  I am now trying to install PHP4 (I know questions about
> this are constantly being asked, but I have been trying for a week now to
> install PHP4 and its time to ask for help!).  I have followed several
> different old archives and instructions from the php.net website, but
> whenever I run a PHP script, it just displays the php script on
> the screen,
> in a test format, I have had this problem in the past with a cgi
> script and
> managed to sort it out, but I am having no luck with this.
>
> Any assistance you can offer would be greatly appreciated,

This was posted some time ago by Steve Bassi. The last part may be all you
need if it's not working.

Then for PHP4

Logged in as 'root' perform the following commands

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
./configure --with-mysql --with-apxs --enable-track-vars
make
make install
cp php.ini-dist /usr/local/lib/php.ini

pico -w /etc/httpd/conf/httpd.conf
(Change the 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 this line, add the 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 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

--
Dan Kriwitsky