Community Forums

ATutor Bug Reports

Unable to access database error!


You must be signed-in to post.

AuthorSubject
 
Page: 1 | 2
tooniceted
Subject: Unable to access database error!Quote this post in your reply
Have the following error:

The following errors occurred:

ATutor was unable to access the database. Please report this to an Administrator with this date reference (05/30/2013 09:27:41 am)



Apache version 2.2.23
PHP version 5.2.17
MySQL version 5.5.23-55
Architecture x86_64
Operating system linux
Perl version 5.8.8
Kernel version 3.2.45

When I add a cache directory (http://www.*****.com/course/cache) and even giving it the permission of 777, I get the following error:

Cache directory does not exist or is not writable. Create it and set write permissions to make the directory writable by the system's Web server user. (e.g. chmod a+rwx cache)
Posted: 2013-05-30 10:33:12
tooniceted
Subject: Re: Unable to access database error!Quote this post in your reply
Sorry, trying to do a fresh install of ATutor 2.1.1

In reply to:
Have the following error:

The following errors occurred:

ATutor was unable to access the database. Please report this to an Administrator with this date reference (05/30/2013 09:27:41 am)

...

Posted: 2013-05-30 10:50:44
cindy

Avatar for cindy
Subject: Re: Unable to access database error!Quote this post in your reply
Which page does the error occur?
Posted: 2013-05-30 10:53:23
tooniceted
Subject: Re: Unable to access database error!Quote this post in your reply
Root page, just when going to the site
Posted: 2013-05-30 11:04:02
cindy

Avatar for cindy
Subject: Re: Unable to access database error!Quote this post in your reply
Try this:

1. clear the php error log file;
2. refresh the page that gave the error;
3. take a look in php error log, if you cannot find the sensible information to fix the issue yourself, attach it here.
Posted: 2013-05-30 11:18:46
tooniceted
Subject: Re: Unable to access database error!Quote this post in your reply
The error message appears on every page. I have deleted the original install and also the database. I have created a new database, another name altogether, and I still get that message. I am on a shared server and don't have access to clear the PHP cache but I presume it is a mute point since I did all of the above.
The database has been check and is good.

ATutor Version: 2.1.1 (Build date - 2013-05-30 10:48:19)
Operating System: Linux 3.2.45 #1 SMP Tue May 14 10:21:52 CDT 2013 x86_64
Web Server: Apache
PHP Version: 5.2.17
MySQL Version: 5.5.23-55
Posted: 2013-05-30 11:58:01
tooniceted
Subject: Re: Unable to access database error!Quote this post in your reply
Still haven't solved this issue. Any else out there that can help!frown
Posted: 2013-05-31 12:04:35
cindy

Avatar for cindy
Subject: Re: Unable to access database error!Quote this post in your reply
Without a more detailed error message, we cannot do much.

I'm not sure how much you know about php coding. The error comes out of this chunk of code:

https://github.com/atutor/ATutor/blob/master/include/lib/mysql_connect.inc.php#L65-111

Would you be able to trace down by yourself?
Posted: 2013-05-31 12:54:14
tooniceted
mysql_connect.inc.php
Subject: Re: Unable to access database error!Quote this post in your reply
If you are asking for help, provide lots of detail so problems can be reproduced.

Things to describe:
Operating system ATutor is installed on -
ATutor version -
Patch #s applied -
ATutor theme name -
PHP version -
MySQL version -
Webserver & version -
Copies of error messages -
Changes to default settings -
Web browser being used -
...and anything else relevant -
Posted: 2013-05-31 17:15:32
tooniceted
error_log
Subject: Re: Unable to access database error!Quote this post in your reply
Here is the error log
Posted: 2013-05-31 17:38:59
cindy

Avatar for cindy
Subject: Re: Unable to access database error!Quote this post in your reply
Thanks for providing the error log.

Is this ATutor upgraded from a lower version?

Do you have some add-on modules installed in the lower version but haven't been added in this upgraded one?
Posted: 2013-06-01 19:39:54
tooniceted
Subject: Re: Unable to access database error!Quote this post in your reply
No, clean install
Posted: 2013-06-02 19:26:59
cindy

Avatar for cindy
Subject: Re: Unable to access database error!Quote this post in your reply
In your php error log, there's this error:

[31-May-2013 16:14:22] Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='

Since I haven't been able to re-produce the issue, listing a couple of causes I could think of:

All atutor tables should be using "utf8_general_ci" collation, but it seems your system has a mix of "utf8_general_ci" and "utf8_unicode_ci". The mix could either be that some atutor tables are "utf8_unicode_ci", which I'm not sure how it could happen if you run thru the full installation process, or the collation of atutor tables are "utf8_general_ci" but the stored data somehow is "utf8_unicode_ci".

To check this, run these sql commands if you can login mysql via phpMysqlAdmin or command line:

1. show table status;
The "Collation" field of all records should be "utf8_general_ci". If any of those is "utf8_unicode_ci", alter it to "utf8_general_ci":

ALTER TABLE `my_database`.`table_name` DEFAULT COLLATE utf8_general_ci;
ALTER TABLE `my_database`.`table_name` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

2. show variables like 'colla%';
You should get these results:
+----------------------+-------------------+
| Variable_name | Value |
+----------------------+-------------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
+----------------------+-------------------+

If all above doesn't show traces of "utf8_unicode_ci", it means your table structures are with correct collation, which possibly implies the store data might be having "utf8_general_ci" collation. Make sure you are using the english language pack coming with the default installation rather than having one of your own or a downloaded old one.
Posted: 2013-06-04 10:19:34
tooniceted
Subject: Re: Unable to access database error!Quote this post in your reply
I like what I have read about your product but even after a clean install 10 times, no plugins, even upgraded to PHP 5.3, I still get the same error message.

Don't you guys care that some Canadians can't use your product even though the government is subsidizing you to create it????????
Posted: 2013-07-05 18:42:20
greg

Avatar for greg
Subject: Re: Unable to access database error!Quote this post in your reply
Seriously?!

In reply to:
Don't you guys care that some Canadians can't use your product even though the government is subsidizing you to create it????????

Posted: 2013-07-05 19:03:22
 
Page: 1 | 2

You must be signed-in to post.

Related Articles