ini-recommended. This file sets
various nonstandard settings and is intended to better secure and optimize
your installation, although this configuration may not be fully compatible with
some of the legacy applications. Consider using this file in lieu of php.ini-dist.
To use this file, execute the following command:
%>cp php.ini-recommended /usr/local/lib/php.ini
CHAPTER 2 ?– CONFIGURING YOUR EN V IRONMENT 17
6. Open Apache??™s configuration file, known as httpd.conf, and verify that the following
lines exist. (The httpd.conf file is located at APACHE_INSTALL_DIR/conf/
httpd.conf.) If they don??™t exist, go ahead and add them. Consider adding each
alongside the other LoadModule and AddType entries, respectively:
LoadModule php6_module modules/libphp6.so
AddType application/x-httpd-php .php
Because at the time of publication PHP 6 wasn??™t yet official, you should use the
latest stable version of PHP 5 if you??™re planning on running any production applications.
In the case of PHP 5, the lines will look like this:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
Believe it or not, that??™s it. Restart the Apache server with the following command:
%>/usr/local/apache2/bin/apachectl restart
Now proceed to the section ???Testing Your Installation.???
?– Tip The AddType directive in step 6 binds a MIME type to a particular extension or extensions.
Pages:
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94