Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2020-08-01 11:32:06

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Feedback for: Textpattern CMS 4.8.2 released

I’ve checked Diagnostics carefully and the only difference I see between apache and litespeed output is the missing .htaccess details, so not really a problem that needs fixing I think.


BB6 Band My band
Gud One My blog

Offline

#26 2020-08-01 11:49:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,436
Website GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

Interesting. Never used Litespeed either.

Before outputting .htaccess, we do a test for ‘is this an Apache environment?’. If not, they’re ignored, which is why you don’t see them. I’m not sure if we can test ‘if Apache OR Litespeed’ and output them in both cases. It would depend on what PHP functions are available for us to query the server environment.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#27 2020-08-01 14:22:21

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,241
GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

One simple way to check if .htaccess is actually being used would be to put a bogus line at the beginning (i.e. deliberately break it) and see if the site still loads. I’m assuming fancy URLs are working, so I’m guessing there’s something being processed.

Offline

#28 2020-08-01 14:40:16

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,436
Website GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

I’m not sure based on those links you posted whether Litespeed actually uses .htaccess files that are put there manually, or if only certain hosts require you to add them via the control panel so they can be installed on your behalf.

Either way, our check for displaying them in diagnostics is governed by this line:

$is_apache = stristr(serverSet('SERVER_SOFTWARE'), 'Apache') || is_callable('apache_get_version');

If it fails that test (i.e. the server doesn’t mention the word ‘Apache’ or PHP doesn’t report that we can access Apache-related content) then you don’t get the .htaccess and other Apache-style content reported in Diagnostics.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#29 2020-08-01 15:04:22

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,241
GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

Bloke wrote #325061:

I’m not sure based on those links you posted whether Litespeed actually uses .htaccess files that are put there manually, or if only certain hosts require you to add them via the control panel so they can be installed on your behalf.

This was my thinking, too – wasn’t 100% sure whether I’d understood it correctly.

zero – are you using clean URLs successfully?

Offline

#30 2020-08-01 15:25:31

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Feedback for: Textpattern CMS 4.8.2 released

gaekwad wrote #325062:

This was my thinking, too – wasn’t 100% sure whether I’d understood it correctly.

zero – are you using clean URLs successfully?

Yes, never had a problem, been using Litespeed for 3 years at least. When I make changes to .htaccess I get immediate response, so it is being used


BB6 Band My band
Gud One My blog

Offline

#31 2020-08-01 15:52:59

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,241
GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

zero wrote #325063:

Yes, never had a problem, been using Litespeed for 3 years at least. When I make changes to .htaccess I get immediate response, so it is being used

Ah, cool – all good. Thanks for clarifying.

Offline

#32 2020-08-01 16:58:16

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,436
Website GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

zero very kindly gave me access to his `phpinfo()`. I’ve skimmed it and it seems that the same $_SERVER['SERVER_SOFTWARE'] that we query for Apache support has the word “LiteSpeed” in its place.

As far as I can make out, PHP doesn’t have any server specific extension for it, but a rudimentary check at the Diagnostics level would allow us to display the .htaccess info. All it should need is a simple tweak to include/txp_diag.php (line 188 at the time of writing) as follows:

$is_apache = stristr(serverSet('SERVER_SOFTWARE'), 'Apache') || stristr(serverSet('SERVER_SOFTWARE'), 'LiteSpeed') || is_callable('apache_get_version');

That would then display it if Apache or Litespeed was in use.

If we did this in core, from a practical viewpoint I’d probably change the variable name slightly to make it more indicative of its nature (e.g. $uses_htaccess instead of $is_apache), but that won’t stop zero testing it out now by making the change above and seeing what happens.

If we do add that line to core, is it admission of officially supporting LiteSpeed? I guess it is. If you’ve been running it for years with no issue, then I don’t see the harm in admitting it works. At the moment we just say Txp is reported to work with it. Are we in a position to change that stance? Is it dangerous with so few of us having access to such an environment for stress testing?

Last edited by Bloke (2020-08-01 16:59:04)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#33 2020-08-01 17:25:31

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Feedback for: Textpattern CMS 4.8.2 released

Some Textpattern files have been modified:

and .htaccess now shows in Diagnostics :-)

I would think there are other forum members using Litespeed because it is very prevalent nowadays and it claims to be lots faster than Apache. Perhaps someone will come forward for more testing or verification?

EDIT: I could create a new database and give you access if you’d like to stress test it.

Last edited by zero (2020-08-01 17:29:51)


BB6 Band My band
Gud One My blog

Offline

#34 2020-08-01 18:37:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,436
Website GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

Very kind offer, thank you. We could certainly use that, which allows us to test it now (although you’ve been using it for ages, so that’s good enough proof for me).

I was more thinking of how we continue to prove it works longer term when we add new features and tinker, to check we’ve not broken anything. Not sure about that bit.

Last edited by Bloke (2020-08-01 18:38:36)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#35 2020-08-02 07:16:52

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,241
GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

Bloke wrote #325065:

If we do add that line to core, is it admission of officially supporting LiteSpeed?

Nope.

If you’ve been running it for years with no issue, then I don’t see the harm in admitting it works. At the moment we just say Txp is reported to work with it.

Supporting it and saying it works are two very different things. I would respectfully counter with putting a section into docs.textpattern.com/setup/configuring-a-web-server with LiteSpeed-specific stuff (if there even is any – zero, can you remember what you did way back three years+ ago?), that plus a tweak to the sys reqs page with a link to said doc would be a good start.

Is it dangerous with so few of us having access to such an environment for stress testing?

Not dangerous, but we will need to tool up just in case. We’re also not overburdened with IIS / Lighttpd testing platforms or support requests either, so stating Textpattern is reported to work well doesn’t necessarily follow that it will attract users.

Offline

#36 2020-08-02 07:35:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,436
Website GitHub

Re: Feedback for: Textpattern CMS 4.8.2 released

gaekwad wrote #325069:

a section into docs.textpattern.com/setup/configuring-a-web-server with LiteSpeed-specific stuff

Works for me. That line in txp_diag.php can be altered whenever.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB