Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-21 16:26:14

redneck
Member
From: Costa Mesa, CA
Registered: 2004-08-14
Posts: 37
Website

"Service Temporarily Unavailable" when changing template: curl code!

My site is working fine right now, except this morning when I attempted to change the template and hit SAVE I received the following message:

“Service Temporarily Unavailable

“The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”

Since everything else seems to be working fine, I though it might have something to do with POST, but I can write and edit articles okay. I seem only to get this problem when I attempt to edit the template page.

I am with Dreamhost. According to their very good web support dashboard, there’s no problem of which they were aware with my site.

Txp diagnostics say “All checks passed!” The server is Linux/Apache.

I know this is probably a hosting problem, but before I escalate with Dreamhost I wanted to check here to see if this was a known issue. I searched the forums and couldn’t find anything.

I am using Textpattern version 4.0.4 (r1956).

Last edited by redneck (2007-02-21 18:48:17)

Offline

#2 2007-02-21 16:56:47

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

Re: "Service Temporarily Unavailable" when changing template: curl code!

Is the error reproducable? If not it was a temporary glitch with Dreamhost. If it is reproducable it may have to with some so-called “security”-related filtering many hosts do (mod_security, webapplication firewalls etc.), where they will block all requests that contain certain keywords/character-combinations. I am sure the FAQ will have some info on how to disable that.
Bur first, make sure the error is actually reproducable.

Offline

#3 2007-02-21 17:30:52

redneck
Member
From: Costa Mesa, CA
Registered: 2004-08-14
Posts: 37
Website

Re: "Service Temporarily Unavailable" when changing template: curl code!

Sencer wrote:

Bur first, make sure the error is actually reproducable.

Oh yes. All I have to do is go to ... /textpattern/index.php?event=page and click “Save” and I get the blank screen with that error every time.

Offline

#4 2007-02-21 18:47:51

redneck
Member
From: Costa Mesa, CA
Registered: 2004-08-14
Posts: 37
Website

Re: "Service Temporarily Unavailable" when changing template: curl code!

More info.

I decided to see if there was something in the default template that I am using that causes this. So I opened some of the other templates on the site (archive, default_old, my backup of the original default template). When I saved them, there was no error. Everything worked.

So then I decided I would try to save the default template as a template called blog. When I tried that I got the error. Then my next idea was to copy another template as blog and copy the contents of the default into it. When I saved the new blog template, I got the error.

So something in the default template was causing the problem.

On a hunch I removed some curl code I found in these forums, and everything worked.

The code in question is this:

<txp:php> $ch = curl_init('http://guntards.net/forum/extern.php?action=active&show=5'); curl_exec($ch); curl_close($ch); </txp:php>

The purpose of the code is to get around DreamHost’s prohibition of include() to present active threads from my PunBB forum. The code actually works very well, the active threads are duly presented on the front of my site. So why won’t the server let me save a template that has the code in it?

I hope I can get some ideas here before I go to DreamHost and they demand I remove the curl code.

BTW, my site is Gunatards.net.

Offline

#5 2007-02-21 19:20:01

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: "Service Temporarily Unavailable" when changing template: curl code!

Maybe your host is filtering this now, because it’s clearly something they don’t want.

Offline

#6 2007-02-22 00:51:24

redneck
Member
From: Costa Mesa, CA
Registered: 2004-08-14
Posts: 37
Website

Re: "Service Temporarily Unavailable" when changing template: curl code!

Oh, those swine at Dreamhost.

I thought I would be sneaky and take out the offending code and put it in a form to be called by the main template. When I try to save the form I get the same error.

Clearly what is happening is Dreamhost is parsing all POST queries and exiting when it encounters a curl command. And they only implemented this since I last updated the template on the 14th. Bastards.

I guess I’ll need to open a ticket with them. What I am trying to do should not be rendered impossible by their various security mechanisms.

Offline

#7 2007-02-22 02:36:31

redneck
Member
From: Costa Mesa, CA
Registered: 2004-08-14
Posts: 37
Website

Re: "Service Temporarily Unavailable" when changing template: curl code!

Thanks, everyone, I fixed it.

Offline

Board footer

Powered by FluxBB