I have a PHP site with a mySQL database that I’m working on. I’m running Apache, PHP, and mySQL on my development machine, and my code all works just fine. A week ago, I uploaded my code and database to my organization’s web host (it’s a non-profit group, so the host is not a dedicated in-house server, but rented space.) At that point, the code worked perfectly on the host site.
I added a few new pages this past week, so uploaded them today and went to test. And lo and behold, my code (existing code, not the new stuff) returns a database connection error.
The host company insists that the issue is on my end. How is that possible, if the code was working perfectly just last week and no changes have been made to the existing code? It seems to me the only possible explanation is that there was a change in the host’s environment.
I’m pretty new to PHP, so I’m hoping someone can help me out here and explain whether it is possible or whether the host company’s tech support is clueless.
Check your php error_log file. The database error will probably be listed there.