ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Error at top of all pages


  • 2014-05-13 12:37:04

    Error at top of all pages

    If you are asking for help, provide lots of detail so problems can be reproduced.

    Things to describe:
    Operating system ATutor is installed on - CentOS 6.5
    ATutor version - 2.1
    Patch #s applied - all patches
    ATutor theme name - ATutor 1.5 default
    PHP version - 5.4.28
    MySQL version - 5.5.33
    Webserver & version - Apache 2.2.26
    Copies of error messages -
    Changes to default settings -
    Web browser being used -

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home2/fka66/public_html/lmsa/include/lib/output.inc.php on line 300

    This error is at the top of all pages. Has just recently appeared. No changes other than Hostgator upgraded to php 5.4.28 recently. Is this the cause?

    How can it be fixed?

    Thanks.

    ...Dave

  • 2014-05-13 12:54:06

    Re: Error at top of all pages

    The upgrade to PHP 5.4 could be the problem. Support for this version of PHP was added in ATutor 2.1.1. You might upgrade ATutor, or revert back to a version of PHP 5.3 if you have that option.

  • 2014-05-13 15:24:07

    Re: Error at top of all pages

    I uploaded a zip file of the 2.11 version and unzipped it on hostgator, copied over my config file and logged in as admin.

    I get the following error on the admin pages: [ AT_ERROR_DB_QUERY ]

    I can see all my defaults and courses so it appears to be talking to the database.

    Any thoughts on the cause of this... have I missed doing something?

    Thanks,

    ...Dave

  • 2014-05-13 17:56:04

    Re: Error at top of all pages

    Normally you would not copy over the config file. That's done automatically by the upgrade script.

    Follow the upgrade instructions:
    http://www.atutor.ca/atutor/docs/installation.php#upgrade

    There will have been database changes that the upgrader need to add to your db.

  • 2014-05-13 17:58:23

    Re: Error at top of all pages

    Message from: dburniston
    Subject: Re: Error at top of all pages
    Message: It was pointed out that I didn't need to copy the config file... I was sure I read to do that!

    Put back the original file and got the upgrade. Everything went through fine... no flags.

    Went to login page and got error Atutor was unable to access the database, but I can login and see the data from the database in the admin area (site name is ok, courses are there).

  • 2014-05-13 18:14:52

    Re: Error at top of all pages

    [Sorry for the last few SPAMs]

    Are you able to access your system's php error log to see if there's anything there. It will generally show a failed foreach() that follows where the database failed to connect.

    You can also enable writing to log any queries run when a page loads. In include/lib/mysql_connect.inc.php, remove the slashes from the following line to uncomment it

    [php]
    //error_log(print_r($sql, true), 0);
    [/php]

    Make sure you comment those lines out again once you're done debugging, or your error log will grow very quickly.

  • 2014-05-14 13:57:09

    Re: Error at top of all pages

    I did notice this error in the admin/error_log

    [14-May-2014 18:53:49] Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='

    I'm waiting to hear back from Hostgator about php errors.

    If I uncomment as above, does it go to the admin/error_log?

    ...Dave

  • 2014-05-20 11:29:58

    Re: Error at top of all pages

    Hostgator is only seeing the utf8 errors. They tried to change the database to fix it but the problem still happens so they put the database back the way it was.

    Is there some way I can clean this up and see if it is causing the problem?

    ...Dave

  • 2014-05-20 14:33:32

    Re: Error at top of all pages

    phpmyadmin shows that all tables are utf8_unicode_ci except for AT_language_text which is showing as utf8_general_ci

    I can't see where it is coming from. If I export the data and view it, the create table for AT_language_text looks like:

    [php]CREATE TABLE IF NOT EXISTS `AT_languages` (
    `language_code` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `char_set` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `direction` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `reg_exp` varchar(124) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `native_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `english_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `status` tinyint(3) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`language_code`,`char_set`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;[/php]

  • 2014-05-20 14:58:05

    Re: Error at top of all pages

    I tried a complete fresh install and ended up with teh same problem.

    Using phpMyAdmin, I was able to reset the table to use utf8_unicode_ci and the error has gone away. So far things appear to be working again.

    ...Dave