Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-28 16:27:27

cnolle
Archived Plugin Author
Registered: 2004-03-21
Posts: 87
Website

Precondition Failed

Howdy,

I am getting a very odd error message using textpattern 4.0.4. I’ve developed the site
offline using XAMPP which runs with the following stuff:

+ Apache 2.2.3
+ MySQL 5.0.24a
+ PHP 5.1.6 + PHP 4.4.4 + PEAR

Everything runs fine on my localhost but when I import the database to the online server and try to edit an article textpattern throws me the following error:

—-

Precondition Failed
The precondition on the request for the URL /welcome/textpattern/index.php evaluated to false.

—-

I suspect somekind of database incompatibility between XAMPP and textdrive setup. My pre-flight check is all good with no errors.

Hope someone can help me.

/Christian

Offline

#2 2007-01-28 16:36:49

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Precondition Failed

I just did this week, not up to Textdrive but to my own server.

I don’t know what version of MySQL the Textdrive servers have but when you export from XAMPP, there is a drop down for compatibility. So if you go from MySQL 5.0.x to 4.0.x, like I did, all is well on the import side.

Other than that, check your config.php, if it’s a 4.0 database:

$txpcfg['dbcharset'] = 'latin1';

Offline

#3 2007-01-28 16:58:49

cnolle
Archived Plugin Author
Registered: 2004-03-21
Posts: 87
Website

Re: Precondition Failed

That was quick.

I realised that I was exporting a MySQL version 5 database into a version 4 on the textdrive server. So I downgraded the XAMPP export to version 4, and now its getting weider. Some articles I can edit just fine and save, but others fail with the precondition error. Bizarre. Now I’ve always set my textpattern databases up with UTF 8. Tried to set the textpattern config to latin1 but that didn’t change anything.

/Christian

Offline

#4 2007-01-28 18:30:07

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: Precondition Failed

I’ve had the 412 issue at Textdrive recently myself when editing articles or even forms, with no import. I think they’ve got their mod_security filters cranked too tight. I finally had to create an .htaccess file and put it within my /textpattern/ directory, containing one line:

SecFilterEngine Off

That was the only way I could find to remove the 412’s even long enough to do the editing I needed to do.


TextPattern user since 04/04/04

Offline

#5 2007-01-28 18:49:42

cnolle
Archived Plugin Author
Registered: 2004-03-21
Posts: 87
Website

Re: Precondition Failed

Ahhh, that worked. Been exporting and importing different versions of my mysql databases, and this did the trick. Thank you Reid. Is this a safe long-term solution?

/Christian

Offline

#6 2007-01-28 19:14:57

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: Precondition Failed

cnolle wrote:

Is this a safe long-term solution?

That’s a good question. One to which I can’t give a definitive answer, other than on my site it appears that mod_security is still run on comments (the place it does you the most good), yet I can edit articles/forms as needed without a 412. I think the key is putting that .htaccess line in your /textpattern/ folder rather than in your root .htaccess, as that would turn off mod_security on comment postings. Since this is a Textdrive related filtering issue, I would think it would not otherwise impact Textpattern.

Here’s the Textdrive forum thread I started when it first came up for me.


TextPattern user since 04/04/04

Offline

Board footer

Powered by FluxBB