cancel
Showing results for 
Search instead for 
Did you mean: 

POST problems fixed?

bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

POST problems fixed?

Afternoon guys,
As per the FAQ here.
[quote author="CGI FAQ"]11) My webforms have stopped working
If you have a webform that is reliant on the POST method then you may find that it has stopped working. This is due to way that certain URLs are rewritten on our filesystem and causes problems where the $PHP_SELF or $_SERVER['PHP_SELF'] variables are in use. You'll find more detail about this here. We're hoping to fix this however in the meantime you can use $_SERVER['SCRIPT_URL'] in place of $PHP_SELF or $_SERVER['PHP_SELF'], which should resolve the issue.
After a bit of work, we think this might be fixed now so I'd much appreciated it if those having problems could have a play around with things and let me know how they get on?

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

4 REPLIES 4
jaguarXK120
Newbie
Posts: 6
Registered: ‎15-03-2010

Re: POST problems fixed?

Bob
A Timely post.  If this is slightly OT I apologise.  I'm doing something I've not done before namely setting up a contact form on a website for my son in law.  I'm testing the code using my website www,jdcarea1.org hosted in my web space.  The form posts fine and I receive the information but REDIRECT is not working. 
I've used the generic script posted here elswhere , modifying the form code to point to it.  However I get a generic redirect page rather than the formatted page I specified.
Having seen references to redirect not working in other topics what is the current state of play?
Thanks for any help
David. 
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: POST problems fixed?

Quote from: Bob
[quote author="CGI FAQ"]11) My webforms have stopped working
If you have a webform that is reliant on the POST method then you may find that it has stopped working. This is due to way that certain URLs are rewritten on our filesystem and causes problems where the $PHP_SELF or $_SERVER['PHP_SELF'] variables are in use.…

After a bit of work, we think this might be fixed now so I'd much appreciated it if those having problems could have a play around with things and let me know how they get on?

Using $_SERVER['PHP_SELF'] does work now, though /~username appears in the URL shown in the browser address window after form submission - perhaps not what users would like to happen.
David
David
jaguarXK120
Newbie
Posts: 6
Registered: ‎15-03-2010

Re: POST problems fixed?

Quote
Bob
A Timely post.  If this is slightly OT I apologise.  I'm doing something I've not done before namely setting up a contact form on a website for my son in law.  I'm testing the code using my website www,jdcarea1.org hosted in my web space.  The form posts fine and I receive the information but REDIRECT is not working. 
I've used the generic script posted here elswhere , modifying the form code to point to it.  However I get a generic redirect page rather than the formatted page I specified.
Having seen references to redirect not working in other topics what is the current state of play?
Thanks for any help

Bob
Ignor my drivel above. Just proving my numpty status Embarrassed
The word is syntax not Syntax -  Heh Ho, I've fixed it any way Smiley
Thanks
 
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: POST problems fixed?

I like it.  Smiley There's a neat bit of scripting behind that fix. The /~username in the url isn't ideal, particularly with a hosted domain, but an unfixed trailing slash does the same. The fix restores functionality, giving users the chance to fix any rogue variables while a site works rather than while it doesn't.
Gabe