Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this issue on my server. It happens sometimes when I refresh my webpages. It seems litespeed wont pass file.php to php compiler and instead of rendering HTML and interpreting PHP, I will see my PHP source code. It won't happen always, only 2 or 3 times in 50 tries.

My PHP version is 5.3.10 but I had the same problem with 5.2.17 too. My Litespeed version is V5.5 on CentOS 6 (x64)

share|improve this question

Normally that shouldn't happen on any webserver. This might be because of a glitch (if you are testing with the same page).

Try to reproduce it and submit a bug report if it persists.

share|improve this answer

You need to insure you've configured litespeed to parse PHP mime-types with PHP rather than just write them to standard out. You'd have the same issue on Apache if the mime-types weren't configured. If it truly is random and can't be linked to specific areas, etc, then it is likely a bug.

To add a PHP handler, you'd just add something along the lines of...

addType application/x-httpd-php5 php

Make sure your PHP files are always named with the extension that you specified in the handler.

share|improve this answer
up vote 0 down vote accepted

After months of struggle finally i figured out that my .htaccress length was the problem. In other words if .htaccess file length exceed 17 of lines it will confuse Litespeed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.