Web Hosting Talk







View Full Version : PHP Installation


Kilgor
09-08-2001, 11:24 AM
Does anyone know of a good tutorial to install PHP on a RaQ3? I've tried installing 4.0.6 myself, but have had some problems.. so even if it's an earlier version, that'd be fine..

Chicken
09-08-2001, 12:51 PM
Have you searched the forum for 'php install' ???

Reg
09-08-2001, 12:58 PM
As a matter of fact, I do. BEFORE you install PHP though, install the mySQL pkg file. Otherwise, you will not be able to use mySQL with PHP (which sort of defeats the purpose of PHP :) ):

1. Telnet to your box

2. Gain root access by typing su (enter root password)

After gaining root access type the following:

1. cd /home/sites/home/users/admin

2. wget http://www.php.net:8000/distributions/php-4.0.4.tar.gz

3. tar -xvzf php-4.0.4.tar.gz

4. cd php-4.0.4

4. ./configure --with-mysql --with-apxs (Note, these are all that are required to work. If you wish to configure it with anything else, you can. Such things include --enable-safe-mode, --enable-magic-quotes, --enable-track-vars, --enable-xml)

5. make

6. make install

7. pico /etc/httpd/conf/httpd.conf

In the httpd.conf file, you are going to have to do some changes. You need to replace:

LoadModule php4_module lib/apache/libphp4.so

with

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

After making that change perform the following:

1. Ctrl + X (Note, this means push the "Ctrl" and the "X" key on your keyboard)

When asked to save changes, choose "Y" or Yes. After changing that, you will need to make a change to your srm.conf file. Perform the following:

1. pico /etc/httpd/conf/srm.conf

Look for a line that says:

#AddType application/x-httpd-php .phtml

Directly under that line, type in the following:

AddType application/x-httpd-php .php

Now that you have changed the file, type the perform the following:

1. CTL + X (Note, this means push the "Ctrl" and the "X" key on your keyboard)

When asked to save changes, choose "Y" or yes.

Now, type in the following command to complete your installation process:

1. /etc/rc.d/init.d/httpd stop

2. /etc/rc.d/init.d/httpd start

This will restart Apache. You have now installed PHP on your RaQ 3.

Kilgor
09-08-2001, 03:03 PM
Hey Reg,

Do you have ICQ or email I could contact you with?.. I ran into a problem at the "make install" command.

Thanks

Reg
09-08-2001, 03:10 PM
I have both ICQ and AIM, my ICQ number is 39251906 and my AIM is WXEWF.

horoscopes2000
09-08-2001, 03:35 PM
Ah, this partially answers my new thread. Where do we get mySQL from?

Reg
09-08-2001, 04:20 PM
You can get mySQL in the nice little pkg format (installable via the control panel) from Cobalt. Here is the direct link:

http://pkg.nl.cobalt.com/i386/RaQ3-RaQ4-MySQL-3.23.37-1.pkg

ALSO NOTE, I have modified my post due to the fact that the updates contained in 4.0.6 DO NOT WORK WELL with the RaQ3's setup. Use 4.0.4 instead.

Kilgor
09-08-2001, 04:32 PM
An update for anyone else trying to install PHP - the mysql pkg works fine, I used it. But for PHP, don't try to install PHP 4.0.6 on a RaQ3, it won't work. You have to use 4.0.4, or an earlier version.. 4.0.6 only works on RaQ4's. I believe the instructions above with 4.0.4 instead of 4.0.6 will work fine.

Thanks to Reg for helping me out and sorting some problems on my server :)

horoscopes2000
09-08-2001, 10:16 PM
Hi Reg, thank you for such an in depth post.

I followed the instructions, and everything went fine apart from the following :

http://www.php.net:8000/distributions/php-4.0.4.tar.gz returned a 404 file not found. However, I looked in this folder and
this one was the closest match :

http://www.php.net:8000/distributions/php-4.0.4pl1.tar.gz

I used it, and everything went fine right up to the end, when I typed :

/etc/rc.d/init.d/httpd start

I got this error :

Setting up Web Service: Site home has invalid certificate: 4999 Certificate file
s do not exist.
/usr/sbin/httpd

Any ideas what went wrong?

horoscopes2000
09-08-2001, 10:33 PM
Ah ha. Ok I just read I have to turn off SSL in my control panel. i did that, then stopped httpd, started httpd, no error messages.

However, when i try to visit the test .php file on my server, I am asked if I want to save it. i have tried this in IE6 and NS6, so presume something is not quite right.

There are no errors when I start (or restart) httpd.

brandonk
09-08-2001, 10:40 PM
Originally posted by horoscopes2000
Ah ha. Ok I just read I have to turn off SSL in my control panel. i did that, then stopped httpd, started httpd, no error messages.

However, when i try to visit the test .php file on my server, I am asked if I want to save it. i have tried this in IE6 and NS6, so presume something is not quite right.

There are no errors when I start (or restart) httpd.

Sounds like you forgot to change the code in httpd.conf, or add the code to srm.conf.

Kilgor
09-08-2001, 10:41 PM
Make sure you do the steps of editing srm.conf and httpd.conf. Remember to also remove the comment things (#), if there is a # before the line, then its commented out and thus won't take effect...

horoscopes2000
09-08-2001, 10:57 PM
hmmm, i'll have to double check those files. i edited them and ctrl x'd them, but perhaps i made a mistake somewhere.

horoscopes2000
09-08-2001, 11:09 PM
OK, I checked srm.conf and httpd.conf, and those lines have been added. Although, in srm.conf, the original line :

#AddType application/x-httpd-php .phtml

Has the # in front. I previously added these two lines :

AddType application/x-http-php .php
AddType application/x-http-php .php3

When I opened it they were in there just fine. So those two files are as they should be. i wonder what else it could be.

I restarted httpd, but I wonder if I need to reboot my RaQ?

horoscopes2000
09-08-2001, 11:54 PM
Problem solved. I made a typo when editing one of the conf files. Sorry guys. Been up since 1am and it's nearly 9pm. You know what it's like when you check the same line over and over again.