Page 1 of 1
Cookie Contents: works local, but not Live.
Posted: Fri Sep 09, 2011 7:48 am
by simonmlewis
Code: Select all
$cookietype = $_COOKIE['type'];
echo "$cookietype";
When I run this locallly, it works and displays "administrator".
When I run it on a live server, even tho the page I am click from displays "administrator" at the top (using the same code), this popup php page will not do it.
It's insane.
Re: Cookie Contents: works local, but not Live.
Posted: Fri Sep 09, 2011 8:35 am
by ok
Where do you set the cookie? Please post a more compete source code.
Try to clean all the cookies and cache in your browser, restart it and try again.
Re: Cookie Contents: works local, but not Live.
Posted: Fri Sep 09, 2011 9:42 am
by simonmlewis
It sets the cookie in a login script.
I am looking at a page with various functions, and at the top it says "Logout administrator". 'administrator' comes from the cookie.
So I know the page I am coming FROM is happy that it's administrator.
I click on this:
Code: Select all
<a href='http://www.domain.co.uk/admincheck.php?status=closed&web=$web' onclick=\"window.open('http://www.domain.co.uk/admincheck.php?status=closed&web=$web','popup','width=400,height=700,scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false\">
$num_fin closed cons</a>
And the popup appears, and on the live web server, it just won't accept it as Administrator.
Yet locally, it works a treat. Locally I have to just the full LOCAL/ URL.
Re: Cookie Contents: works local, but not Live.
Posted: Fri Sep 09, 2011 9:46 am
by ok
Do the two pages come from the same domain? If not, for which domain the cookie is set.
Re: Cookie Contents: works local, but not Live.
Posted: Fri Sep 09, 2011 9:47 am
by simonmlewis
Yes, same full domain. That's why it's so confusing.
Re: Cookie Contents: works local, but not Live.
Posted: Fri Sep 09, 2011 9:49 am
by ok
Can you please post the lines in which you setup the cookie?