Simple way to get RH6.1 / Apache 1.3.9 / PHP 3.0.12 to work
| From: | Ray Harris \(RR\) | Date: | Sat, 18 Aug 2001 18:37:57 +0000 |
| Subject: | Simple way to get RH6.1 / Apache 1.3.9 / PHP 3.0.12 to work | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-4021@lists.php.net to get a copy of this message | ||
All,
I've been desperately trying to get an Apache/PHP config to work on a RH
Linux install, and here is one that finally worked, so here are some simple
instructions to explain what I did.
Platform:
Intel/Pentium/PC
OS:
RedHat 6.1 / Cartman / Kernel 2.2.12-20 (Install Discs that came with the
book "Redhat Linux Bible (6.1)". I am assuming that these would be the
same as the "official" RH CDs from -redhat.com-)
During the RedHat install, specify to install EVERYTHING. (I noticed that
this CD did not come with MySQL included.... oh well).
Web Server/PHP/Database Packages that are installed:
apache-1.3.9-4
apache-devel-1.3.9-4
-----------------------------
postgresql-6.5.2-1
postgresql-devel-6.5.2-1
postgresql-jdbc-6.5.2-1
postgresql-odbc-6.5.2-1
postgresql-perl-6.5.2-1
postgresql-python-6.5.2-1
postgresql-server-6.5.2-1
postgresql-tcl-6.5.2-1
postgresql-test-6.5.2-1
-----------------------------
php-3.0.12-6
php-pgsql-3.0.12-6
php-imap-3.0.12-6
php-ldap-3.0.12-6
php-manual-3.0.12-6
php-phpfi-3.0.12-6
There are two related install "bugs".
(1) The Apache install/config messes up two pieces of info
(2) The PHP install/config does not "turn on PHP"
To get Apache/PHP to work (note that this fix does NOT require any
reinstalls/compiles/builds of anything):
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Edit the file: /usr/sbin/apxs
Change the line that says:
my $CFG_LDFLAGS_SHLIB = '-shared';
to say:
my $CFG_LDFLAGS_SHLIB = 'q(-shared)';
Change the line that says:
my $CFG_LIBEXECDIR = 'modules';
to say:
my $CFG_LIBEXECDIR = 'usr/lib/apache';
Save the file.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Edit the file: /etc/httpd/conf/httpd.conf
Change the line that says:
#LoadModule php3_module modules/libphp3.so
to say:
LoadModule php3_module modules/libphp3.so
Change the line that says:
#AddModule mod_php3.c
to say:
AddModule mod_php3.c
Save the file.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Edit the file: /etc/httpd/conf/srm.conf
Change the line that says:
#AddType application/x-httpd-php3 .php3
to say:
AddType application/x-httpd-php3 .php3
Change the line that says:
#AddType application/x-httpd-php3-source .phps
to say:
AddType application/x-httpd-php3-source .phps
Save the file.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Create a new PHP file: /home/httpd/html/testphp.php3
That contains only the line:
<?php phpinfo(); ?>
Save the file.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Restart the Apache Web Server like so:
/etc/rc.d/init.d/httpd restart
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Using your browser goto the URL: http://localhost/testphp.php3
And you should see a page full of PHP configuration info.
HTH !!!!
Ray Harris