Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-04-26 23:22:34
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
r1304: active clean URL test
http://dev.textpattern.com/changeset/1302
The diagnostics page now does a HTTP GET request to check whether or not clean URLs are working correctly.
Last edited by zem (2006-04-27 02:34:04)
Alex
Offline
Re: r1304: active clean URL test
This is my readout:
pretext_data: array (
‘id’ => ‘’,
‘s’ => ‘’,
‘c’ => ‘’,
‘q’ => ‘’,
‘pg’ => ‘’,
‘p’ => ‘’,
‘month’ => ‘’,
‘author’ => ‘’,
‘request_uri’ => ‘/06cbc90be9ad6150ec40693343f9df4d/?txpcleantest=7b57e47843e534548ccb61a91a5cf718’,
‘qs’ => ‘txpcleantest=7b57e47843e534548ccb61a91a5cf718’,
‘subpath’ => ‘\\/’,
‘req’ => ‘/06cbc90be9ad6150ec40693343f9df4d/?txpcleantest=7b57e47843e534548ccb61a91a5cf718’,
)
Do I pass the test?
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#3 2006-04-27 00:35:48
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: r1304: active clean URL test
You’ll get a pre-flight error if the data is wrong.
Alex
Offline
Re: r1304: active clean URL test
Sometimes I see this: clean_url_test_failed, the majority of the time it’s not there.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#5 2006-04-27 00:56:21
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: r1304: active clean URL test
Any pattern to it? Timing between page reloads, something like that?
You could get more info by editing include/txp_diag.php and removing the ‘@’ from line 299:
$lines = @file(hu.$s.'/?txpcleantest='.$clean_test_nonce);
Last edited by zem (2006-04-27 00:57:28)
Alex
Offline
Re: r1304: active clean URL test
Clean urls work fine for me on a 1302 install, but the diagnostics pages lists “clean_url_test_failed ?” error and a whole host of “dev_version_live” errors.
want my diagnostics?
Offline
#7 2006-04-27 01:18:52
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: r1304: active clean URL test
want my diagnostics?
Yes please, high detail
Doh, nevermind – the dev_version_live message is normal – it means you’re using a non-release version in Live mode. The message will go away in Test or Debug mode (which you should be using for testing anyway).
Anyone who’s seeing the clean_url_test_failed message, please try the line 299 ‘@’ edit listed above. If that produces a PHP error, it should explain the problem.
Last edited by zem (2006-04-27 01:22:31)
Alex
Offline
Re: r1304: active clean URL test
Yeah, I think it’s timing related:
Warning: file(http://test.com/a845dbf6926a8f3e156de598807fe877/?txpcleantest=5b2a4a25ea6ce5fd7701a2615db933fc): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/test/textpattern/include/txp_diag.php on line 299
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#9 2006-04-27 01:48:55
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: r1304: active clean URL test
Try r1304 instead. It’s simpler, should get rid of the timing problem.
Alex
Offline
Re: r1304: active clean URL test
Zem I still get clean url test failed. (r1306) I don’t care, cause they work. Thought you might be interested.
Offline
#11 2006-04-29 00:13:54
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: r1304: active clean URL test
Dale,
Does it happen every single time?
Is there a pretext_data item in your high detail diagnostics? What does it say?
If there’s no pretext_data item, what happens if you remove the ‘@’ from line 297 in the new rev?
<code>$pretext_data = @file(hu.$s.’/?txpcleantest=1’)</code>
That should produce a PHP error message when you reload the diagnostics page.
Last edited by zem (2006-04-29 04:54:47)
Alex
Offline
Re: r1304: active clean URL test
Just in case you are interested I have r1306 running on 3 installs and they are all picking up “clean urls” without problem.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#13 2006-04-30 23:04:53
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: r1304: active clean URL test
Thanks. I should point out that there are three different errors that could be produced:
- ‘clean_url_untested’ means fopen wrappers are disabled and it’s impossible to check whether or not clean URLs work
- ‘clean_url_test_failed’ means the test was run clean URLs are completely broken (e.g. they produce a 404 or 500 error).
- ‘clean_url_data_failed’ means clean URLs are handled and passed to Textpattern, but the URL data that’s passed by the web server to PHP is incomplete or incorrect. This might be the case on IIS, for example.
Alex
Offline
#14 2006-05-07 00:26:19
- domfucssion
- Plugin Author
- Registered: 2004-10-23
- Posts: 39
Re: r1304: active clean URL test
hi,
diagnostics is reporting an error:
clean_url_data_failed: /a844e88667122beb70ff4f55660f9a9a/?txpcleantest=1
from diag high level:
pretext_data: array (
‘id’ => ‘’,
‘s’ => ‘’,
‘c’ => ‘’,
‘q’ => ‘’,
‘pg’ => ‘’,
‘p’ => ‘’,
‘month’ => ‘’,
‘author’ => ‘’,
‘request_uri’ => ‘/a844e88667122beb70ff4f55660f9a9a/?txpcleantest=1’,
‘qs’ => ‘txpcleantest=1’,
‘subpath’ => ‘\\/’,
‘req’ => ‘/a844e88667122beb70ff4f55660f9a9a/?txpcleantest=1’,
)
running locally as a virualhost on Apache/1.3.33 os x.
everything appears to work fine for me using section/title, just wondered if that info was relevant?
Offline
#15 2006-05-12 19:53:43
- domfucssion
- Plugin Author
- Registered: 2004-10-23
- Posts: 39
Re: r1304: active clean URL test
hi again,
Spent some time today trying to work out what was causing my “clean_url_data_failed:” error.
I checked out the same rev 1310 into a different vhost and did not get any diagnostics error, so my general setup looked ok.
It turned out that removing all plugins from tmp stopped the error. I made a simple plugin and put it on it’s own in tmp and still did not get any diagnostics errors. I check the permissions on new plugin files that worked and old files that gave the “clean_url_data_failed” error and they were identical.
Finally I discovered that copying the plugin txt from the old file and pasting / saving / replacing the old file with the same name made the error disappear.
So all is well, but I would really love to know wtf was the difference between the old plugins in tmp that triggered the diagnostics error and the newly saved ones that are ok.
cheers,
dave
Last edited by domfucssion (2006-05-12 20:59:56)
Offline