Prev | Current Page 1194 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

conf with new version
# apachectl restart
The version numbers will change based upon what you are installing. For example, with PHP 5
and Apache 2, use:
# apt-get install libapache2-mod-php5 php5-mysql php5-gd
Don??™t worry if the second line does not print out a message as this example shows. That simply
means that the module has already been configured.
NOTE
652
Running Servers Part V
Just as the numbering and versions of Apache can sometimes be confusing, similar
thoughts can be expressed about PHP. As of this writing, there are active development
versions in both 5.x and 4.4.x (and PHP 6 is under development). Even though PHP 5 has been out for
a while, the PHP Group has committed to releasing security and security-related updates for PHP 4
through most of 2008.
At this point, Apache should be ready to process HTTP requests, complete with processing of PHP
files. To test it, create a file named /var/www/info.php containing a call to the phpinfo() function:
# cat > /var/www/info.php
phpinfo();
?>
^D
# chmod 644 /var/www/info.php
The ^D means that you should press Ctrl+D on your keyboard. This tells the cat command that you
are at the end of the input. Now try opening the page by going to http://localhost/info.php.
You should see a page full of information about your Apache and PHP installation, as shown in
Figure 24-1.


Pages:
1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206