The only small thing remaining, in case You haven't done so already, is to create
suitable "php.ini
" scripts that are copied to the previous
specified PHP4 and PHP5 config file directories,
"/etc/php4/apache2/
" and
"/etc/php5/apache2/
".
It is recommended to enable all warnings and errors in each php.ini file unless You have very, very good reasons not to do this. Use the default php.ini files in the PHP distribution as the initial template. For use with JpGraph it is recommended to do the following modifications:
Increase maximum allowed memory to 32MB
Increase maximum allowed script running time to 30s
Set full error reporting
Assuming the IP-addresses shown in the configuration above we are now ready to test out setup. In order to do this make sure that each document root have the "phpinfo.php" test script (see above).
We can now test the different setups by using the URLs
http://192.168.0.50/phpinfo.php
This URL would send back configuration showing that the server is running
PHP4. Verify that the config path used is set to
"/etc/php4/apache2/
".
http://192.168.0.51/phpinfo.php
This URL would send back configuration showing that the server is running
PHP5 Verify that the config path used is set to
"/etc/php5/apache2/
".
If your browser asks you to download content with mime-type
"mime/x-httpd-application
" when you try to visit the
PHP script it means that Apache does not yet run PHP as a module (now
module have accepted to handle the x-http-application mime type). Make
sure you have included the "php4" in the APACHE_MODULES
string as described above and that you added the
"php4.conf
" file in the
"/etc/apache2/conf.d/
" directory.
We had some issues with FireFox insisting on downloading
"phpinfo.php
" as a file even when other browser
showed the page properly, using "etherreal" we could
confirm that Firefox was using a previous cached version before we had
enabled PHP in the apache configuration. To solve this we had to clear
the Firefox cache.