Community Forums

Development Forum

Call to a member function addError() on a non-object in mysql_connect.inc.php on


You must be signed-in to post.

AuthorSubject
 
Page: 1
ALMARSOLA
Subject: Call to a member function addError() on a non-object in mysql_connect.inc.php onQuote 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 - WIN8 (local machine) / LINUX (website server)
ATutor version - 2.2
Patch #s applied -
ATutor theme name - Atutor 1.5
PHP version - 4.0.10.7
MySQL version - 5.5.40-cll - MySQL Community Server (GPL)
Webserver & version -
Copies of error messages - Fatal error: Call to a member function addError() on a non-object in /home/sbknetbr/public_html/TIM_ATutor/include/lib/mysql_connect.inc.php on line 215
Web browser being used - FIREFOX / CHROME

-------------------------------------------------------
Hello

I did the installation of ATutor in a local database (using EasyPHP) and it worked perfectly. I made some adjustments and registrations, all OK.
I Export a local MySQL database, to import on the remote MYSQL. The export/import worked perfectly.
I copied the whole "ATutor" folder of the local machine to the remote machine.

I made the settings in the file: 'include\config.inc.php'

define ('DB_USER', 'myuser');
define ('DB_PASSWORD', 'mypassword');
define ('DB_HOST', 'localhost');
define ('DB_PORT', '3306');
define ('DB_NAME', 'sbknetbr_aTutor'); (exactly how apears in my website)

I comment this line:
// Define ('AT_CONTENT_DIR', 'C: \\ Program Files (x86) \\ EasyPHP-DevServer-14.1VC11 \\ \\ \\ projects \\ date localweb ATutor-2.2 \\ \\ ATutor content \\\\ ');

And include this line:
define ('AT_CONTENT_DIR', 'content/');

But when I run the ATutor on my website, the following error occurs:

Fatal error: Call to a member function addError () on a non-object in /home/sbknetbr/public_html/TIM_ATutor/include/lib/mysql_connect.inc.php on line 215

What might be happening?

Why it works in Local Website, but does not work in the Remote machine website?

Thanks

Andre Marsola
Posted: 2015-03-02 14:24:41
greg

Avatar for greg
Subject: Re: Call to a member function addError() on a non-object in mysql_connect.inc.php onQuote this post in your reply
Your version of PHP is too old. See the requirements at:
www.atutor.ca/atutor/docs/requirements.php

The path to the content directory needs to be the full path. The preferred system is Linux with the Apache Webserver. It should run on windows though, though for production Linux is recommended.

You should also avoid editing the config.inc.php file, particularly on Windows, which has a habit of inserting foriegn characters. Or, be sure your editor is set to use UNIX eneds of line instead of windows end of lines. There will be a setting in your text editor.
Posted: 2015-03-02 17:44:37
ALMARSOLA
Subject: Re: Call to a member function addError() on a non-object in mysql_connect.inc.php onQuote this post in your reply
Good Morning

You said "Your version of PHP is too old".

But, this is my Server Information:

Item Detail
-------------------------------------
Hosting Package.: rave01linux-i
Server Name.....: svr7
cPanel Version..: 11.46.2 (build 4)
Theme...........: paper_lantern
Apache Version..: 2.2.27
PHP Version.....: 5.3.27 ( IS NOT TOO OLD )
MySQL Version...: 5.5.40-cll
Architecture....: x86_64
Operating System: linux
Path to Sendmail: /usr/sbin/sendmail
Path to Perl....: /usr/bin/perl
Perl Version....: 5.10.1
Kernel Version..: 2.6.32-431.20.3.el6.centos.plus.x86_64

And my editor is PHPStorm from JetBrains, a realy good editor.

What can i do ?

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

Things to describe:
Operating system ATutor is installed on - WIN8 (local machine) / LINUX (website server)
...

Posted: 2015-03-03 07:00:15
greg

Avatar for greg
Subject: Re: Call to a member function addError() on a non-object in mysql_connect.inc.php onQuote this post in your reply
You did say your php version is 4.0.10. Its important to be accurate when asking for help.

The problem is likely the result of moving the local installation to the server file-by-file. This is very likely to produce broken files, which may result in seemingly random errors. You should zip together your local version and upload the one file then unzip, or start with a fresh install on the server, and perhaps copy the local database to the server and reset the config values to use the copied database.
Posted: 2015-03-03 09:09:15
 
Page: 1

You must be signed-in to post.

Related Articles