CodeIgniter Forums

Full Version: base_url & cli mode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi! I found interesting thing when using cli for cron jobs in CI

If I not set base_url in config file -> $config['base_url'] = '';

Then I tried run cron job via CLI -> /usr/bin/php-cli /home/*site_name*/public_html/index.php cron publish_posts

where cron is a controller and publish_posts is a method, so there in controller called from CLI interface

in site_url or base_url always http://localhost !

Did anybody face with this kind of problem? (fast solution - always fill base url in config your app)