marcoslavorato - 05 March 2009 08:00 PM
Hi for all. I am tryibg to do work the boostrapper but I have a problem. When I execute by cronjob (code) in output it shows the 404 error. Why? The controller name and the function (code 2) is correct.
In my config file (code 3) I omit the index.php - maybe this is the problem?
/usr/bin/php -q /home/domain.com/html/cron/cron.php --run=/paginas_controller/gerador
/home/webadmin/domain.com/html/index.php
$config['index_page'] = "";
I had this same problem this morning. The problem is (in my case) that CI thinks ‘—run=’ is part of the URI and when it validates it in the router (/system/core/Router.php) it throws it out.
In the _validate_request method, I included the following code after the segment count statement at the beginning of the method:
if($segments[0] == '--run=')
{
$resegment = array();
for($i=1;$i<count($segments);$i++)
{
$resegment[] = $segments[$i];
}
$segments = $resegment;
}