Jump to content

keveen

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Posts posted by keveen

  1. 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.

  2. Found a mySQL for Dummies workaround ::)

     

    I found that when I tried to import the Content tables from the other website database they were imported but were not showing up when I went into Joomla to see the list of content items that should have been there. The reason is because the section/category ids that come with the content table do not match up with the target list and it seems nigh on impossible to think of a way around that unless there was a way of wiping clean both sets of ids and replacing them with matching sets - quite beyond my expertise!!

     

    However, at least phpmySQL lets me view and edit tables so all I have done (doing right now) is to delete the section and category ids that were imported with each Content Record, replacing them with the matching ones I created and then when I go to Joomla Admin and look for content  - magic they show up. So at least that has saved me the chore of cutting and pasting content, about 10x faster I guess. Hope that helps any other dummys out there. ;)

     

    The first image of course refers to phpMyAdmin interface and the second one is from Joomla.

     

    [attachment deleted by admin]

  3. INSERT INTO jos_sections

    SELECT NULL AS autoinc_id, id, parent_id, section

    FROM learning.jos_sections AS learning.jos_sections

    LEFT JOIN jos_sections AS jos_sections ON learning.jos_sections.id = jos_sections.id

    WHERE jos_sections.id IS NULL

     

    The columns are id, parent_id, and sections.

     

    Interesting experiment! But I don't think it is going to work as it should (apart from my lack of knowledge) also because the Category and Section id in Joomla is somehow bound together and even when I manage to cut and paste the tables and manually change ids and the incremental value -  categories somehow get linked to the wrong section id.

     

    Just out of interest for yourselves this is the table structrue I copied from the sql dump:

     

    DROP TABLE IF EXISTS `jos_categories`;

    CREATE TABLE IF NOT EXISTS `jos_categories` (

      `id` int(11) NOT NULL auto_increment,

      `parent_id` int(11) NOT NULL default '0',

      `title` varchar(50) NOT NULL default '',

      `name` varchar(255) NOT NULL default '',

      `image` varchar(100) NOT NULL default '',

      `section` varchar(50) NOT NULL default '',

      `image_position` varchar(10) NOT NULL default '',

      `description` text NOT NULL,

      `published` tinyint(1) NOT NULL default '0',

      `checked_out` int(11) unsigned NOT NULL default '0',

      `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',

      `editor` varchar(50) default NULL,

      `ordering` int(11) NOT NULL default '0',

      `access` tinyint(3) unsigned NOT NULL default '0',

      `count` int(11) NOT NULL default '0',

      `params` text NOT NULL,

      PRIMARY KEY  (`id`),

      KEY `cat_idx` (`section`,`published`,`access`),

      KEY `idx_section` (`section`),

      KEY `idx_access` (`access`),

      KEY `idx_checkout` (`checked_out`)

    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=48 ;

     

    Typical data is :

     

    INSERT INTO `jos_categories` VALUES (13, 0, 'Copywriting services', 'Copywriting services', '', '4', 'left', '<br />\r\n', 1, 0, '0000-00-00 00:00:00', '', 2, 0, 0, '');

    INSERT INTO `jos_categories` VALUES (16, 0, 'Document Management Services', 'Document Management Services', '', '6', 'left', '<br />\r\n', 1, 0, '0000-00-00 00:00:00', '', 1, 0, 0, '');

     

    Soemtimes it is possible just to work directly on the exported sql file doing Find and Replace actions for example to replace a changed Path.

     

    I've started to redo it all manually! Not possible if I had hundreds or pages!

  4. got as far as this with errors:

     

    INSERT IGNORE INTO jos_sections

    SELECT NULL AS autoinc_id, field1, field2, field3

    FROM learning.jos_sections AS learning.jos_sections

    LEFT JOIN jos_sections AS jos_sections ON learning.jos_sections.field1 = jos_sections.field1

    WHERE jos_sections.id IS NULL

     

    Working in the Query window of phpmyAdmin the result is:

     

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.jos_sections

    LEFT JOIN jos_sections AS jos_sections ON learnin

     

     

    The Target database is called writers and the source is learning. the table names are identical - sections

    The problem I think is that the sections of the learning database will have the same ID numbers as the one I'm trying to import into.

     

    Someone else suggested:

     

    INSERT IGNORE INTO jos_sections

    SELECT *

    FROM learning.jos_sections

     

    That one runs but does not insert anything. The result message is:

     

    Inserted rows: 0 (Query took 0.0007 sec)SQL query:INSERT IGNORE INTO jos_sections

    SELECT *

    FROM learning.jos_sections

  5. Hello,

     

    phpMyAdmin - 2.8.2.4

    MySQL - 4.1.14-nt

     

    Using phpMyAdmin, I'm trying to merge sections, categories and content tables from one Joomla database into another. No matter how many variations I have tried I cannot find the one that simply merges and APPENDS the additional list of category names etc into the target database. I only manage to lose the original list of categories (Importing and Replacing) which I don't want to do! I'm not used to SQL scripts. Can't find a simple description anywhere.

     

    Thanks

  6. I have installed Slick RSS which I hoped might work with Mambo 4.6.1 here: http://the-bizness.co.uk/greenpolitics/

    As you can see I get:

    Fatal error: Call to undefined function: newsfeedencoding() in /home/thebizn/public_html/greenpolitics/modules/mod_slick_rss.php on line 138

    the line referred to is:

    $item_title = mosCommonHTML::newsfeedEncoding( $rssDoc, $item_title )

    So it looks promising but I don't know enough about the code to tweak it. It works in Joomla here:

    http://207.218.208.2/~thebizn/

    I am hoping a coder genius will be able to spot a possible option or two to try before I give up. I'm guessing that Mambo needs a slightly different call?

    Thanks
×
×
  • 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.