Store Cookie In Internal Cache
Re: Store Cookie In Internal Cache
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
ah sorry, i see
You run the script w\o HTTP_HOST parameter
what do you have in crontab?
You run the script w\o HTTP_HOST parameter
what do you have in crontab?
Don't forget to run script update
Re: Store Cookie In Internal Cache
Hi,
How do I check this for a site from the crontab?
How do I check this for a site from the crontab?
Re: Store Cookie In Internal Cache
hmm...
ok.
what do you have in crontab? at all
ok.
what do you have in crontab? at all
Don't forget to run script update
Re: Store Cookie In Internal Cache
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.
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
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
<?php
echo $_SERVER['HTTP_HOST'];
and run it using your command line to see if the variable gets passed
Don't forget to run script update
Re: Store Cookie In Internal Cache
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?
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
1. create file with a quoted code
2. run command line from crontab (replace cron.php with your filename)
2. run command line from crontab (replace cron.php with your filename)
Don't forget to run script update
Re: Store Cookie In Internal Cache
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,
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,