PHP Configuration Overview

only for RuBoard - do not distribute or recompile

PHP Configuration Overview

To allow your Web server to correctly respond to the PHP commands entered in the Web page, you must change its configuration files. On the Red Hat system, the Apache configuration files are in directories below the /etc/httpd directory.

Whenever you make a change to the Web server by editing the text configuration files, you must restart it. This forces it to reload its settings. You must be the root user . In a terminal window, run the httpd restart command as shown:

 [root@winbook root]# /etc/rc.d/init.d/httpd restart 

Output

 Shutting down http:                                        [  OK  ] Starting httpd:                                            [  OK  ] 

If you don't get an [ OK ] after the Starting httpd printout, something is wrong with your configuration files. Recheck the last thing you edited. You will see clues to what is wrong in the /var/log/messages file and in the /var/log/httpd/error_log file. The easiest way to check these log files is with the tail command:

 [root@winbook httpd]# tail /var/log/messages 

Output

 Mar 27 07:12:48 lin gnome-name-server[763]: name server starting Mar 27 07:12:48 lin gnome-name-server[765]: starting Mar 27 07:12:48 lin gnome-name-server[765]: name server was running on display, exiting Mar 27 07:27:27 lin cardmgr[377]: executing: './network suspend eth0' Mar 27 07:27:27 lin kernel: eth0: interrupt from stopped card Mar 27 01:27:34 lin cardmgr[377]: executing: './network resume eth0' Mar 27 01:54:35 lin httpd: httpd shutdown succeeded Mar 27 01:54:36 lin httpd: httpd startup succeeded Mar 27 01:55:57 lin httpd: httpd shutdown succeeded Mar 27 01:55:58 lin httpd: httpd startup succeeded 

NOTE

At around version 6.2 of Red Hat, the Apache Web server configuration files started merging into one file, httpd.conf.


To support PHP, Apache's /etc/httpd/conf/srm.conf file must be modified. In that file, at around line 164, find the lines that look like the following

 #AddType application/x-httpd-php3 .php3 #AddType application/x-httpd-php3-source .phps 

and remove the comment symbol (the # ) so they look like this:

 AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .phps 

NOTE

PHP version 3 uses the .php3 file extension. PHP version 4 uses the .php file extension (which was also used by PHP/FI). IMP version 2.0.11 uses PHP version 3. For the sake of our project, we will focus on the IMP 2.0.11 setup features.


Now you must edit the /etc/httpd/httpd.conf file. Locate the AddModule section at around line 176, and remove the comment symbol on the mod_php3.c line. The line should look like this:

 # Extra Modules #AddModule mod_php.c AddModule mod_php3.c #AddModule mod_perl.c 

NOTE

The LoadModule section is being ignored for now. This allows Apache to keep working, even if the PHP RPM file is installed. During the install of PHP3, the PHP installation script modifies the LoadModule line.


only for RuBoard - do not distribute or recompile


MySQL and PHP From Scratch
MySQL & PHP From Scratch
ISBN: 0789724405
EAN: 2147483647
Year: 1999
Pages: 93
Authors: Wade Maxfield

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net