Re: Trouble Setting Cookies

2010-08-16 Thread Gregory Lypny
Hi Andre and Jeff,

Thank you for testing my site.  I think the location of PUT NEW HEADER or PUT 
HEADER in relation ?> or other PUT statements is, as you have mentioned, be the 
issue, although I can't say that I understand it yet.  It may be why I have not 
been able to get Andre or John Craig's cookie functions to work when I load 
them from separate script files using .

The following stripped down handler works.  I just got it a few minutes ago.

" & the long date && the long time) in 
thePage
put thePage

?>

If you like, you can test it by going to

http://pareto.on-rev.com/setcookie.irev

and clicking the Set Cookie button.  Click through the pages and you should 
come to one that displays a cookie named myCookie and whose value is the 
seconds.

Man, what a headache!  It would be nice if some of our Rev web pros could 
document the use of cookies using the most basic example possible along with 
all of the important qualifiers.

Regards,

Gregory
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Trouble Setting Cookies

2010-08-15 Thread Andre Garzia
Jeff,

If I remember correctly it can be used after some other put but not after
the first ?> sign, the first ?> is what triggers the start of the output
process by that time, all the put headers need to be in the output queue.

:D

On Sun, Aug 15, 2010 at 9:11 PM, Jeff Massung  wrote:

> Just in case it hasn't been mentioned already (I haven't really been
> following the thread closely), put header has to be used before *any* other
> put commands.
>
> Jeff M.
>
> On Sun, Aug 15, 2010 at 6:35 PM, Andre Garzia 
> wrote:
>
> > > Go to  http://pareto.on-rev.com/setcookie.irev
> > >
> > > This page has a one-button form that sets a cookie by calling a script
> > > called sSetCookie.irev.  The cookie's name is testCookie and it's value
> > is
> > > 666.  Here is the script.
> > >
> > >  > > put "Set-Cookie:" && "testCookie" & "=" & 666 & ";path=/" into
> theCookie
> > > put new header theCookie
> > >
> > > put url ("file:cookieResult.html") into thePage
> > >
> > > put "Done."  && the long date && the long time into theMessage
> > > replace "{message}" with theMessage in thePage
> > > put thePage
> > > ?>
> > >
> >
> > Gregory,
> >
> > The POST operation is not setting the cookie. As you can see here:
> >
> >  http://andregarzia.com/shots/Cookie_Result-20100815-203217.jpg
> >
> > The set-cookie header is not coming thru. Try loosing the path part, it
> > might be confusing the browser.
> >
> > Tricky tricky tricky.
> >
> > :-/
> >
> > (PS: also try put header instead of put new header)
> >
> >
> >
> > --
> > http://www.andregarzia.com All We Do Is Code.
> > ___
> > use-revolution mailing list
> > use-revolution@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
> >
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Trouble Setting Cookies

2010-08-15 Thread Jeff Massung
Just in case it hasn't been mentioned already (I haven't really been
following the thread closely), put header has to be used before *any* other
put commands.

Jeff M.

On Sun, Aug 15, 2010 at 6:35 PM, Andre Garzia  wrote:

> > Go to  http://pareto.on-rev.com/setcookie.irev
> >
> > This page has a one-button form that sets a cookie by calling a script
> > called sSetCookie.irev.  The cookie's name is testCookie and it's value
> is
> > 666.  Here is the script.
> >
> >  > put "Set-Cookie:" && "testCookie" & "=" & 666 & ";path=/" into theCookie
> > put new header theCookie
> >
> > put url ("file:cookieResult.html") into thePage
> >
> > put "Done."  && the long date && the long time into theMessage
> > replace "{message}" with theMessage in thePage
> > put thePage
> > ?>
> >
>
> Gregory,
>
> The POST operation is not setting the cookie. As you can see here:
>
>  http://andregarzia.com/shots/Cookie_Result-20100815-203217.jpg
>
> The set-cookie header is not coming thru. Try loosing the path part, it
> might be confusing the browser.
>
> Tricky tricky tricky.
>
> :-/
>
> (PS: also try put header instead of put new header)
>
>
>
> --
> http://www.andregarzia.com All We Do Is Code.
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Trouble Setting Cookies

2010-08-15 Thread Andre Garzia
> Go to  http://pareto.on-rev.com/setcookie.irev
>
> This page has a one-button form that sets a cookie by calling a script
> called sSetCookie.irev.  The cookie's name is testCookie and it's value is
> 666.  Here is the script.
>
>  put "Set-Cookie:" && "testCookie" & "=" & 666 & ";path=/" into theCookie
> put new header theCookie
>
> put url ("file:cookieResult.html") into thePage
>
> put "Done."  && the long date && the long time into theMessage
> replace "{message}" with theMessage in thePage
> put thePage
> ?>
>

Gregory,

The POST operation is not setting the cookie. As you can see here:

  http://andregarzia.com/shots/Cookie_Result-20100815-203217.jpg

The set-cookie header is not coming thru. Try loosing the path part, it
might be confusing the browser.

Tricky tricky tricky.

