Page 2 of 2

Re: Cron error [solved]

Posted: Tue Aug 09, 2016 5:40 am
by bitfreak
Like I said, you don't need to add your IP address anymore, the server_name() function should automatically get your IP address if there is no domain name.

Re: Cron error [solved]

Posted: Tue Aug 09, 2016 6:53 am
by krang
uhh I missed that part sorry, I will check it.

Re: Cron error [solved]

Posted: Tue Aug 09, 2016 7:51 am
by bitfreak
Ok I believe I've tracked down the cause of the cron job problem which I originally thought was a permission error. After finding an error log in the cron folder it looks like the issue may have actually been with the ticker_update.php file. The config file was being included before the library files, so the server_name() call in the config file was failing. The problem should be easily fixable by including the library files before the config files. I will include a fix in the next version of BitShop but for now the solution is to open up the ticker_update.php file and replace lines 3 to 5 with these 3 lines:

Code removed: download latest version of BitShop to fix this issue.

Re: Cron error [solved]

Posted: Tue Aug 09, 2016 8:06 am
by bitfreak
You know what I just realized that adding that server_name() call in the config file was probably a very bad idea. It will probably cause a lot of errors on servers without a host name. For some reason when a script is called via a cron job it doesn't seem to know about the host name but it does in all other situations if one exists, so the fix I gave above will work but it's not a great solution. I'd rather not have any config files rely on any library functions so I'll have to fix it some other way.

Re: Cron error [solved]

Posted: Wed Aug 10, 2016 5:40 am
by bitfreak
New version of BitShop has been released, it should fix the cron job issue and automatically get the IP of a server without a host name.

Re: Cron error [solved]

Posted: Wed Aug 10, 2016 9:13 am
by krang
Works perfect. Thank you.