Store Cookie In Internal Cache

admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Store Cookie In Internal Cache

Post by admin »

did you try to run update ?
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Store Cookie In Internal Cache

Post by tubeman »

Yes I ran upgrade a few times in the week, does running upgrade cause this to show up in php logs?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Store Cookie In Internal Cache

Post by admin »

ah sorry, i see

You run the script w\o HTTP_HOST parameter

what do you have in crontab?
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Store Cookie In Internal Cache

Post by tubeman »

Hi,
How do I check this for a site from the crontab?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Store Cookie In Internal Cache

Post by admin »

hmm...
ok.

what do you have in crontab? at all
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Store Cookie In Internal Cache

Post 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.
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Store Cookie In Internal Cache

Post 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
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Store Cookie In Internal Cache

Post 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?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Store Cookie In Internal Cache

Post by admin »

1. create file with a quoted code

2. run command line from crontab (replace cron.php with your filename)
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Store Cookie In Internal Cache

Post 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,
Post Reply