Fatal error: Call to a member function GetRow() on a non-object

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
Peter Bradley
New Member
New Member
Posts: 5
Joined: Mon Jun 09, 2008 11:02 am

Fatal error: Call to a member function GetRow() on a non-object

Post by Peter Bradley »

When I run the installation for 1.3 I get the error message “Fatal error: Call to a member function GetRow() on a non-object in C:\wamp\www\KS\cmsmadesimple\lib\classes\class.contentoperations.inc.php on line 354”

My setup is Apache 2.2.28, PHP 5.2.6 and MySQL 5.0.51b. I see (from forum posts) that at least one other person has had the same problem, but with 1.2.4. Suggestions please.

Thanks.
pb
Forum Members
Forum Members
Posts: 27
Joined: Sun Jun 01, 2008 8:41 pm

Re: Fatal error: Call to a member function GetRow() on a non-object

Post by pb »

354 is this:

$row = &$db->GetRow($query);

GetRow is a member of adodb, seems adodb is not loaded or no database connection.
Peter Bradley
New Member
New Member
Posts: 5
Joined: Mon Jun 09, 2008 11:02 am

Re: Fatal error: Call to a member function GetRow() on a non-object

Post by Peter Bradley »

I've used the same connection details successfully for several other cmsms installations without any problems. I've checked the details umpteen times and I can't see anything wrong with them. Surely there's a "proper" installation error message if it can't make a db connection using the details I've typed in.

I've tried it choosing MySQL for the db type and also MySQL (4.1+), but the result is the same - that error message.
Pierre M.

Re: Fatal error: Call to a member function GetRow() on a non-object

Post by Pierre M. »

Hello,

broken download ? broken explode of tar.gz ? broken copy to wamp location ? hence broken adodb install ?

or something with the database ? can you connect to it with another soft like phpmyadmin ?

Pierre M.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Fatal error: Call to a member function GetRow() on a non-object

Post by calguy1000 »

also, check your httpd error log for warnings and notices.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Peter Bradley
New Member
New Member
Posts: 5
Joined: Mon Jun 09, 2008 11:02 am

Re: Fatal error: Call to a member function GetRow() on a non-object

Post by Peter Bradley »

Everything else that I'm running under WAMP (using the same db connection details) works fine. I tried to install 1.2.4 and got exactly the same error message, so it's obviously not a 1.3 issue.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Fatal error: Call to a member function GetRow() on a non-object

Post by calguy1000 »

Okay, I just started testing the installer and encountered this probllem.

It took a while to chase down, but for me, it only happened when
a) I had extra modules (other than core modules) installed in the modules folder
b) one of those modules tried to access the database in its constructor or in
    methods called from the constructor.

(Calendar was the first culprit I found, but I'm sure there are more).

My temporary workaround was to add a line that would tell the installer to only install system modules.

Here's the diff to install/lib/classes/CMSInstellerPage5.class.php

Code: Select all

Index: CMSInstallerPage5.class.php
===================================================================
--- CMSInstallerPage5.class.php (revision 4091)
+++ CMSInstallerPage5.class.php (revision 4600)
@@ -175,6 +175,9 @@

                        foreach ($gCms->modules as $modulename=>$value)
                        {
+                         // only deal with system modules
+                         if( !in_array($modulename,$gCms->cmssystemmodules) ) continue;
+
                                if ($gCms->modules[$modulename]['object']->AllowAutoInstall() == true)
                                {
                                $query = "SELECT * FROM ".cms_db_prefix()."modules WHERE module_name = ?";
Side note:  This output generated by svn diff.... how can somebody call himself a programmer if he doesn't know basic tools like source code management, and diff, and how to play nice with others.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Pierre M.

Re: Fatal error: Call to a member function GetRow() on a non-object

Post by Pierre M. »

Side side note that may please Ted : Giggle http://developer.imendio.com/projects/giggle
Pierre
Locked

Return to “[locked] Installation, Setup and Upgrade”