Welcome Guest, Not a member yet? Register   Sign In
Autoload error


I have an autoload error : Unable to load the requested file: helpers/html_helper.php

Actually I changed some file disposition :

My system folder :


And application folder :


I have in my index.php :

if ($_SERVER['REMOTE_ADDR'] == '')
    define ('LOCAL', true);
    define ('LOCAL', false);
$path = (LOCAL)?'C:\wamp\www\librairies\codeigniter':'/usr/home/v1076';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

$system_folder = "/system";
CI seems to working fine, I have welcome message, but when I put some autoload stuff like :
$autoload['libraries'] = array('database', 'parser');
$autoload['helper'] = array('html', 'url');

I have the error. I notice CI looking for theses files on application/helpers folder and not system folder...

Do you know what is wrong ?

Thanks Smile !

CI doesn't need an include path, so you can get rid of that.

What does your docroot look like? Are those two paths relative to your docroot? Or to something else? Where is your index.php in that stucture?

In general, when you change the directory structure of a CodeIgniter installation, set the system- and applications folder in index.php to a full path, instead of a relative path, to avoid issues like this.

If I dont put include_path I have error :
Warning: require_once(/system/codeigniter/CodeIgniter.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\francebay\whooper\index.php on line 121

Fatal error: require_once() [function.require]: Failed opening required '/system/codeigniter/CodeIgniter.php' (include_path='.;C:\php5\pear;') in C:\wamp\www\francebay\whooper\index.php on line 121

There is a screen of my folder disposition : http://yfrog.com/9efoldersp

index.php :
$system_folder = "/system";
$application_folder = "application";
//i tryed
$application_folder = "../../francebay/whooper/application";
//same error

So it should be
$system_folder = "/wamp/www/libraries/codeigniter/system";
// or
$system_folder = "../../libraries/codeigniter/system";
// paths are relative to the location of index.php!
$application_folder = "application";

That also means that your URL is http://website/francebay/whooper/index.php. Make sure you have a rewritebase in your .htaccess, if you need to rewrite the URL to get rid of the index.php part.

Ok Thanks for indication,

actually it was

$system_folder = "C:\wamp\www\librairies\codeigniter\system";

//and removing this :

if (strpos($system_folder, '/') === FALSE)
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder);

I guess on production it will be /usr/home/v1076/libraries/codeigniter/system or something like that, you were right, include path is useless Wink

thanks and bye Smile

So the driveletter is required?

I have no Windows experience (who wants to use that as a production server?), but it's good to know.

Yep, windows is entertainment Wink I like it for dev :p

Theme © iAndrew 2016 - Forum software by © MyBB