:-/

(PS: also try put header instead of put new header)



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Trouble Setting Cookies

2010-08-14 Thread Gregory Lypny
Thank you, Andre,

That's very kind of you.


Go to  http://pareto.on-rev.com/setcookie.irev

This page has a one-button form that sets a cookie by calling a script called 
sSetCookie.irev.  The cookie's name is testCookie and it's value is 666.  Here 
is the script.



Clicking the button takes you to

http://pareto.on-rev.com/sSetCookie.irev  -- (cookieResult.html)

This is the page you will land on if the script in 1 above ran.  It has a 
button that will load another page that calls a script to show what you what 
cookies you have from the on-rev server.  The page uses an include statement in 
an HTML object to invoke the following script:




Thanks again for having a look,

Gregory




On Sat, Aug 14, 2010, at 1:00 PM, use-revolution-requ...@lists.runrev.com wrote:

> Message: 6
> Date: Fri, 13 Aug 2010 20:18:50 -0300
> From: Andre Garzia 
> Subject: Re: Trouble Setting Cookies
> To: How to use Revolution 
> Message-ID:
>   
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Gregory,
> 
> If possible, send me the url for the offending page, let me look at the
> headers. cookies are annoying believe me.
> 
> For example, I think you might need a space between the colon and the cookie
> key name...
> 
> (an && instead of &)
> 
> Andre

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Trouble Setting Cookies

2010-08-13 Thread Andre Garzia
Gregory,

If possible, send me the url for the offending page, let me look at the
headers. cookies are annoying believe me.

For example, I think you might need a space between the colon and the cookie
key name...

(an && instead of &)

Andre

On Fri, Aug 13, 2010 at 6:08 PM, Gregory Lypny
wrote:

> Hi Andre,
>
> Thanks for responding.
>
> I'm afraid I'm not familiar with curl.  I installed FireBug but I'm not
> clear on how to use it.  I'm not an experienced web developer.  My server is
> On-Rev.
>
> This afternoon I tried something even simpler than before and that is a
> Submit button that executes this script:
>
>  put new header "Set-Cookie: " & "myCookie" & "=" & 666 & ";path=/"
> put "Done."  && the long date && the long time into thePage
> put thePage
> ?>
>
> On a page called "test.irev", I have an HTML object that executes the
> following (via "include") when the page is loaded:
>
>  put $_SERVER["HTTP_COOKIE"] into theCookies
> put theCookies
> ?>
>
> Once again "myCookie" is not among the cookies shown on "test.irev" when
> that page is visited after setting the cookie.
>
> I checked my error log at On_Rev and found the following.  I don't
> understand why is says that the file "test.irev" does not exist when the
> page was, in fact, loaded!
>
> [Fri Aug 13 15:54:14 2010] [error] [client myIP] File does not exist:
> /home/myDomain/public_html/404.shtml, referer:
> http://myDomain.on-rev.com/test.irev
> [Fri Aug 13 15:54:14 2010] [error] [client myIP] File does not exist:
> /home/myDomain/public_html/favicon.ico, referer:
> http://myDomain.on-rev.com/test.irev
>
> I'm getting the sinking feeling that I should be looking at alternatives to
> cookies for managing sessions with my users.
>
> Regards,
>
> Gregory
>
>
>
>
> On Fri, Aug 13, 2010, at 1:00 PM, Andre wrote:
>
> > Gregory,
> >
> > Can you do a curl to your host and glue the answer? We need to check if
> the
> > Set-Cookies headers are actually comming thru.
> >
> > Andre
> > PS: Using firebug to inspect the request is also ok.
> >
> > On Thu, Aug 12, 2010 at 5:59 PM, Gregory Lypny
> > wrote:
> >
> >> Hello everyone,
> >>
> >> Having trouble setting my first cookies at On-Rev.  My iRev script pulls
> in
> >> a page template and puts it into a variable called thePage.  thePage
> starts
> >> with the usual stuff, such as
> >>
> >>  >> http://www.w3.org/TR/html4/loose.dtd";>
> >> 
> >> 
> >> 
> >> Sign In
> >>
> >> My feeble understanding of setting cookies is that I must send off the
> >> request before I load the page, so I created a simple cookie like this
> >>
> >>   put "myCookie=" into theCookie
> >>   put  after theCookie
> >>
> >> I then sent if off with
> >>
> >>   put new header ("Set-Cookie:" && theCookie)
> >>
> >> and then immediately followed with
> >>
> >>   put thePage
> >>
> >> But the cookie does not appear in Safari's cookie listing or by checking
> >> $_SERVER["HTTP_COOKIE"].  The latter, however, gives me two cookies set
> by .
> >> revolutionss.com, which presumably has something to do with my On-Rev
> >> account.
> >>
> >> I also tried Andre Garzia's function
> >>
> >>   setCookie "myCookie",
> >>
> >> but struck out there too.  What am I doing wrong?
> >>
> >> Regards,
> >>
> >> Gregory
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Trouble Setting Cookies

