OK, maybe this is widely known, but it took me some time to find this out... (I’m new to MODx and relatively unexperienced with all things pertaining to UNIX administration.)
I was trying to enable Friendly URL’s. I followed all the instructions that were given in the docs and on the forums — making sure that the subdirectory was specified in the path, activating both .htaccess files (in the root and in "manager") and renaming the files, of course. I always got the dreaded 500 Internal Server Error.
After much fooling around (and flirting with insanity), I finally found the culprit. It was those 2 lines:
php_flag zlib.output_compression On
php_value zlib.output_compression_level 5
By commenting them out (preceding them with a "#"), the error went away and all was good again in MODx land.
I don’t know why this causes the problem... but hey, this would extend beyond my proficiencies...
(It seems that PHP optimizations — the Zend optimizer? — is already enabled by default for my host [PowWeb]. Is that [the already-enabled-ess] a cause of problems? I have no clue.)
Hope this can help some people...
There are other hosts which alse have the same problem. You cannot define your PHP settings and change them on the fly using your .htaccess file. Instead, these hosts usually allow you to put a custom [tt]php.ini[/tt] file in the root directory of your webspace and allows you to just define the values your want to change from the default. (That’s my experience with some webhosts.)
FYI... The issue has to do with the host using "phpsuexec" which is used to improve security for php in a shared hosting environment. If you google "what is phpsuexec" you’ll find all kinds of info on it.
Dave
Thanks for the info ddecjc.
-
MODX Staff
- 12,272 Posts
Aikdo, can you give us a code example for that?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Is there any way I can easily find out if my host has changed their settings? I have been setting the MODX website up and am nearly finished (grrr) when all of a sudden I get a 500 Internet Server Error. I’ve checked the htaccess and the offending two lines are commented out already.
Any suggestions please?
Quote from: DavidHopkins at Sep 07, 2009, 01:53 PM
Is there any way I can easily find out if my host has changed their settings? I have been setting the MODX website up and am nearly finished (grrr) when all of a sudden I get a 500 Internet Server Error. I’ve checked the htaccess and the offending two lines are commented out already.
Any suggestions please?
There are some suggestions here:
http://bobsguides.com/modx-installation-faq.html
BobRay - thanks for this. It happened a few weeks ago but by the time I found the Forum it had sorted itself out and I could carry on (??) but this time it’s been a couple of hours with no joy.
I think it’s down to the rewrite and friendly URLs, but I can’t access the /manager/ panel to turn it off ... any ideas please?
David.