Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Diagnostic not working on Textdrive
My diagnostic page is giving me an Internal Server Error.
I can see this error in my error_log:
[Tue Mar 13 13:50:35 2007] [error] [client 84.126.71.52] Premature end of script
headers: php5-fcgi, referer: http://www.locosbajitos.com/textpattern/
I have tracked down the problem in txp_diag.php to this code:
# test clean URL server vars
if (hu) {
if (ini_get('allow_url_fopen') and ($permlink_mode != 'messy')) {
$s = md5(uniqid(rand(), true));
$pretext_data = @file(hu.$s.'/?txpcleantest=1');
if ($pretext_data) {
$pretext_req = trim(@$pretext_data[0]);
if ($pretext_req != '/'.$s.'/?txpcleantest=1')
$fail['clean_url_data_failed'] = gTxt('clean_url_data_failed').cs.htmlspecialchars($pr
etext_req);
}
else
$fail['clean_url_test_failed'] = gTxt('clean_url_test_failed');
}
}
If I comment this code, the diagnostics works.
The problem is here:
$pretext_data = @file(hu.$s.'/?txpcleantest=1');
The function file fails after some delay. hu.$s.'/?txpcleantest=1' has the right value (I have debugged it).
You can see the a phpinfo in the failing site versus a phpinfo in a working site (in the same host). If you scroll down to Environment, you can see is different (I don’t know why, it is supposed to be configured the same way)
Somebody knows what’s the problem.
Offline
#2 2007-03-13 16:50:52
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Diagnostic not working on Textdrive
$pretext_data = @file(hu.$s.’/?txpcleantest=1’);
If you remove the error suppression (the @ character) do you get any error messages?
Offline
Re: Diagnostic not working on Textdrive
No. I get the same generic error.
Offline
#4 2007-03-13 20:51:51
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Diagnostic not working on Textdrive
Juan,
What’s your Site URL setting on the failing site?
If you comment out the offending line of code, are there any warnings in the pre-flight check?
Alex
Offline
Re: Diagnostic not working on Textdrive
The Site URL is www.locosbajitos.com (the right one, I think).
If I comment just the offending line I get the following error on the pre-flight check.
And of course a warning about the undefined variable.
Offline
#6 2007-03-16 18:47:56
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Diagnostic not working on Textdrive
I get the following error on the pre-flight check.
Uh, what warning?
Offline
Re: Diagnostic not working on Textdrive
I’m sorry:
Clean URL test failed.
Offline
Pages: 1