Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-07-20 16:32:52

brian.zerangue
Member
Registered: 2005-02-15
Posts: 62

Re: zem_contact, Thank You Re-direct problems in PHP5

i’ll use this one…

header(“HTTP/1.x 301 Moved Permanently”);
header(“Status: 301”);
header(“Location: ”.$url);
header(“Connection: close”);

that way, i can re-use it on other servers.

Offline

#14 2005-08-15 18:06:31

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: zem_contact, Thank You Re-direct problems in PHP5

I’m in the same boat here, I get the 200 OK … issue too. I’m on TextDrive server. Here’s the relevant plugin snippet that worked fine before I upgraded to rc5 (and again to TxP 4)…

<pre>if ($r) { $_POST = array(); header(“Location: http://wion.com/contact/thanks-for-your-inquiry”); }
</pre>

I tried using this (based on the previous post)…

<pre>if ($r) { $_POST = array(); header(“HTTP/1.x 301 Moved Permanently”); header(“Status: 301”); header(“Location: http://wion.com/contact/thanks-for-your-inquiry”.$url); header(“Connection: close”); }
</pre>

…but that just causes the following error at the top of my contact page…

<pre>Parse error:
parse error, unexpected T_STRING in /home/housewion/public_html/textpattern/lib/txplib_misc.php(429) :
eval()’d code on line 63

The above errors were caused by the plugin:zem_contact</pre>

When I comment out…

<pre>“header(“Status: 200 OK”);”</pre>

…in the <code>publish.php</code> file, as Sencer indicated earlier in this thread, it works. However, how is that going to intefere (if at all) with with other TxP functionality, I mean it was added for reason, right? The other issue is now I will have to remember to comment-out the header in the <code>publish.php</code> file each time I run SVN (if I’m not mistaken), so handling it in the plugin code would be preferable. Am I using those headers for the plugin incorrectly?

ATTENTION: I have fixed the quotes in the code above to reflect Sencer’s comment below, in case anyone tries to copy/paste my code like I did Brian’s.

Last edited by Destry (2005-08-15 18:28:27)

Offline

#15 2005-08-15 18:11:09

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: zem_contact, Thank You Re-direct problems in PHP5

You are using the wrong quotes. You should be using plain old ", not the slanted ones.

Offline

#16 2005-08-15 18:19:17

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: zem_contact, Thank You Re-direct problems in PHP5

Bingo. Thanks Sencer. I was copying/pasting code…but I copied from the wrong post ;)
Never would have crossed my mind about the quotes.

ATTENTION: I have fixed the quotes in my previous post to reflect Sencer’s comment above, in case anyone tries to copy/paste my code like I did Brian’s, it’s now safe.

Last edited by Destry (2005-08-15 18:27:45)

Offline

Board footer

Powered by FluxBB