Hey everyone, some background info:
In the config file for my website, I set the mysql database name, username and password based on the contents of $_SERVER['HTTP_HOST']
. Because it is possible for this variable to not be set in the case of old (HTTP 1.0) requests and cron jobs, I include a file that spoofs the $_SERVER['HTTP_HOST']
value based on the value found in $_SERVER['SCRIPT_FILENAME']
.
However, I'm still noticing errors in my log files every now and then (it's rare, once every 2 weeks or so, but it still happens) where it tries to connect to MySQL on the production site using the login information for the local testing environment.
Is there a possibility for $_SERVER['SCRIPT_FILENAME']
to be empty?