Page 2 of 6
Re: Store Cookie In Internal Cache
Posted: Tue Dec 18, 2018 8:19 pm
by admin
did you try to run update ?
Re: Store Cookie In Internal Cache
Posted: Tue Dec 18, 2018 9:07 pm
by tubeman
Yes I ran upgrade a few times in the week, does running upgrade cause this to show up in php logs?
Re: Store Cookie In Internal Cache
Posted: Wed Dec 19, 2018 5:52 am
by admin
ah sorry, i see
You run the script w\o HTTP_HOST parameter
what do you have in crontab?
Re: Store Cookie In Internal Cache
Posted: Wed Dec 19, 2018 9:58 am
by tubeman
Hi,
How do I check this for a site from the crontab?
Re: Store Cookie In Internal Cache
Posted: Wed Dec 19, 2018 10:08 am
by admin
hmm...
ok.
what do you have in crontab? at all
Re: Store Cookie In Internal Cache
Posted: Wed Dec 19, 2018 10:24 am
by tubeman
Hi,
I have crons for sites setup on the server for example like this:
echo -e "domain.com_cron\t$(date +'%Y-%m-%d %H:%M:%S')" >> /var/log/1mincrons.sh.log
cd /home/httpd/html/domain.com/public_html/scj/bin; env HTTP_HOST=domain.com /usr/local/bin/php -q cron.php
echo -e "domain.com_rotation\t$(date +'%Y-%m-%d %H:%M:%S')" >> /var/log/1mincrons.sh.log
cd /home/httpd/html/domain.com/public_html/scj/bin; env HTTP_HOST=domain.com /usr/local/bin/php -q rotation.php
Because of high load caused by script, they set it like that, also one thing, the original path to php on the server is
/usr/local/php5.6-fpm/bin/php
and they have made a symlink to /usr/local/bin/php
Any idea why HTTP_HOST would not get passed? The crons itself are running fine when I check in the script, no errors in the script or cron.log, rotation is also happening. Please let me know. Thanks.
Re: Store Cookie In Internal Cache
Posted: Wed Dec 19, 2018 10:35 am
by admin
I don't know but you can do like
<?php
echo $_SERVER['HTTP_HOST'];
and run it using your command line to see if the variable gets passed
Re: Store Cookie In Internal Cache
Posted: Wed Dec 19, 2018 10:40 am
by tubeman
Hi,
Thanks, can you give me exact steps of how do I test this. Like do I need to create a file with
<?php
echo $_SERVER['HTTP_HOST'];
What commands do I run exactly to test this from SSH?
Re: Store Cookie In Internal Cache
Posted: Wed Dec 19, 2018 10:45 am
by admin
1. create file with a quoted code
2. run command line from crontab (replace cron.php with your filename)
Re: Store Cookie In Internal Cache
Posted: Wed Dec 19, 2018 12:33 pm
by tubeman
Hi,
So I created file 1.php in scj bin folder with this
<?php
echo $_SERVER['HTTP_HOST'];
?>
then in the bin folder I run
-bash-4.2$ env HTTP_HOST=domain.com /usr/local/bin/php -q 1.php
And Next Line I get this:
domain.com-bash-4.2$
Does this mean HTTP_HOST is fine and variable was passed?
Regards,