Welcome Guest, Not a member yet? Register   Sign In
SOLVED --- Godaddy Codeigniter error: function num_rows() on a non-object
#1

[eluser]yannyannyann[/eluser]
Hi guys,

I have a site running locally.

I uploaded to a godaddy server, and now I can't make it work:

Fatal error: Call to a member function num_rows() on a non-object in /home/content/s/p/a/spaceagenda/html/app/models/type_model.php on line 74

Line 74 of the model is this :

Code:
72 if ($id!="") $this->db->where('id',$id);            
72 $this->db->orderby("label ASC");        
73 $query = $this->db->get($this->table);    
74 if( $query->num_rows()!=0) {

I have PHP 5.2.8 on godaddy server.
Could it be the version of PHP of CodeIgniter (I work with CI 1.7.2) ?

I have tried many things, as I had trouble with htaccess as well.
So here is my config:


Code:
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";

Code:
# Options
Options -Multiviews
Options +FollowSymLinks

#Enable mod rewrite
RewriteEngine On
#the location of the root of your site
#if writing for subdirectories, you would enter /subdirectory
RewriteBase /

#Removes access to CodeIgniter system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^sys.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

#This last condition enables access to the images and css
#folders, and the robots.txt file
RewriteCond $1 !^(index\.php|img|robots\.txt|css)

RewriteRule ^(.*)$ index.php?/$1 [L]




I am really lost, it has been a couple of hours that i have been on this without any success...

I looked into the loading of the database library, but it seems to be fine.





it is solved ... it was a problem of the mysql deamon that wasnt launched on the hosting side Sad


Messages In This Thread
SOLVED --- Godaddy Codeigniter error: function num_rows() on a non-object - by El Forum - 12-07-2009, 11:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB