I am tryng to get mod_php4 / PHP4 / Apache 13 installed on a fresh FreeBSD 4.3 system. Apache is installed and working and serving up web pages. I installed the PHP4 port in /usr/ports/lang/php4 and the mod_php4 Apache module port in /usr/ports/www/mod_php4 and stopped/started Apache. Apache serves up the web pages, but ignores the PHP portions:
index.html.en snippet:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HEAD> <TITLE>Test Page for Apache Installation</TITLE> </HEAD>
<p> PHP test page -- you should see PHP info below!<p>
<?php
echo "Printing PHP info!\n";
phpinfo();
?>
<DIV ALIGN="CENTER"><IMG SRC="apache_pb.gif" ALT=""></DIV>
</BODY>
Displays "PHP test page -- you should see PHP info below!" and the Apache logo, ignoring all PHP code. A PHP-only page like test.php:
<head><title>PHP Test</title></head>
<body>
<?php echo "Hello World<p>"; ?>
</body>
returns this error:
Warning: Failed opening '/usr/local/www/data/test.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0
This is an unusual problem in FreeBSD - everything else I have installed works flawlessly w/o tweakage... :-)
Apache httpd.conf snippets:
LoadModule php4_module libexec/apache/libphp4.so # libphp4.so exists
AddModule mod_php4.c
<IfModule mod_php4.c>
DirectoryIndex index.php index.html
</IfModule>
server-config reports:
Module Name: mod_php4.c
Content handlers: application/x-httpd-php , application/x-httpd-php-source , text/html
Configuration Phase Participation: Create Directory Config, Merge Directory Configs, Child Exit
Request Phase Participation: none
Module Directives:
php_value - PHP Value Modifier
php_flag - PHP Flag Modifier
php_admin_value - PHP Value Modifier (Admin)
php_admin_flag - PHP Flag Modifier (Admin)
Current Configuration:
php.ini_dist was copied into /usr/local/lib/php/php.ini.
Neither apache or PHP logs an error - just the "Warning: failed opening ... for inclusion" error. I seem to be alone in this problem - can't find any info about it with Google (including here)... I will happily RTFM is you can provide me with a FM to read :-)
Please assist - if more info is needed/desired, just email.
Thanks in advance!
netman