rojobs.co.uk

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

Fatal error: Call to a member function fetch_assoc() on a non-object in /homepages/11/d329577265/htdocs/rojobs_site/_includes/class.JobberSettings.php on line 23

Dear all,

I have the above error when I launch www.rojobs.co.uk and the following information on my config.envs.php

// live (http://www.rojobs.co.uk/)
$__instances['live'] = array(
    'prefix' => 'rojobs.co.uk',
    'db_host' => 'db2974.oneandone.co.uk',
    'db_port' => 3306,
    'db_user' => 'username',
    'db_password' => 'xxxxxx',
    'db_name' => 'dataname',
    'db_prefix' => '',
    'app_url' => 'http://www.rojobs.co.uk/rojobs_site/',
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'On',
    'location' => 'online',
    'environment' => 'prod',
    'rewrite_mode' => 'apache_mod_rewrite'
);

I uploaded all the files from public folder to 'rojobs_site' folder.
My hosting provider is oneandone.co.uk.

rojobs_site is the main directory for the rojobs.co.uk domain.

I read many posts and I made a lot of changes to the config.envs file but still not working.

Thank you very much indeed.

links

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

Hi,

Your app_url should be just 'http://www.rojobs.co.uk/', you don't have to specify the folder, so:

Code:
'app_url' => 'http://www.rojobs.co.uk/',

This is definitely a problem, but not quite sure if it will fix your error. Please let us know if you apply the fix and if the error occures after that.

rojobs.co.uk

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

Hello,

Thank you very much for the answer.

I changed the app_url, but still the same error.

Fatal error: Call to a member function fetch_assoc() on a non-object in /homepages/11/d329577265/htdocs/rojobs_site/_includes/class.JobberSettings.php on line 23

links

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

You can try changing environment from prod to dev in $__instances['live'] so that you have the following line

Code:
'environment' => 'dev',

This should give you a more detailed error message, I hope.

hobo

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

Hi,
From jobberbase wiki:
"Requirements
Before proceeding, make sure you have PHP 5+ and MySQL 4.1+ installed on your server. Also, Apache modulemod_rewrite has to be enabled and overriding default settings with .htaccess needs to be allowed.

If you are 100% sure that your server meets the requirements then you can skip the following lines and go directly to the first step, else please read on." ... http://wiki.jobberbase.com/install/guid … quirements

... check your mysql version.

Last edited by hobo (2011-01-09 20:30:14)

rojobs.co.uk

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

Dear all,

I have changed the environment from prod to dev:
'environment' => 'dev',
I got a more detailed error:

Fatal error: Uncaught exception 'QueryException' with message 'Table 'db353222694.settings' doesn't exist' in /homepages/11/d329577265/htdocs/rojobs_site/_includes/class.Db.php:34 Stack trace: #0 /homepages/11/d329577265/htdocs/rojobs_site/_includes/class.JobberSettings.php(19): Db->query('SELECT * FROM s...') #1 /homepages/11/d329577265/htdocs/rojobs_site/_config/config.php(76): JobberSettings->__construct() #2 /homepages/11/d329577265/htdocs/rojobs_site/index.php(16): require_once('/homepages/11/d...') #3 {main} thrown in /homepages/11/d329577265/htdocs/rojobs_site/_includes/class.Db.php on line 34

My phpinfo.php file is and I have PHP 5+, but I don't know how to check my MYSQL version.

My .htaccess in the main directory rojobs_site is the following:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

RewriteEngine on
Options +FollowSymlinks

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
RewriteBase /

ErrorDocument 404 /page-unavailable/

<files ~ "\.tpl$">
order deny,allow
allow from none
deny from all
</files>

And .htaccess from admin folder is the following:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

RewriteEngine on
Options +FollowSymlinks

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
RewriteBase /admin/

ErrorDocument 404 /page-unavailable/

links

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

Hi,

From the errors, it seems you haven't imported the .sql file via phpmyadmin, you just created the database. So you have to go into phpmyadmin and select the DB you created, and import the .sql script found in the 'db' folder from the original jobberbase .zip.

rojobs.co.uk

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

Yes its working now.

Thank you very much. The sql file had a problem.