Jump to content

How to synchronise offline and online databases successfully?


keveen

Recommended Posts

Online server - PHP and MySQL5

Offline server - PHP and MySQL 4

 

As a non-expert I use phpMyAdmin to backup, import and export databases.

 

I can work offline and synchronise files and databse online no problem using Joomla and mambo. I only have problems with Claroline and Dokeos.

 

I installed the package online and then made a mirror image copy for my offline site. I adjusted the claro_main.conf.php database info and root site to Localhost instead of my Live Site. It all worked offline - a nice working copy of my online site on my own PC.

 

Then I imported a new SCORM package Offline, synchronised the files with my Online site and then Exported the database and Imported it into my Online site - and it does not work. When I go to the main site http://www.the-bizness.co.uk/claroline183/ it all works until I go to the course and hit Learning Path - http://www.the-bizness.co.uk/claroline183/claroline/learnPath/learningPathList.php- and these are the errors:

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/thebizn/public_html/claroline183/claroline/learnPath/learningPathList.php on line 547

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/thebizn/public_html/claroline183/claroline/learnPath/learningPathList.php on line 551

 

Line 547 = $LPNumber = mysql_num_rows($result);

 

Line 551 = while ( $list = mysql_fetch_array($result) ) // while ... learning path list

 

The code sequence is here:

 

// used to know if the down array (for order) has to be displayed
$LPNumber = mysql_num_rows($result);
$iterator = 1;

$is_blocked = false;
while ( $list = mysql_fetch_array($result) ) // while ... learning path list
{ 

 

have turned on error reporting and you can see here:

 

http://www.the-bizness.co.uk/claroline183/

 

And the Learning Path here:

 

http://www.the-bizness.co.uk/claroline183/claroline/learnPath/learningPathList.php

 

Very frustrating!

 

I did the same thing for my Localhost installation and there are no errors.

Link to comment
Share on other sites

I had a moment of "inspiration" remembering that I read somewhere that the Unicode settings could cause some errors. I checked and one database collation is set for Swedish1 and the other one uft8. I made them both uft8. Some of the errors have gone but not the Learning Path ones.

Link to comment
Share on other sites

I tested again by Importing a SCORM package while online and then synchronising the database with my PC/Offline version and as expected there are no errors (I have turned error reporting ON). But if I do the opposite I get the errors you see at the Learning Path.

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.