Jump to content

Connection to Database Error


AGSperry

Recommended Posts

I am getting an "error connecting to database" messsage. There was no error with the code until I switched to a new hosting server and database. I updated all of the database connect credentials and even tested them with a php database connect test script which worked just fine. Im new to PHP and don't really know how to go about fixing it. You can see the error at thepublicpitate.com/index2.php

 

Any help or assistance is very appreciated.

Link to comment
https://forums.phpfreaks.com/topic/281767-connection-to-database-error/
Share on other sites

you would use your database library's error function in your existing error handling logic to get your code to tell you why the query is failing. what database and php database library are you using?

 

also, temporarily setting php's error_reporting to E_ALL and display_errors to ON may help expose why your connection isn't working.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.