This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Database Error on LocalMachine
#1

Hello again

Hm, not sure if it belongs in here or into this forum at all, but I had a very - first time - weird experience yesterday.

This has to do with transferring sites, I believe? not sure Dodgy

I was working on my site, fixing some HTML code cleanup to comply with W3C and - out of the blue, it just fell off the ceiling right onto my forehead, all pages seemed to have lost most of its design. Some were almost complete empty!

No idea what happened (PhP collapse, DB collapse or whatever) I went on checking on some other sites I have installed locally and they all - showed absolutely normal.

Then I downloaded the entire site from my server and replaced it locally with the gobbled up one and ... voila, everything back to normal ...

But Hang On my database connection online differs from the one local. No problem, smart as I am (oh that smells bad Cool ) I replaced the comments/includes/db/connect.php - that should do ... returns that after all, I am not that smart ...

Loading the pages now show "no" comments AND no form etc., at all, but a notice that there was a problem with connecting to the database ...

Now I'm stuck ... what other file(s) than "connect.php" do I need to change to get my connection back to normal?

However - and here my ignorance becomes really transparent.

I can log into the admin! So - Database connection after all seems no problem at all.

The admin shows 7 posts. Correct!. BUT! I downloaded the site from online and there were only "one" post.

Shouldn't now just show all these 7 posts from my local database? At the end, the posts are not hard-placed on the pages but generated through the database. So basically speaking.... whatever I had online, well, that is still online, but the pages (after downloading) should be showing just the form, etc. or - like in my case - the seven posts stored locally? Correctly wrong or falsely correct? Idea

So where is this "DB" connection error resulted from and ... yeah, uh, hm - ... I don't know what I'm missing? Sad Confused

Thanks a lot to everyone who can push my brain back into position again
Reply
#2

Hi,

The connect.php file is the only file that is used to connect to the database, so if that's working okay for the admin panel then the file itself must be fine. Instead, it seems like it's a problem related to the frontend, perhaps something you accidentally changed when trying to comply with W3C? It's not surprising to me that it can work okay locally and not online, they are different servers. Also I assume your local database will be different to the one online so you will naturally see different comments. But maybe I don't understand your issue properly, I found it hard to figure out exactly what you meant. What is the error message that you are seeing, and have you tried the strange problem FAQ?

Have you completed the interview?
Reply
#3

Quote:perhaps something you accidentally changed when trying to comply with W3C?
Hi Steven
That was exactly the same and very first idea that came into my mind.

I swear to heaven, earth and the universe, I must have some spook powers... I didn't even switch the computer off - everything is back to normal. Tell me I'm insane and I'd believe you.

Well, the only thing that remains in question and would - sort off - make sense is, my MAMP played up yesterday. That is the only thing that will remain unanswered, I'd say, since I cannot even reproduce the same fatal whatever it was.

Thanks
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
07-Jan-2015, 08:43 PM
Last Post by vsantini
05-May-2012, 11:58 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)