EllisLab text mark
Advanced Search
     
¿scaffolding Error?
Posted: 13 November 2007 12:11 AM   [ Ignore ]
Joined: 2007-11-12
2 posts

Hi everybody ,i’m newbie in this forum and also in codeigniter framework, sorry if my ask is stupid, but, to day i create my first page with the last version CodeIgniter_1.5.4, but when access to scaffolding for my table “typeplayer” to url:

http://localhost/soccer/index.php/player/scaffolding

The page is ok, but to try add a record to my table, the links create is the same url more index.php/player/scaffolding/add

http://localhost/soccer/index.php/player/index.php/player/scaffolding/add

and throws error: 404 Page Not Found

but I try with http://localhost/soccer/index.php/player/scaffolding/add

I see the form to my table but the error continue with the others actions.

My class here:

class Player extends Controller{
 
  function Player(){
      parent :: Controller();
      $this->load->scaffolding(‘typeplayer’);
  }
}

sorry my english, Tnks!,

 
Posted: 13 November 2007 02:07 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-27
198 posts

this double index.php problem happens when you specify your system folder absolutly in your index.php…
(system…=”/this/that/system”
the path should be relative: “../this/that/system”

I guess thats the problem…

 
Posted: 14 November 2007 11:08 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2007-11-14
4 posts

which means:
modify config.php
and put:
$config[‘index_page’] = “../”;

However my solution (on ubuntu) is the following:
config.php:

$config[‘base_url’]  = “http://localhost/CodeIgniter/index.php/”;
$config[‘index_page’] = “”;

Consider that I have unpacked CodeIgniter in /var/www/CodeIgniter/ so that I have:
/var/www/CodeIgniter/system/
/var/www/CodeIgniter/index.php

 
Posted: 16 November 2007 04:12 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2007-11-16
1 posts

These fixes did not work for me. Using the second fix I was able to get to create a new record, however after that I would be redirected to a different page and the record would not be inserted. To fix this I did the following:

$config[‘base_url’] = “http://www.your-web-site.com/”;

$config[‘index_page’] = “index.php”;

this is also in your config.php

That fixed it for me. Hopefully you will meet success as well.

 
Posted: 17 November 2007 08:52 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2007-11-12
2 posts

Tnks to everybody! I did my base_url in the config.php and scaffolding is ok.