Error after hosting move

Help with installation and general calendar setttings

Error after hosting move

Postby chillifish » Wed Aug 31, 2011 4:27 pm

Me again. Got everything working lovely on my own server. Then my client asked me to move it to their BT hosting package. Bleurgh, cack, etc.

Once moved, the script seems to run okay, but stops the CMS from processing the CSS. The error is
Code: Select all
Notice: Undefined variable: error in /services3/webpages/n/o/northeggardoncarthouse.co.uk/public/ac/ac-includes/db_connect.inc.php on line 19


I've looked at the line in question, but can't obviously see what's wrong. As far as I can tell, the variable is defined…
chillifish
 
Posts: 14
Joined: Fri Jul 29, 2011 5:03 pm

Re: Error after hosting move

Postby chillifish » Wed Aug 31, 2011 4:46 pm

I've got a much more detailed output now as I'd moved the php include script before enabling debug mode in the CMS. Now I've moved it back to the top of the file, it seems it's got something to do with not being able to connect to the database.

I'm trying to see the difference in the two hosting companies databases. One (the current one that doesn't work) has the two databases listed in the same phpmyadmin window, the first that did work has to load a different phpmyadmin for each database.

It seems that the two databases are clashing, ie, it connects to the one for the CMS, then connects to the one for the availability calendar, then can't load the CMS one as it's stuck loaded to the availability calendar database. I think there's something obvious that I'm missing, I've checked the config files of both and they seem correct.
chillifish
 
Posts: 14
Joined: Fri Jul 29, 2011 5:03 pm

Re: Error after hosting move

Postby chris » Wed Aug 31, 2011 4:50 pm

Hi,
If I am right line 19 is this:
Code: Select all
if($error){

try changing that to this:
Code: Select all
if(isset($error)){

Also, this error message is really just a warning message that most servers turn off.

What version of the calendar are you using?
Can you open the ac-includes/common.inc.php page and see if you have these lines towards the top:
Code: Select all
error_reporting(E_ALL ^ E_NOTICE);
ini_set("display_errors", 1);

Those lines basically "turn down" the error reporting so this sort of error is not displayed.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Error after hosting move

Postby chillifish » Wed Aug 31, 2011 5:19 pm

Yeah, I do have those lines. It's the latest version as of a couple of months ago.

I will try your first solution, too. Many thanks for the reply.
chillifish
 
Posts: 14
Joined: Fri Jul 29, 2011 5:03 pm

Re: Error after hosting move

Postby chillifish » Wed Aug 31, 2011 5:32 pm

Well that's stopped that error.

The issue appears to be that once the script has run for the calendar, the database for the CMS is no longer available. I may have to try and incorporate them into the same database somehow.
chillifish
 
Posts: 14
Joined: Fri Jul 29, 2011 5:03 pm

Re: Error after hosting move

Postby chris » Wed Aug 31, 2011 5:39 pm

It seems that the two databases are clashing, ie, it connects to the one for the CMS, then connects to the one for the availability calendar, then can't load the CMS one as it's stuck loaded to the availability calendar database. I think there's something obvious that I'm missing, I've checked the config files of both and they seem correct.

Ah, this is a different issue.
If you want the code to connect to 2 databases you will need to modify the code where it makes a mysql query (update, alter, fetch etc.) to use the specific db connection. I would suggest connecting to the calendar database first and *just* modifying the calendar code as no doubt the CMS code is more complex.

However, why not move the calendar tables into the main database? This way you would only need one connection.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Error after hosting move

Postby chillifish » Wed Aug 31, 2011 6:00 pm

Just posting back to say that's what I've done. Both in the same DB now. Odd that it didn't work as it worked fine on my own host, but the new hosting didn't seem to like it. Must be something different in their internal configuration. The one that worked is localhost and the bt one is somewhere else.
chillifish
 
Posts: 14
Joined: Fri Jul 29, 2011 5:03 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron