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
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.

Edited by mac_gyver
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.