2010-08-13 Thread Gregory Lypny
Hi Andre,

Thanks for responding.

I'm afraid I'm not familiar with curl.  I installed FireBug but I'm not clear 
on how to use it.  I'm not an experienced web developer.  My server is On-Rev.  

This afternoon I tried something even simpler than before and that is a Submit 
button that executes this script:



On a page called "test.irev", I have an HTML object that executes the following 
(via "include") when the page is loaded:



Once again "myCookie" is not among the cookies shown on "test.irev" when that 
page is visited after setting the cookie.

I checked my error log at On_Rev and found the following.  I don't understand 
why is says that the file "test.irev" does not exist when the page was, in 
fact, loaded!

[Fri Aug 13 15:54:14 2010] [error] [client myIP] File does not exist: 
/home/myDomain/public_html/404.shtml, referer: 
http://myDomain.on-rev.com/test.irev
[Fri Aug 13 15:54:14 2010] [error] [client myIP] File does not exist: 
/home/myDomain/public_html/favicon.ico, referer: 
http://myDomain.on-rev.com/test.irev

I'm getting the sinking feeling that I should be looking at alternatives to 
cookies for managing sessions with my users.

Regards,

Gregory




On Fri, Aug 13, 2010, at 1:00 PM, Andre wrote:

> Gregory,
> 
> Can you do a curl to your host and glue the answer? We need to check if the
> Set-Cookies headers are actually comming thru.
> 
> Andre
> PS: Using firebug to inspect the request is also ok.
> 
> On Thu, Aug 12, 2010 at 5:59 PM, Gregory Lypny
> wrote:
> 
>> Hello everyone,
>> 
>> Having trouble setting my first cookies at On-Rev.  My iRev script pulls in
>> a page template and puts it into a variable called thePage.  thePage starts
>> with the usual stuff, such as
>> 
>> > http://www.w3.org/TR/html4/loose.dtd";>
>> 
>> 
>> 
>> Sign In
>> 
>> My feeble understanding of setting cookies is that I must send off the
>> request before I load the page, so I created a simple cookie like this
>> 
>>   put "myCookie=" into theCookie
>>   put  after theCookie
>> 
>> I then sent if off with
>> 
>>   put new header ("Set-Cookie:" && theCookie)
>> 
>> and then immediately followed with
>> 
>>   put thePage
>> 
>> But the cookie does not appear in Safari's cookie listing or by checking
>> $_SERVER["HTTP_COOKIE"].  The latter, however, gives me two cookies set by .
>> revolutionss.com, which presumably has something to do with my On-Rev
>> account.
>> 
>> I also tried Andre Garzia's function
>> 
>>   setCookie "myCookie",
>> 
>> but struck out there too.  What am I doing wrong?
>> 
>> Regards,
>> 
>> Gregory

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Trouble Setting Cookies

2010-08-12 Thread Andre Garzia
Gregory,

Can you do a curl to your host and glue the answer? We need to check if the
Set-Cookies headers are actually comming thru.

Andre
PS: Using firebug to inspect the request is also ok.

On Thu, Aug 12, 2010 at 5:59 PM, Gregory Lypny
wrote:

> Hello everyone,
>
> Having trouble setting my first cookies at On-Rev.  My iRev script pulls in
> a page template and puts it into a variable called thePage.  thePage starts
> with the usual stuff, such as
>
>  http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> Sign In
>
> My feeble understanding of setting cookies is that I must send off the
> request before I load the page, so I created a simple cookie like this
>
>put "myCookie=" into theCookie
>put  after theCookie
>
> I then sent if off with
>
>put new header ("Set-Cookie:" && theCookie)
>
> and then immediately followed with
>
>put thePage
>
> But the cookie does not appear in Safari's cookie listing or by checking
> $_SERVER["HTTP_COOKIE"].  The latter, however, gives me two cookies set by .
> revolutionss.com, which presumably has something to do with my On-Rev
> account.
>
> I also tried Andre Garzia's function
>
>setCookie "myCookie",
>
> but struck out there too.  What am I doing wrong?
>
> Regards,
>
> Gregory
>
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Trouble Setting Cookies

2010-08-12 Thread Gregory Lypny
Hello everyone,

Having trouble setting my first cookies at On-Rev.  My iRev script pulls in a 
page template and puts it into a variable called thePage.  thePage starts with 
the usual stuff, such as

http://www.w3.org/TR/html4/loose.dtd";>



Sign In

My feeble understanding of setting cookies is that I must send off the request 
before I load the page, so I created a simple cookie like this

put "myCookie=" into theCookie
put  after theCookie

I then sent if off with

put new header ("Set-Cookie:" && theCookie)

and then immediately followed with

put thePage

But the cookie does not appear in Safari's cookie listing or by checking 
$_SERVER["HTTP_COOKIE"].  The latter, however, gives me two cookies set by 
.revolutionss.com, which presumably has something to do with my On-Rev account.

I also tried Andre Garzia's function

setCookie "myCookie",

but struck out there too.  What am I doing wrong?

Regards,

Gregory


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution