Welcome Guest, Not a member yet? Register   Sign In
base_url & cli mode
#1

(This post was last modified: 10-23-2015, 04:25 AM by scion.)

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)
Reply




Theme © iAndrew 2016 - Forum software by © MyBB