-
- 5 Posts
I am running Revo 2.2.0pl2 with Friendly URLs on.
When I use 2 of the same browser windows, one for manager updates and one to view the site, the manager gets logged out with the following error after I load a site page.
If I turn Friendly URLs off, no problems with getting logged out of the manager.
modx is installed in a subdirectory /modx
.htaccess file in the root directory contents:
RewriteEngine On
RewriteBase /modx
# ignore manager directory contents
RewriteRule ^manager - [L,NC]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [QSA,NC]
(ERROR in xPDOConnection::connect @ /home/content/XX/XXXXXXXX/html/modx/core/xpdo/xpdo.class.php : 2955) SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading authorization packet', system error: 0
[2012-01-07 14:25:06] (ERROR @ /modx/connectors/system/registry/register.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `modx_session` AS `modSession` WHERE `modSession`.`id` = ? - Array
(
[0] => 00000
)
My solution is to open the manager in one browser (firefox) and browse the site in another browser (chrome).
Any suggestions appreciated.
I would guess that this has to do with your rewrites: the session/cookie is identifying your site with the "/modx" bit, whereas accessing via the front-end identifies your site as "/".
Is your .htaccess at the root of the site? Or in the "modx" folder?
-
- 5 Posts
I agree that rewrites are the problem. .htaccess is at the root.
If your MODX install is in a subdirectory, I'd put the .htaccess in that subdirectory. I.e. put the .htaccess not at the website root, put it at the root of the MODX install. Change the
RewriteBase /modx
to
RewriteBase /
-
- 5 Posts
I don't know how to make it work without a .htaccess file at the root.
I need to have mysite.com/home.html translated to mysite.com/modx/index.php?q=1
-
- 5 Posts
I have tried that but when the user specified url does not contain "modx/" it never gets to the .htaccess directive in the modx directory.
No, I mean put the below edits inside the .htaccess at site root. It's a pain in the ass, but .htaccess can do this, you just have to wrap your head around it. I would recommend not installing in a sub-folder with weird restrictions like what you've got here because as you can see, it leads to headaches.
-
- 5 Posts
Tried that too. No change in behavior.