1

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)

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
Aram Alipoor
  • 111
  • 6

3 Answers3

0

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.

Lucas Kauffman
  • 16,880
  • 9
  • 58
  • 93
0

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.

Doug
  • 646
  • 3
  • 8
0

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.

Aram Alipoor
  • 111
  • 6