In my .htaccess on my 127.0.0.1 running Apache on Linux:
# prepend and append files
php_value auto_prepend_file /var/www/..../prepend.php
php_value auto_append_file /var/www/..../append.php
So the prepend file is working fine, but the append file is not. I try to do it do unlink() operations on a www-data owned file and nothing. I'd like to specify that my code has no exit or die(), just plain echo s. Also, If i put whatever for the file name, Apache does not complain, for ex
php_value auto_append_file foo
I tried also having only the auto_append_file declaration in the .htaccess and still a no-no. Any idea where the bug lies?
Well, it's working now. I will have to dig my logs because it must have been triggered by a very specific scenario. Interesting though. I didn't know some configuration in your code could cause the append file not to be triggered, and without generating server errors. Well, sorry for the troll...
From PHP Manual:
Note: If the script is terminated with exit(), auto-append will not occur.
Use register_shutdown_function() function in your prepend file instead of auto_append_file value.