Cron error [solved]

Look here if you're having trouble with BitShop
User avatar
bitfreak
Site Admin
Posts: 98
Joined: Thu Dec 10, 2015 6:57 pm
Location: Australia
Contact:

Re: Cron error [solved]

Post 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.
User avatar
krang
Posts: 28
Joined: Mon Dec 14, 2015 10:27 am
Location: Dimension X
Contact:

Re: Cron error [solved]

Post by krang »

uhh I missed that part sorry, I will check it.
User avatar
bitfreak
Site Admin
Posts: 98
Joined: Thu Dec 10, 2015 6:57 pm
Location: Australia
Contact:

Re: Cron error [solved]

Post 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.
User avatar
bitfreak
Site Admin
Posts: 98
Joined: Thu Dec 10, 2015 6:57 pm
Location: Australia
Contact:

Re: Cron error [solved]

Post 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.
User avatar
bitfreak
Site Admin
Posts: 98
Joined: Thu Dec 10, 2015 6:57 pm
Location: Australia
Contact:

Re: Cron error [solved]

Post 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.
User avatar
krang
Posts: 28
Joined: Mon Dec 14, 2015 10:27 am
Location: Dimension X
Contact:

Re: Cron error [solved]

Post by krang »

Works perfect. Thank you.
Post Reply