I’m having an issue with a user of mine who is attempting to access a forum on phpbb2.0. They’re reporting the following error:
Template->make_filename(): Error - file posting_attach_body.tpl does not exist

Now, this error isn’t showing up in my apache error logs, it returns a HTTP Status 200 according to the access log. I saw the entry on phpsuexec in the wiki, so I changed all of my .php files to be 755 permissions (rwxr-xr-x), but it hasn’t helped the user.

Do I need to make the included .tpl file 755 as well, even though it’s just a php included file, and not something pulled directly by apache?


Figured out my original issue, there really was a tpl missing in a template, it’s just a rarely used template.

But, I’m still concerned that the php error didn’t show up in any log I seem to have access to. Anyone have any ideas how I could enable that sort of logging to the error.log?


Unfortunately, I’m not aware of any good way to log this sort of error. PHP doesn’t have any good generalized error logging facilities, so most PHP applications (including phpBB) just output errors to the browser and nowhere else. It kind of sucks. :frowning:


Why don’t you do something like this?

// Report no PHP errors 0

// Don't display on screen 0
ini_set("display_errors", 0);	
//set error handler
set_error_handler("YourErrorHandlerFunction", E_ALL);

Your error handler can then email or log the PHP errors somewhere, and the user doesn’t see any ugly error messages.


That works for PHP “native” errors (e.g, ones thrown within PHP itself, or using trigger_error), but a lot of applications have their own error-handling mechanisms that don’t go through that system.