Hi All,
I recently set-up PHP4 on a system running RH Linux 6.1 and Apache 1.3.19.
I tried to use the 'auto_prepend_file FileName' command to prepend a file (named hello.php) to all the files served out of a directory.
I made the following entry in the .htaccess file in that directory:
'auto_prepend_file hello.php'
This worked just fine (hello.php was in the same directory).
However, when I placed the hello.php file in the DocumentRoot directory of Apache, and modified the code as below, it stopped working.
'auto_prepend_file /hello.php'
I get an error message as follows:
"Warning: Failed opening '/hello.php' for inclusion (include_path='./:/usr/local/lib/php') in Unknown on line 0"
I tried changing the doc_root variable in the php.ini file to point to the DocumentRoot of Apache. I still get the same error message.
I know this has something to do with the PHP configuration, because the same code under the same directory structure used to work on a different system running RH Linux 6.1, Apache 1.3.19 and PHP4.
Can anybody advice me on what I'm doing wrong?
Thanks,
Michael