php-windows Digest 12 Sep 2005 07:58:53 -0000 Issue 2769

Topics (messages 26309 through 26312):

Re: ASP to PHP
        26309 by: Mark Rees
        26310 by: cybermalandro cybermalandro
        26311 by: cybermalandro cybermalandro
        26312 by: Mark Rees

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Please reply to the list.

I still don't understand the problem. 

Anyway, you have this in your ASP file:

<input type="hidden" name="_VIEWSTATE"  value="1"/>

When you submit that form to the PHP file, you can retrieve the value with 
$_GET('_VIEWSTATE') or $_POST('_VIEWSTATE')

When you "go back" to the ASP page, what do you mean? Clicking "back" in the 
browser, following a link, or submitting a form?

Clicking "back" in the browser?

?

following a link

put variable in the querystring and retrieve it

or submitting a form?


send the variable back as a form input


  Yes, you were right on my logic. I fixed that but I went back to my original 
problem.  Here is the issue.  In the asp code an input type hidden variable is 
set as name="_VIEWSTATE" and the value is what in PHP is called as 
$_REQUEST["ESAuthCookie"].  Now the problem is that when I go from the asp page 
to the php page this value is reset in php so when I go back to the asp page 
and back to the php page I get an internal error because the _VIEWSTATE var is 
not the same in php as it is in asp. So  how can I go from asp page to the php 
page and maintain the same variable's value?

  Thanks for your help it is really appreciate it.




  On 9/9/05, Mark Rees <[EMAIL PROTECTED]> wrote:
    So I have I this problem. I have asp page that has a link to a PHP page,
    when I click on the link I get the PHP with no problems but if I click back
    to the asp page and click on the PHP page I get a HTTP 500 Internal server 
    error. If I hit the refresh button I get the php page again. The PHP page is
    a form when the form is submitted after the fresh reload an error "the
    directory name is invalid". Can anyone help me?
    --------------------- 
    I suspect there is a problem with the logic. It sounds like the PHP page is
    not expecting to be called twice from the same link. More details are
    required, perhaps including some code, for a better answer.

    --
    PHP Windows Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
Sorry for the confusion. I am going from and asp page to a php form via a 
link in the asp page. In order for the user to see the PHP page the variable 
_VIEWSTATE has to be set as input hidden type. This variable is actually a 
session variable. The thing is that this value should always be the same for 
all the pages whether it is asp or php but when I call the value in PHP it 
is not the same. Therefore, I can always see the page but if I go back and 
forth again from asp to PHP I get an error the second time.

Here is what is happening I click on a ASP page with a link to the PHP form. 
I see the PHP form with no problems. I submit the form and I see no problems 
either. if I click on a link from PHP or try to just browse back to the asp 
page I don't have a problem but If I try to go to the PHP form again from 
the ASP page this is when I get the internal error and the reason is because 
this _VIEWSTATE variable which is a session var is not the same for the 
second time I go to the PHP form. This variable should always stay the same 
if I got back and forth from PHP and ASP but I do not know how to maintain 
its state when I do so. I call this variable in PHP by echoing the 
$REQUEST["ESAuthCookie"] var therefore the second time I try to view this 
PHP form I get the error because it requests a new one which does not match 
the ASP one. Do I make any sense now? I apologize I am new at this.

Thanks again,

On 9/9/05, Mark Rees <[EMAIL PROTECTED]> wrote:
> 
> Please reply to the list.
> 
> I still don't understand the problem.
> 
> Anyway, you have this in your ASP file:
> 
> <input type="hidden" name="_VIEWSTATE" value="1"/>
> 
> When you submit that form to the PHP file, you can retrieve the value with 
> $_GET('_VIEWSTATE') or $_POST('_VIEWSTATE')
> 
> When you "go back" to the ASP page, what do you mean? Clicking "back" in 
> the browser, following a link, or submitting a form?
> 
> Clicking "back" in the browser?
> 
> ?
> 
> following a link
> 
> put variable in the querystring and retrieve it
> 
> or submitting a form?
> 
> 
> send the variable back as a form input
> 
> 
> Yes, you were right on my logic. I fixed that but I went back to my 
> original problem. Here is the issue. In the asp code an input type hidden 
> variable is set as name="_VIEWSTATE" and the value is what in PHP is called 
> as $_REQUEST["ESAuthCookie"]. Now the problem is that when I go from the asp 
> page to the php page this value is reset in php so when I go back to the asp 
> page and back to the php page I get an internal error because the _VIEWSTATE 
> var is not the same in php as it is in asp. So how can I go from asp page to 
> the php page and maintain the same variable's value?
> 
> Thanks for your help it is really appreciate it.
> 
> 
> 
> 
> On 9/9/05, Mark Rees <[EMAIL PROTECTED]> wrote:
> So I have I this problem. I have asp page that has a link to a PHP page,
> when I click on the link I get the PHP with no problems but if I click 
> back
> to the asp page and click on the PHP page I get a HTTP 500 Internal server
> error. If I hit the refresh button I get the php page again. The PHP page 
> is
> a form when the form is submitted after the fresh reload an error "the
> directory name is invalid". Can anyone help me?
> ---------------------
> I suspect there is a problem with the logic. It sounds like the PHP page 
> is
> not expecting to be called twice from the same link. More details are
> required, perhaps including some code, for a better answer.
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
>

--- End Message ---
--- Begin Message ---
I guess it would if it is needed by IIS. I get a page cannot be displayed 
message typical IIS crap.

