I've put directions for getting a private copy of Apache 2.0 running in topics/apache/runningApache2.0.onPorsche.html
You'll need to either stop Tomcat first, or run Apache on a different port than Tomcat. If you choose a port in the port mapping table, you'll need to actually run the Apache process on the "car" machine that the port is mapped to, rather than on porsche directly.
Do all of that first.
At the end of your httpd.conf file, add the following:
LoadModule php4_module /usr/local/software/net/apache2/modules/libphp4.so
# Tell Apache to parse certain extensions as PHP. For example, # let's have Apache parse the .php extension as PHP. You could # have any extension(s) parse as PHP by simply adding more, with # each separated by a space. We'll add .phtml to demonstrate.
AddType application/x-httpd-php .php .phtml
# It's also common to setup the .phps extension to show highlighted PHP # source, this can be done with: AddType application/x-httpd-php-source .phps
If it works, you should be able to put the following code in two different files, one called test.php, and the other called test.phps. The test.php file should echo simply "Hi, I'm a PHP script!", while the test.phps version shows the code as formatted below (with colors).
<html>
<head>
<title>Example</title>
</head>
<body>
<?php
echo "Hi, I'm a PHP script!";
?>
</body>
</html>
PHP also has a configuration file called php.ini. According to the PHP documentation about the configuration file , the location of a personal copy of this file can be specified with an environment variable, PHPRC
, like this:
if -r ${HOME}/php5/php.ini then setenv PHPRC ${HOME}/php5 endif
I haven't yet tested whether this installation of PHP is configured to be able to connect to MySQL or not. If one of you sees this notice and wants to test it for some credit towards the course, contact me first.
Last modified: 2006-03-27 3:50 PM