I produced a PHP script to see the mistake log file inside a personalized visual format, but at this time, I've the road to the mistake log file hard-created in, which works acceptable for me, but I must discover if there's a method to pull the road to the mistake_log instantly therefore it can function on any server without further configuration.

you are able to pull it in the ErrorLog Directive

http://httpd.apache.org/docs/current/mod/core.html#errorlog

The only method to have it in PHP is as simple as setting up something similar to [cde]. Wouldn't refer to it as portable though, as I have seldomly seen it installed, but extremely speculating default pathways is default distro's is all about your only other option.