On 9/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> To be honest, I can't see why a session variable should cause an
> Internal Error message.
> 
> Tryst
> 
> -----Original Message-----
> From: cybermalandro cybermalandro <[EMAIL PROTECTED]>
> To: Mark Rees <[EMAIL PROTECTED]>
> Cc: [email protected]
> Sent: Fri, 9 Sep 2005 11:58:30 -0500
> Subject: Re: [PHP-WIN] Re: ASP to PHP
> 
> Sorry for the confusion. I am going from and asp page to a php form
> via a
> link in the asp page. In order for the user to see the PHP page the
> variable
> _VIEWSTATE has to be set as input hidden type. This variable is
> actually a
> session variable. The thing is that this value should always be the
> same for
> all the pages whether it is asp or php but when I call the value in PHP
> it
> is not the same. Therefore, I can always see the page but if I go back
> and
> forth again from asp to PHP I get an error the second time.
> 
> Here is what is happening I click on a ASP page with a link to the PHP
> form.
> I see the PHP form with no problems. I submit the form and I see no
> problems
> either. if I click on a link from PHP or try to just browse back to the
> asp
> page I don't have a problem but If I try to go to the PHP form again
> from
> the ASP page this is when I get the internal error and the reason is
> because
> this _VIEWSTATE variable which is a session var is not the same for the
> second time I go to the PHP form. This variable should always stay the
> same
> if I got back and forth from PHP and ASP but I do not know how to
> maintain
> its state when I do so. I call this variable in PHP by echoing the
> $REQUEST["ESAuthCookie"] var therefore the second time I try to view
> this
> PHP form I get the error because it requests a new one which does not
> match
> the ASP one. Do I make any sense now? I apologize I am new at this.
> 
> Thanks again,
> 
> On 9/9/05, Mark Rees <[EMAIL PROTECTED]> wrote:
> >
> > Please reply to the list.
> >
> > I still don't understand the problem.
> >
> > Anyway, you have this in your ASP file:
> >
> > <input type="hidden" name="_VIEWSTATE" value="1"/>
> >
> > When you submit that form to the PHP file, you can retrieve the value
> with
> > $_GET('_VIEWSTATE') or $_POST('_VIEWSTATE')
> >
> > When you "go back" to the ASP page, what do you mean? Clicking "back"
> in
> > the browser, following a link, or submitting a form?
> >
> > Clicking "back" in the browser?
> >
> > ?
> >
> > following a link
> >
> > put variable in the querystring and retrieve it
> >
> > or submitting a form?
> >
> >
> > send the variable back as a form input
> >
> >
> > Yes, you were right on my logic. I fixed that but I went back to my
> > original problem. Here is the issue. In the asp code an input type
> hidden
> > variable is set as name="_VIEWSTATE" and the value is what in PHP is
> called
> > as $_REQUEST["ESAuthCookie"]. Now the problem is that when I go from
> the asp
> > page to the php page this value is reset in php so when I go back to
> the asp
> > page and back to the php page I get an internal error because the
> _VIEWSTATE
> > var is not the same in php as it is in asp. So how can I go from asp
> page to
> > the php page and maintain the same variable's value?
> >
> > Thanks for your help it is really appreciate it.
> >
> >
> >
> >
> > On 9/9/05, Mark Rees <[EMAIL PROTECTED]> wrote:
> > So I have I this problem. I have asp page that has a link to a PHP
> page,
> > when I click on the link I get the PHP with no problems but if I
> click
> > back
> > to the asp page and click on the PHP page I get a HTTP 500 Internal
> server
> > error. If I hit the refresh button I get the php page again. The PHP
> page
> > is
> > a form when the form is submitted after the fresh reload an error "the
> > directory name is invalid". Can anyone help me?
> > ---------------------
> > I suspect there is a problem with the logic. It sounds like the PHP
> page
> > is
> > not expecting to be called twice from the same link. More details are
> > required, perhaps including some code, for a better answer.
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >
> >
> 
> 
>

--- End Message ---
--- Begin Message ---
Hello

This doesn't make much sense, no. One minute it's a hidden form input on a
page which isn't  a form, then it's a session variable, then it's a cookie!

Your problem is that you have a variable which you need to pass from the ASP
to PHP page, isn't it? Ignoring what you are doing at the moment, there are
lots of options to do this.

The simplest way is to use a querystring variable, but this will get complex
if you need to pass it around various pages.

You can also use a cookie to do this, provided that both pages are in the
same domain. This is the best way to pass it around both domains without
rolling your own session manager.

You cannot use a session variable if you are using the built in session
management. in ASP and PHP.

Cheers

Mark

"cybermalandro cybermalandro" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Sorry for the confusion. I am going from and asp page to a php form via a
link in the asp page. In order for the user to see the PHP page the variable
_VIEWSTATE has to be set as input hidden type. This variable is actually a
session variable. The thing is that this value should always be the same for
all the pages whether it is asp or php but when I call the value in PHP it
is not the same. Therefore, I can always see the page but if I go back and
forth again from asp to PHP I get an error the second time.

Here is what is happening I click on a ASP page with a link to the PHP form.
I see the PHP form with no problems. I submit the form and I see no problems
either. if I click on a link from PHP or try to just browse back to the asp
page I don't have a problem but If I try to go to the PHP form again from
the ASP page this is when I get the internal error and the reason is because
this _VIEWSTATE variable which is a session var is not the same for the
second time I go to the PHP form. This variable should always stay the same
if I got back and forth from PHP and ASP but I do not know how to maintain
its state when I do so. I call this variable in PHP by echoing the
$REQUEST["ESAuthCookie"] var therefore the second time I try to view this
PHP form I get the error because it requests a new one which does not match
the ASP one. Do I make any sense now? I apologize I am new at this.

Thanks again,

--- End Message ---

Reply via email to