Jump to content
I-AM-OBODO

Database not connecting again!!!

Recommended Posts

Hi all.

My database just stopped connecting? I have tried everything i could but no way!
When i login to the page, it shows just blank page. So i started trying to figure out what could be the problem by disabling some included files.
Then i discovered the problem is from my database connection.
I re-uploaded the files and still not working (still blank)

What could have happened and what can i do?

I even went as far as creating the database connection inside the page to see if it will work but still no way!

 

Thanks

Share this post


Link to post
Share on other sites

First thing I would do is check if I can connect to the database by other means (PhpMyAdmin, MySQL Workbench or command line for instance, assuming you are usiing a MySql database)

Have you got error reporting turned on in your php.ini file?

26 minutes ago, I-AM-OBODO said:

What could have happened and what can i do?

Lots of things could have happened, but as you are giving us no information whatsoever, other than "it doesn't work", there isn't much we can do for you.

Share this post


Link to post
Share on other sites
12 hours ago, Barand said:

First thing I would do is check if I can connect to the database by other means (PhpMyAdmin, MySQL Workbench or command line for instance, assuming you are usiing a MySql database)

Have you got error reporting turned on in your php.ini file?

Lots of things could have happened, but as you are giving us no information whatsoever, other than "it doesn't work", there isn't much we can do for you.

Its showing just blank page

Share this post


Link to post
Share on other sites
12 hours ago, Barand said:

Have you got error reporting turned on in your php.ini file?

Share this post


Link to post
Share on other sites
Just now, Barand said:
12 hours ago, Barand said:

Have you got error reporting turned on in your php.ini file?

Dont know if its off or on (live) but on my local server everything is working just fine

Share this post


Link to post
Share on other sites

If it's on a remote server it could be sending error messsages to the log file. Check that.

Share this post


Link to post
Share on other sites
1 minute ago, Barand said:

If it's on a remote server it could be sending error messsages to the log file. Check that.

ok. Will do. Thanks

Share this post


Link to post
Share on other sites

We can't help you with the information you are providing, which essentially is:  it's not working.

 

  • What is your hosting setup?  (Apache, PHP, MySQL?  Linux?)
    • PHP Version
    • Basic php parameters you get from phpinfo()?
  • Is this shared hosting? VPS?
  • What hosting company is it?
  • What changed? 
    • You stated that this was working and then stopped?  Did something change?
  • MySQL related:
    • Did you determine if the mysql credentials being used still work using phpMyAdmin/CPanel etc
  • Logs, logs, logs!
    • When errors occur they are typically logged somewhere.  You want to be clear on your production setup, and where and when you are logging things, so you can hunt down problems like this.

Share this post


Link to post
Share on other sites

Thanks all. Seen the problem. It was from an a file i included. It was obsolete. Uses mysql instead of mysqli.

Problem resolved.

Thanks

Share this post


Link to post
Share on other sites

So did you find that out by having php error checking turned on?  If not, you might want to always use that when developing your scripts. 

 

Share this post


Link to post
Share on other sites
13 hours ago, ginerjm said:

So did you find that out by having php error checking turned on?  If not, you might want to always use that when developing your scripts. 

I did via error log.

Thanks

 

Share this post


Link to post
Share on other sites

When developing I find it much much easier to see the errors on my screen as I run/test my script instead of having to go download an error log file and viewing that.  Try it.  But be sure to turn if off once you have completed your project.

Share this post


Link to post
Share on other sites
18 hours ago, ginerjm said:

When developing I find it much much easier to see the errors on my screen as I run/test my script instead of having to go download an error log file and viewing that.  Try it.  But be sure to turn if off once you have completed your project.

Will do. Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

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.