Hi! I'm an Eleven2 customer. They recently upgraded from Apache to LiteSpeed, and now my site is having problems. I was asked by their support team to post my issue here since they were unable to resolve it.
I'm just beginning to try to build a PHP / MySQL app at http://www.prebeltway.org, and in order to make my URLs more friendly, I've added the following lines to my .htaccess file:
as illustrated at http://www.sitepoint.com/article/search-engine-friendly-urls/3 so that these files can be served as PHP without requiring a file extension.
Before the upgrade everything worked perfectly. And now, most everything still seems to work, except that it doesn't hold sessions anymore for some reason. A user can log in, and pages with a .php extension (the login page, the index page, etc.) show the user logged in, but the files with no extension (abilene, sweetwater, and family pages) show the user logged out because no session is registering. If I simply add the file extension ".php" to the non-working files, the functionality returns, and users can stay logged in there as well.
You can test this for yourself at http://www.prebeltway.org/login.php using the username "demo" and the password "test." Once you are logged in, note that the "login" link changes to "logout" specifying that you are logged in. Now visit http://www.prebeltway.org/abilene and see that the link has reverted to "login" because the session has not initiated on this page. If you now go to http://www.prebeltway.org/abilene.php (which is an exact duplicate of the previous page, just with the .php extension added), you will see that you are, in fact, still logged in.
This seems to be a bug in the way that LiteSpeed handles ForceType in .htaccess, but if there is a work-around that I or Eleven2 can implement, please let me know and we'll give it a shot!
Thanks!
--Josh
I'm just beginning to try to build a PHP / MySQL app at http://www.prebeltway.org, and in order to make my URLs more friendly, I've added the following lines to my .htaccess file:
Code:
<Files family>
ForceType application/x-httpd-php
</Files>
<Files abilene>
ForceType application/x-httpd-php
</Files>
<Files sweetwater>
ForceType application/x-httpd-php
</Files>
Before the upgrade everything worked perfectly. And now, most everything still seems to work, except that it doesn't hold sessions anymore for some reason. A user can log in, and pages with a .php extension (the login page, the index page, etc.) show the user logged in, but the files with no extension (abilene, sweetwater, and family pages) show the user logged out because no session is registering. If I simply add the file extension ".php" to the non-working files, the functionality returns, and users can stay logged in there as well.
You can test this for yourself at http://www.prebeltway.org/login.php using the username "demo" and the password "test." Once you are logged in, note that the "login" link changes to "logout" specifying that you are logged in. Now visit http://www.prebeltway.org/abilene and see that the link has reverted to "login" because the session has not initiated on this page. If you now go to http://www.prebeltway.org/abilene.php (which is an exact duplicate of the previous page, just with the .php extension added), you will see that you are, in fact, still logged in.
This seems to be a bug in the way that LiteSpeed handles ForceType in .htaccess, but if there is a work-around that I or Eleven2 can implement, please let me know and we'll give it a shot!
Thanks!
--Josh