⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Unable to install GroceryCRUD



kryptos

kryptos
  • profile picture
  • Member

Posted 03 December 2012 - 00:37 AM

Hi all,
I'm just new on GroceryCRUD, I've been trying to install it into a project based on CodeIgniter 2.1.3, but I'm receiveing the following error:
[color=#000000][font='Times New Roman'][size=1][b][background=rgb(245, 121, 0)]Fatal error: Call to a member function table_exists() on a non-object in C:\xampp\htdocs\testproject\application\models\grocery_crud_model.php on line [/background][/b][/size][/font][/color][i]45[/i]

Which occurs when calling $this->grocery_crud->render();

[color=#000000][b]public[/b][/color] [color=#000000][b]function[/b][/color] employees[color=#66CC66]([/color][color=#66CC66])[/color]
[color=#66CC66]{[/color]
[color=#0000FF]$this[/color]->[color=#006600]grocery_crud[/color]->[color=#006600]set_table[/color][color=#66CC66]([/color][color=#FF0000]'employees'[/color][color=#66CC66])[/color];
[color=#0000FF]$output[/color] = [color=#0000FF]$this[/color]->[color=#006600]grocery_crud[/color]->[color=#006600]render[/color][color=#66CC66]([/color][color=#66CC66])[/color];

[color=#000066]echo[/color] [color=#FF0000]"<pre>"[/color];
[color=#000066]print_r[/color][color=#66CC66]([/color][color=#0000FF]$output[/color][color=#66CC66])[/color];
[color=#000066]echo[/color] [color=#FF0000]"</pre>"[/color];
[color=#000066]die[/color][color=#66CC66]([/color][color=#66CC66])[/color];
[color=#66CC66]}[/color]

I'm following this tutorial:
http://www.grocerycrud.com/documentation/create-crud-codeigniter-tutorial

The only difference I have is that I've set database and url helper to be autoloaded.

I'll appreciate any assistance!
Regards,
Daniel

Elgger

Elgger
  • profile picture
  • Member

Posted 06 February 2013 - 16:57 PM

I've got exactly the same error code, but I don't autoload database driver, neither the url helper.

 

My server info are :

Linux 3.2.0-37-generic-pae #58-Ubuntu SMP Thu Jan 24 15:51:02 UTC 2013 i686

Apache 2.2.22 (Ubuntu) API Version 20051115

PHP 5.3.10-1ubuntu3.5 with Suhosin Patch 0.9.10

Zend Engine v2.3.0 with Suhosin v0.9.33

AdoDB Enable


victor

victor
  • profile picture
  • Member

Posted 06 February 2013 - 17:19 PM

application/config/autoload.php

 

$autoload['libraries'] = array('database', 'session', 'form_validation');

$autoload['helper'] = array('url', 'file', 'form');


Elgger

Elgger
  • profile picture
  • Member

Posted 07 February 2013 - 19:25 PM

Tested with libraries and helper configured in autoload instead of in controler /model files => same error !

 

Fatal error: Call to a member function table_exists() on a non-object in  /var/www/ci/application/models/grocery_crud_model.php on line 45.

 

What are "exactly" the prerequisite for CI & grocery_crud (apache & php modules needs, virtual host or .htaccess, files acl, etc ...),

can we have a welcome page like in CakePHP whom test all the pre-requisite.


victor

victor
  • profile picture
  • Member

Posted 07 February 2013 - 20:11 PM

send me your projects I'll test it on my local machine.


Elgger

Elgger
  • profile picture
  • Member

Posted 15 February 2013 - 18:55 PM

Priviet Victor,

 

It wasn't yet a project, but only try to make run your example.

 

I finally fix my problem due to both apache virtual host, and php.ini configuration.

Some parameters are differents between a windows default install and a linux default install,

first is a developper install, when other is a product install with a much more restrictive config.

 

Now it run, and I can admire nice job of web-johnny & you, ! Thank's.

 

The only complaint that still is :

You're using JQuery in GroceryCRUD, why aren't you using JQuery UI class name for your DOM & CSS theming ?

This allow to use/switch to other theme more easily.


davidoster

davidoster
  • profile picture
  • Member

Posted 15 February 2013 - 21:39 PM

Priviet Victor,

 

It wasn't yet a project, but only try to make run your example.

 

I finally fix my problem due to both apache virtual host, and php.ini configuration.

Some parameters are differents between a windows default install and a linux default install,

first is a developper install, when other is a product install with a much more restrictive config.

 

Now it run, and I can admire nice job of web-johnny & you, ! Thank's.

 

The only complaint that still is :

You're using JQuery in GroceryCRUD, why aren't you using JQuery UI class name for your DOM & CSS theming ?

This allow to use/switch to other theme more easily.

 

How much more easier than this: $crud->set_theme('datatables')

http://www.grocerycrud.com/documentation/options_functions/set_theme