Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/abledesi/domains/abledesign.com/public_html/navfiles/log.php on line 126

AbleDesign - Support Forum

AbleDesign Forum Index AbleDesign

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
AbleDesign Forum Index
MyCalendar Discussion
changed host
Post new topic   Reply to topic

Post new topic   Reply to topic    AbleDesign Forum Index -> MyCalendar Discussion
View previous topic :: View next topic  
Author Message
bgrosh
Lurker
Lurker


Joined: 05 Aug 2005
Posts: 9

PostPosted: Fri Aug 05, 2005 11:50 am    Post subject: changed host Reply with quote

Hi, I recently moved a website from one host to another. Now the calendar gives the message "Unable to connect to the database server at this time."

I'm not even sure what version I'm using, since all I can see is the above error message.

I downloaded the database and then uploaded it to the new site. I can see it through the PHPMyAdmin panel, and it looks fine. In the process it acquired a new username and password. I changed these in the dbConnect.inc file. One thing that bothers me is that I tried changing the error message that appears in this file, but it doesn't change the error message I see in the browser, which makes me think it's somehow not loading this file properly.

I also went into the config.php file and changed the $dbConnect path in line 8 and the database name in line 15.

Sorry to bother you with this. I tried searching the forums but couldn't find changing hosts referred to.
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Fri Aug 05, 2005 11:57 am    Post subject: Reply with quote

Well, you're on the right track. The dbConnect.inc file is what issues that error message if the MySQL hostname/username/password are incorrect, so you know the config.php include path to it is right. The fact that you couldn't get the error message to change tells me one of two things:

1) You've got a persistent cache issue. Try deleting the file, refreshing the browser, then re-uploading, or something to that effect.

2) Is it possible you've got two copies of dbConnect.inc installed on the server and it's not using the one you edited?

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bgrosh
Lurker
Lurker


Joined: 05 Aug 2005
Posts: 9

PostPosted: Fri Aug 05, 2005 12:34 pm    Post subject: Reply with quote

Well, I deleted the dbConnect.inc file and refreshed my browser, and it still didn't change the error message. So that suggested that the error message is coming from some other file.

Next, I searched for the text of the error message. Sure enough, I discovered that I had inserted the text of the dbConnect.inc file into the config.php file at line 420 when I had trouble getting the thing to run in the first place on the old server. I know this wasn't kosher, but I couldn't quite see how it was less secure than the .inc file and it let it work. So I changed the username and password and error message there and refreshed and got the new error message. So that's where it's coming from.

Just tried commenting out that insertion of the include file into the config file and go back to the original error message, which suggests it comes from somewhere else. That is not in the config file, however. Just did a search of the whole folder and found it only in language_english.php.
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Fri Aug 05, 2005 12:42 pm    Post subject: Reply with quote

Ah, that makes a lot more sense!

There are two separate error messages you could be getting (since relabled to be less confusing): one for being unable to load the dbConnect.inc file (translated in the language file), and one for being unable to connect to the database (straight English). Make sure to double check which error message you're getting so you know where it's coming from. The wording is too similar for both of them, which leads to the confusion. If you're getting the message from the language file, that implies your error is now the include path to dbConnect.inc.

There's nothing really wrong with putting the database connection code right in the config file, unless your server is terribly misbehaved and allows code to be viewed through the browser. I've yet to see a setup that does that, despite the warnings...

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bgrosh
Lurker
Lurker


Joined: 05 Aug 2005
Posts: 9

PostPosted: Fri Aug 05, 2005 1:30 pm    Post subject: Reply with quote

OK, but I've I've put the inc file into the config file, and I'm getting the error message from the inc file that's included directly into the config file, so the incorrect path is not the obstacle. Right? but it still doesn't work.
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Fri Aug 05, 2005 1:44 pm    Post subject: Reply with quote

Did you comment out the original $dbConnect include?

I'll probably need to take a look at your config file and error message, as it isn't overly clear what all you're working with at this point.

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bgrosh
Lurker
Lurker


Joined: 05 Aug 2005
Posts: 9

PostPosted: Fri Aug 05, 2005 1:50 pm    Post subject: Reply with quote

How would you like to see the config file? Shall I email it to you as an attachment? Guess you can't see it online, right? The message can be seen at http://singleadoptiveparents.com/calendar/index.php
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Fri Aug 05, 2005 2:09 pm    Post subject: Reply with quote

Yeah, an email attachment would be good.

Quote:
Guess you can't see it online, right?

Hopefully not!

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AbleDesign Forum Index -> MyCalendar Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group


Home | Services | Pricing | Portfolio | About Us | Contact
Support | Programs | Purchase | Tutorials | Site Map

© 1999-2025 AbleDesign.com - Web Design that Can!