Intranet Journal

Go Back   IT Management Forum > Intranet Journal

Intranet Journal The new discussion forum for Intranet Journal readers. Leave comments and questions for IJ authors. Suggest story ideas and provide feedback.

Reply
 
LinkBack Thread Tools Rating: Thread Rating: 8 votes, 5.00 average. Display Modes
  #1 (permalink)  
Old 11-21-2004, 07:44 AM
Crimson Crimson is offline
Member
 
Join Date: Nov 2004
Posts: 1
CMS problem (login.php)

Fatal error: Call to undefined function: getnumrows() in /home/path/to/phpsite/site/files/Sentry.php on line 65

I have the correct path, I just changed it here because I'm paranoid .

Well I found the line, and as far as I know it IS defined but I'm new to PHP so any help would be great!
Reply With Quote
  #2 (permalink)  
Old 12-08-2004, 12:07 PM
kwgray kwgray is offline
Registered User
 
Join Date: Dec 2004
Location: Central Valley, CA
Posts: 9
PHP is case sensititve, so check your call to getnumrows() and insure it is the same as defined in DBConnector.php.

$loginConnector->getNumRows($getUser)
is how it is called in the tutorial.

You may be calling it like this in Sentry.php:
$loginConnector->getnumrows($getUser)
Reply With Quote
  #3 (permalink)  
Old 01-28-2005, 12:42 PM
dougd847 dougd847 is offline
Registered User
 
Join Date: Jan 2005
Posts: 2
Fatal error: Call to undefined function: getnumrows() in /home/thunde2/public_html/doug/test/includes/Sentry.php on line 65

I checked to make sure that the code is casesensitive in the sentry.php is the same that is in the tutorial.

Why does getnumrows() appear lower lowercase on the error page and is getNumRows?

kwgray you mentioned about insuring the same as defined in DBConnector.php. Maybe that is where my problem is, what do you i have to have defined in that file that I can check.

Everything else is working awesome from the cms tutorial except for the login page.
Reply With Quote
  #4 (permalink)  
Old 01-29-2005, 01:52 PM
dougd847 dougd847 is offline
Registered User
 
Join Date: Jan 2005
Posts: 2
I figured it out!!! The whole system works now.

The problem was that the getnumrow() function didn't exist in the sentry.php file in order to execute it. so I added the following code in the sentry.php file and that fixed the problem:


function getNumRows($result){
return mysql_num_rows($result);
}


I also added GetQuery() function which was also missing from the sentry.php as well.

function getQuery() {
return $this->theQuery;
}



Last edited by dougd847; 02-08-2005 at 01:39 AM.
Reply With Quote
  #5 (permalink)  
Old 02-04-2005, 07:05 PM
Awes Awes is offline
Member
 
Join Date: Feb 2005
Posts: 1
Quote:
Originally posted by dougd847
I figured it out!!! The whole system works now.
It would be nice if you said how you figured it out so people searching for topics wouldn'y waist their time!
Reply With Quote
  #6 (permalink)  
Old 02-06-2005, 07:56 PM
Azzaka Azzaka is offline
Member
 
Join Date: Feb 2005
Posts: 1
PHP Code:
Old Code :
        
//*** Function: query, Purpose: Execute a database query ***
        
function query($query) {
        
$this->theQuery = $query;
        return
mysql_query($query, $this->link);
        }

        
//*** Function: fetchArray, Purpose: Get array of query results ***
        
function fetchArray($result) {
        return
mysql_fetch_array($result);
        }

        
//*** Function: close, Purpose: Close the connection ***
        
function close() {
        
mysql_close($this->link);
        }

//************************************************
//      New Code:
//
//*************************************************

//*** Function: query, Purpose: Execute a database query ***
function query($query) {
        
$this->theQuery = $query;
        return
mysql_query($query, $this->link);
}

//*** Function: getQuery, Purpose: Returns the last database query, for debugging ***
function getQuery() {
        return
$this->theQuery;
}

//*** Function: getNumRows, Purpose: Return row count, MySQL version ***
function getNumRows($result){
        return
mysql_num_rows($result);
}

//*** Function: fetchArray, Purpose: Get array of query results ***
function fetchArray($result) {
        return
mysql_fetch_array($result);
}

//*** Function: close, Purpose: Close the connection ***
function close() {
        
mysql_close($this->link);
}
as you can see from this, we need to add more code in to define the sql argument. I overlooked this and I am sure alot of others have to.

Hope this helps.
Reply With Quote
  #7 (permalink)  
Old 12-08-2009, 06:25 PM
q5host q5host is offline
Registered User
 
Join Date: Dec 2009
Posts: 5
Dats not Sentry.php but DbConnector.php u have added 2 lines to this file not sentry coz I have checked sentry and there Is no such code lyk here. When I`m addind this It`s redirecting me 2 failed.php so I dunno wot 2 do next
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 09:24 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0