⚠ 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

installation above root



ben
  • profile picture
  • Member

Posted 29 October 2012 - 06:18 AM

hi, i've installed the CI above root.
what do i need to configure to get the grocery crud running?

I tried this way but nothing display on page when going through your installation steps:

codeigniter
- application
- assets
- system

pls advise, thanks.

regards

victor
  • profile picture
  • Member

Posted 29 October 2012 - 07:09 AM

[i]Hello ,Ben and welcome to the forum. [/i]
[i]What version of CI and Grocerycrud are you using?[/i]
http://www.grocerycr...er_installation

ben
  • profile picture
  • Member

Posted 29 October 2012 - 08:04 AM

Hi Victor,
CodeIgniter 2.1.3
Grocery CRUD 1.3.2

I'm following this tutorial:
http://www.grocerycrud.com/documentation/create-crud-codeigniter-tutorial
where i can see the output : [color="#ff0000"]Welcome to the world of Codeigniter[/color]

Step 4 is ok for creating the employees table and inserting the data.
Step 5, if i interpret correctly, my install directory is ok.
Step 6, encountered problem, cannot see output, IE error message:

URL: http://localhost/main/employees

The website cannot display the page
Most likely causes:
â– The website is under maintenance.
â– The website has a programming error.

Pls note that I've edited the file /libraries/grocery_crud
protected $default_language_path = '../codeigniter/assets/grocery_crud/languages';
protected $default_config_path = '../codeigniter/assets/grocery_crud/config';
protected $default_assets_path = '../codeigniter/assets/grocery_crud';

Am i missing anything? Thanks for your guidance.

ben
  • profile picture
  • Member

Posted 29 October 2012 - 09:12 AM

Hi Victor,

everything is still the same as above except now, i see a "blank" page.

The html code on this blank page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>

victor
  • profile picture
  • Member

Posted 29 October 2012 - 10:30 AM

show please controller's code.

ben
  • profile picture
  • Member

Posted 30 October 2012 - 00:13 AM


<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends CI_Controller {

function __construct()
{
parent::__construct();

$this->load->database();
$this->load->helper('url');

$this->load->library('grocery_CRUD');
}

public function index()
{
echo "<h1>Welcome to the world of Codeigniter</h1>";//Just an example to ensure that we get into the function
die();
}

public function employees()
{
$this->grocery_crud->set_table('employees');
$output = $this->grocery_crud->render();
$this->_example_output($output);
}
function _example_output($output = null)
{
$this->load->view('our_template.php', $output);
}
}

/* End of file main.php */
/* Location: ./application/controllers/main.php */

victor
  • profile picture
  • Member

Posted 30 October 2012 - 08:29 AM

show full structure of folders

ben
  • profile picture
  • Member

Posted 30 October 2012 - 08:45 AM

Dear Victor,
I've removed all folders and reinstall both programs as below:
localhost/ci/application
localhost/ci/system
localhost/ci/assets

I got an error and modify the libraries/grocery_crud.php as follows:

protected $default_language_path = 'ci/assets/grocery_crud/languages';
protected $default_config_path = 'ci/assets/grocery_crud/config';
protected $default_assets_path = 'ci/assets/grocery_crud';


Then it works.

i want to send you an error image file but couldn't find the button here to upload it.
Anyway, the image shows I'm able to see the data display now but it is in plain data state, no images, no table sorting, no css makeup....
It seems to me that maybe the javascript or css is not working correctly.
I view the code in the browser:

<link type="text/css" rel="stylesheet" href="http://localhost/ci/assets/grocery_crud/themes/flexigrid/css/flexigrid.css" />
<script src="http://localhost/ci/assets/grocery_crud/js/jquery-1.8.1.min.js"></script>
<script src="http://localhost/ci/assets/grocery_crud/themes/flexigrid/js/cookies.js"></script>
<script src="http://localhost/ci/assets/grocery_crud/themes/flexigrid/js/flexigrid.js"></script>
<script src="http://localhost/ci/assets/grocery_crud/themes/flexigrid/js/jquery.form.js"></script>
<script src="http://localhost/ci/assets/grocery_crud/themes/flexigrid/js/jquery.numeric.js"></script>
<script src="http://localhost/ci/assets/grocery_crud/themes/flexigrid/js/jquery.printElement.min.js"></script>


It seems that browser had load the javascript and css but the output is not saying so.
Had i miss something?

victor
  • profile picture
  • Member

Posted 30 October 2012 - 08:53 AM

Click "more reply options" near button "post" , and you will have the button of uploading file

ben
  • profile picture
  • Member

Posted 30 October 2012 - 09:01 AM

here's the image

victor
  • profile picture
  • Member

Posted 30 October 2012 - 09:07 AM

is your "index.php" in localhost and is application in localhost/ci?

localhost/
index.php
ci/
app
assest
system

victor
  • profile picture
  • Member

Posted 30 October 2012 - 09:32 AM

if you have structure as I wrote to you :

$config['base_url'] = 'http://localhost/';



protected $default_language_path = 'ci/assets/grocery_crud/languages';
protected $default_config_path = 'ci/assets/grocery_crud/config';
protected $default_assets_path = 'ci/assets/grocery_crud';

victor
  • profile picture
  • Member

Posted 30 October 2012 - 10:04 AM

it works perfectly for me with this settings and structure:

localhost/
index.php
ci/
app
assest
system

ben
  • profile picture
  • Member

Posted 31 October 2012 - 01:00 AM

yes, my structure is the same as yours:

localhost/index.php
localhost/ci/application/
localhost/ci/assets/
localhost/ci/system/

and i've modified the application/config.php
$config['base_url'] = '[color="#0f72da"]http://localhost/';[/color]

also confirm the setting in libraries/grocery_crud.php:
protected $default_language_path = 'ci/assets/grocery_crud/languages';
protected $default_config_path = 'ci/assets/grocery_crud/config';
protected $default_assets_path = 'ci/assets/grocery_crud';

But i get the same result as the image i send you earlier?!!

victor
  • profile picture
  • Member

Posted 31 October 2012 - 06:27 AM

because js and css not loaded!
click to link:
http://localhost/ci/assets/grocery_crud/themes/flexigrid/css/flexigrid.css
what are you see?

victor
  • profile picture
  • Member

Posted 31 October 2012 - 06:40 AM

if you will click to link http://localhost/ci/assets/grocery_crud/themes/flexigrid/css/flexigrid.css you should to see same css code in browser.
You have problems with directory path.

ben
  • profile picture
  • Member

Posted 31 October 2012 - 07:01 AM

yes, it is working now, thanks for your patience.
Now i can continue the tutorials, cheers :)