Содержание
- Error log analysis and issue diagnosis.
- Don’t Be That Guy
- Thank the People that Help
- Installation Problem: Checking database: MODX could not create your database. Please manually create your database and then try again. #6013
- Comments
- Steps:
- Interesting note:
- Sessions / Database issue? Logged out all the time #11777
- Comments
- Error log analysis and issue diagnosis.
- Don’t Be That Guy
- Thank the People that Help
- Upgraded Hacked Website — Database Won’t Connect
- Don’t Be That Guy
- Thank the People that Help
Error log analysis and issue diagnosis.
Hi, I have a site in production (Revo 2.2.13-pl) which my client is reporting is sometimes down both in the Manager and Front end — I went to check the error logo today and it’s so big I have had to download it — 2.2mb! From looking at the log there are lots of errors being shown. None of which mean anything to me as I am not much into the server side of things. there seems to be a consistent sequence of bugs though which repeats many many times! I have added in below an example.
Does anyone have any ideas what the issue might be here? I can DM over the full bug list if that would help?
Appreciate any insight here!
Almost all of those appear to be caused by the MySQL server being overtaxed and rejecting connections — always a threat on shared hosting.
When MODX (or anybody) tries to connect to the database, a file is created to store the connection number so that the server knows who is asking for what, kind of like a temporary extension number for an office phone.
There are several reasons why a database connection can fail. There isn’t enough disk space to create these files, or the database is getting too many requests at one time, and it simply doesn’t have time to write the files and run the database program are common issues. Database engines can be configured with «listeners», how many open connections can it handle at once, like how many phone lines to an office. It is possible to configure it to use more «listeners», but whether or not that will be a good idea depends on how much memory, disk space, and processor speed the server has.
Another problem can be if the server is configured wrong, and the database engine is trying to write these files in a directory where it doesn’t have permission to write.
There should definitely be a database error log — that may be the problem, if the error logs are so big that they’re eating up your allowed disk space.
One solution to your problem may be to turn off the database storage for PHP sessions.
One solution to your problem may be to turn off the database storage for PHP sessions.
How you could do this? Changing the value session_enabled?
I have the same problem, the RAM (VPS with 4 GB of RAM) is increasing until the service collapses every Saturday morning at 8 (CEST).
In most cases nothing happens, only I get an error in the logs (see below), but in other cases, it corrupts the database table modx_site_content.
The errors I receive are these:
and this errors when the table gets corrupted
Modx version: MODX Revolution 2.6.5-pl (advanced)
Database version: 5.6.39-log
PHP Version 5.6.37
Appreciate any insight here! Thanks
Gravino [ed. note: gravino last edited this post 4 years, 4 months ago.]
Don’t have a MODX.com account? Create one
MODX Cloud makes presenting to clients a breeze. I can decide which website version to show at any time.
Don’t Be That Guy
Be nice, respectful and patient. Inflammatory or inappropriate posts will get your post nuked and flood your life with bans and bad karma.
Thank the People that Help
Remember, this is an Open Source project and the volunteers here assist out of love for the project and a desire to help others.
Источник
Installation Problem: Checking database: MODX could not create your database. Please manually create your database and then try again. #6013
user_6900 created Redmine issue ID 6013
Same issue here!
Database connection and login information worked:
Connecting to database server: Success!
- Checking MySQL server version: OK! Running: 5.1.56-log
- Checking MySQL client version: OK! Running: 5.1.56
Connection character set: utf8
Collation: utf8_general_ci
? Create or test selection of your database.
Checking database: MODX could not create your database. Please manually create your database and then try again.
After creating the database manually, I till get the same error.
The text was updated successfully, but these errors were encountered:
I looks like this was an issue concerning permissions to the database. Exactly what was going on here is hard to identify.
Difficult to reproduce.
Perhaps related to #12274 #12829
NOTE: In my case, viewing dev tools (Chrome > Network tab) when this issue occurs yielded some additional error results indicating the reason for the db connection failure (authentication issue).
After reviewing core/cache/setup/settings.cache.php (created during setup), the database_password value had an incorrect / old value cached.
In my case, I was doing a local install against a password-less MySQL user, so perhaps the installer is not handling (read: re-syncing) the settings file correctly when certain changes are made or non-existent values are entered?
php 5.6.20 / mysql 5.6.30
I may have found a way to reliably reproduce this issue!
Steps:
- Run MODX setup (new install)
- Enter valid database connection details on the Connection Information screen.
- Click the «Test database server connection and view collations.» link
- Then, very quickly, click the «Create or test selection of your database.» link.
I found that if I click the 2nd link too soon, I can reliably reproduce the error:
Checking database: MODX could not create your database
(ERROR in xPDOConnection::connect @ core/xpdo/xpdo.class.php : 3083) SQLSTATE[HY000] [2002] No such file or directory
(ERROR @ setup/processors/database/collation.php : 48) Could not connect to database server: SQLSTATE[HY000] [2002] No such file or directory
Further, I can see why. When tailing core/cache/setup/settings.cache.php, it seems the file is continually reset (to the erroneous state) after clicking either the 1st test link or the 2nd test link.
For example:
Once I get the error to show up, the settings.cache.php file was showing without a database user:
database_user’ => » and also had incorrect value for database_server (it was defaulting to localhost , but that was not the value I entered)
When I click the 1st test link (to test database server connection), the settings.cache.php is updated with the correct information (and test succeeds) each time. However, when I click the 2nd test link (again, this is after you’ve been able to reproduce the error first, the settings.cache.php file changes with the invalid/stale connection info again.)
Interesting note:
This is on a development server, PHP 5.6.20 w/ Opcache enabled. Cache revalidation frequency is set very low (5 seconds) opcache.revalidate_freq=5
That said, If I repeat steps 1., 2., and 3. above, but then wait 6 seconds before attempting the «Create or test selection of your database.» link, it works correctly!
Источник
Sessions / Database issue? Logged out all the time #11777
So i am on my local environment. This is a clean, fresh install.
Made two installs to make sure i could reproduce it.
Updating an old 2.2.14 local website to 2.3.0 works fine.
After setup, i log in and i don’t see the file tree/elements/resources. This is becuase of compression js / so i set that to false.
Clear all cache, and log back in. All seem to work.
I go to to extras/installer
Then «session you have been logged out» (or such) and fields to log in again. Well, it doesnt work. So i go to /manager and logs in again.
I see everything, then i try extras/installer again, and im this time taken directly to the manager login screen.
After logging in again, all i can see is the top menu. And if i go to extras/install, i come to manager login again.
The text was updated successfully, but these errors were encountered:
So, i installed 2.2.15. Worked perfectly.
Then upgraded to 2.3.0
Went to manager and logged in. And was met with:
«Your session has expired. Please proceed to login again.»
And the same thing starts all over again.
So with 2.3.1 it seems like im no longer logged out all the time.
However, now i can never seem to get any content other than the navbar.
( i have tested clearing the cache from the cache folder ). If i clear cache from within the manager, it says just console running all the time.
So if i refresh the page, twice, i am logged out and get the «your session expired message» Below that popup i see the all manager content including the file tree, elements and so on.
I then use that popup to login, it all dissapear.
However as i am writing this,
i did get the manager as usual, going to reports and error. i am logged out again. Logging in i can see a lot of errors. Among these:
Источник
Error log analysis and issue diagnosis.
Hi, I have a site in production (Revo 2.2.13-pl) which my client is reporting is sometimes down both in the Manager and Front end — I went to check the error logo today and it’s so big I have had to download it — 2.2mb! From looking at the log there are lots of errors being shown. None of which mean anything to me as I am not much into the server side of things. there seems to be a consistent sequence of bugs though which repeats many many times! I have added in below an example.
Does anyone have any ideas what the issue might be here? I can DM over the full bug list if that would help?
Appreciate any insight here!
Almost all of those appear to be caused by the MySQL server being overtaxed and rejecting connections — always a threat on shared hosting.
When MODX (or anybody) tries to connect to the database, a file is created to store the connection number so that the server knows who is asking for what, kind of like a temporary extension number for an office phone.
There are several reasons why a database connection can fail. There isn’t enough disk space to create these files, or the database is getting too many requests at one time, and it simply doesn’t have time to write the files and run the database program are common issues. Database engines can be configured with «listeners», how many open connections can it handle at once, like how many phone lines to an office. It is possible to configure it to use more «listeners», but whether or not that will be a good idea depends on how much memory, disk space, and processor speed the server has.
Another problem can be if the server is configured wrong, and the database engine is trying to write these files in a directory where it doesn’t have permission to write.
There should definitely be a database error log — that may be the problem, if the error logs are so big that they’re eating up your allowed disk space.
One solution to your problem may be to turn off the database storage for PHP sessions.
One solution to your problem may be to turn off the database storage for PHP sessions.
How you could do this? Changing the value session_enabled?
I have the same problem, the RAM (VPS with 4 GB of RAM) is increasing until the service collapses every Saturday morning at 8 (CEST).
In most cases nothing happens, only I get an error in the logs (see below), but in other cases, it corrupts the database table modx_site_content.
The errors I receive are these:
and this errors when the table gets corrupted
Modx version: MODX Revolution 2.6.5-pl (advanced)
Database version: 5.6.39-log
PHP Version 5.6.37
Appreciate any insight here! Thanks
Gravino [ed. note: gravino last edited this post 4 years, 4 months ago.]
Don’t have a MODX.com account? Create one
MODX Cloud makes presenting to clients a breeze. I can decide which website version to show at any time.
Don’t Be That Guy
Be nice, respectful and patient. Inflammatory or inappropriate posts will get your post nuked and flood your life with bans and bad karma.
Thank the People that Help
Remember, this is an Open Source project and the volunteers here assist out of love for the project and a desire to help others.
Источник
Upgraded Hacked Website — Database Won’t Connect
Working on a website that got hacked and I’m upgrading the website with latest install of Revo. All the files are transferred correctly and I’ve updated the config files to ensure it’s pointing to the right place.
When I go through the /setup and Upgrade Existing Install or Advanced, I keep getting a «can not connect to database».
Server Info
Apache Version 2.4.23
PHP Version 5.6.29
MySQL Version 5.6.38
Update 1
Just deleted the contents of /core/cache and redid the /setup
Now I get the following error:
Connecting to database server:
Could not connect to the database server. Check the connection properties and try again.
[2017-12-21 20:15:29] (ERROR in xPDOConnection::connect @ /home/catalystps/public_html/core/xpdo/xpdo.class.php : 3116) SQLSTATE[HY000] [2019] Unknown character set
[2017-12-21 20:15:29] (ERROR in xPDOConnection::connect @ /home/catalystps/public_html/core/xpdo/xpdo.class.php : 3116) SQLSTATE[HY000] [2019] Unknown character set
Update 2
I can see that the character isn’t set in the warning, yet it’s set in my config.inc.php file in /core/config/. When I checked cache, I see there’s a settings.cache.php file which is does NOT contain that information. Not sure where to do from here.
Update 3
Created a new db user with full permissions (even though the original one was correct). Connection made. YES! Got to the «install» and then this:
Fatal error: Call to a member function checkPolicy() on null in /home/catalystps/public_html/core/model/modx/modx.class.php on line 1882
[ed. note: mayhemchaos last edited this post 5 years ago.]
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
From what version are you updating? The checkPolicy error could perhaps be an indication that you upgraded from way back, while it’s generally recommended to take it one minor version (2.2.x, 2.3.x, 2.4.x etc) at a time.
It could also be an indication that something’s up with your contexts. If it can’t load the context, it can’t check the policy (permission) on said context. There’s been a few added fields to contexts over the years, so depending on how far behind you were on updates, that could be related to making too big of a jump at once.
Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.
Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
When upgrading some sites from 2.2.x to 2.4 or 2.5 I encountered this error.
The solution for me was to add «name» row in table «modx_context» as a VARCHAR 255 and try running the setup again. I later deleted this row, but I can’t remember if this step was necessary.
As for the version number I think if you search a backup of the db .sql file for the word ‘version’ in the manager_log you should find lines that read something like ‘Upgrade MODX’,’modWorkspace’,’Version 2.5.5-pl’. The highest of these should be your version number. Although there may be a more obvious way of finding it!
If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com
email: andy@andytough.com | website: https://andytough.com
Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.
Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
Update: I actually did not create a new row in mod_context the first time. I did, however, manage to add the new name row. I ran the install again and got a NEW error
Warning: array_merge(): Argument #2 is not an array in /home/catalystps/public_html/core/xpdo/xpdo.class.php on line 341
Fatal error: Class ‘xPDODriver_’ not found in /home/catalystps/public_html/core/xpdo/xpdo.class.php on line 1884
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
Happy Update
Thanks to Mark! I figured out the site was on 2.2.4. Upgraded the site to 2.2.5 and the site is back online!
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.
Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
Make sure not to stop at 2.2.5 unless you want to get hacked again
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
Don’t have a MODX.com account? Create one
MODX Cloud makes presenting to clients a breeze. I can decide which website version to show at any time.
Don’t Be That Guy
Be nice, respectful and patient. Inflammatory or inappropriate posts will get your post nuked and flood your life with bans and bad karma.
Thank the People that Help
Remember, this is an Open Source project and the volunteers here assist out of love for the project and a desire to help others.
Источник
So with 2.3.1 it seems like im no longer logged out all the time.
However, now i can never seem to get any content other than the navbar.
( i have tested clearing the cache from the cache folder ). If i clear cache from within the manager, it says just console running all the time.
So if i refresh the page, twice, i am logged out and get the «your session expired message» Below that popup i see the all manager content including the file tree, elements and so on.
I then use that popup to login, it all dissapear.
However as i am writing this,
i did get the manager as usual, going to reports and error. i am logged out again. Logging in i can see a lot of errors. Among these:
[2014-07-23 09:58:06](ERROR @ /connectors/lang.js.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
= ? —
[2014-07-23 09:58:06](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:58:06](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:58:06](ERROR @ /connectors/lang.js.php) Error preparing statement for query: SELECT modAccessContext.id, modAccessContext.target, modAccessContext.principal, modAccessContext.authority, modAccessContext.policy, Policy.data FROM modx_access_context
AS modAccessContext
LEFT JOIN modx_access_policies
Policy
ON modAccessContext
.policy
= Policy
.id
WHERE ( modAccessContext
.principal_class
= ? AND modAccessContext
.target
= ? ) ORDER BY modAccessContext.target,modAccessContext.principal,modAccessContext.authority,modAccessContext.policy ASC —
[2014-07-23 09:58:06](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:58:06](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:58:06](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:58:06](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:58:06](ERROR @ /connectors/index.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
= ? —
[2014-07-23 09:59:20](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:20](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:20](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:20](ERROR @ /connectors/lang.js.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
= ? —
[2014-07-23 09:59:20](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:20](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:20](ERROR @ /connectors/lang.js.php) Error preparing statement for query: SELECT modAccessContext.id, modAccessContext.target, modAccessContext.principal, modAccessContext.authority, modAccessContext.policy, Policy.data FROM modx_access_context
AS modAccessContext
LEFT JOIN modx_access_policies
Policy
ON modAccessContext
.policy
= Policy
.id
WHERE ( modAccessContext
.principal_class
= ? AND modAccessContext
.target
= ? ) ORDER BY modAccessContext.target,modAccessContext.principal,modAccessContext.authority,modAccessContext.policy ASC —
[2014-07-23 09:59:20](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR @ /connectors/index.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
= ? —
[2014-07-23 09:59:21](ERROR @ /connectors/index.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
[1] =>
[2] =>
)
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR @ /connectors/index.php) Error preparing statement for query: SELECT modAccessContext.id, modAccessContext.target, modAccessContext.principal, modAccessContext.authority, modAccessContext.policy, Policy.data FROM modx_access_context
AS modAccessContext
LEFT JOIN modx_access_policies
Policy
ON modAccessContext
.policy
= Policy
.id
WHERE ( modAccessContext
.principal_class
= ? AND modAccessContext
.target
= ? ) ORDER BY modAccessContext.target,modAccessContext.principal,modAccessContext.authority,modAccessContext.policy ASC —
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR @ /connectors/index.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
= ? —
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR @ /connectors/index.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
= ? —
[2014-07-23 09:59:21](ERROR in xPDOConnection::connect @ /Users/williamastrom/Development/rorelseakademin.dev/public/core/xpdo/xpdo.class.php : 3043) SQLSTATE[HY000] [2006] MySQL server has gone away
[2014-07-23 09:59:21](ERROR @ /connectors/index.php) Error 23000 executing statement:
INSERT INTO modx_session
(id
, access
, data
) VALUES (‘grqrmefo1j3j9srjhe6lfag9r6’, 1406102361, »)
Array
(
[0] => 23000
[1] => 1062
[2] => Duplicate entry ‘grqrmefo1j3j9srjhe6lfag9r6’ for key ‘PRIMARY’
)
Материал из Wiki — Iphoster — the best ever hosting and support. 2005 — 2023
Перейти к:навигация, поиск
MODX — 500 Error — Site temporarily unavailable
Ошибка:
500 Error - Site temporarily unavailable
сразу смотрим логи по адресу core/cache/logs/error.log
Одна из возможны причин и ошибок — неверный конфиг для подключения к mysql:
[2016-01-17 14:03:06] (ERROR in xPDOConnection::connect @ /home/admin/web/site.com/public_html/core/xpdo/xpdo.class.php : 3046) SQLSTATE[28000] [1045] Access denied for user 'admin_100'@'localhost' (using password: YES) [2016-01-17 14:03:06] (ERROR in xPDOConnection::connect @ /home/admin/web/site.com/public_html/core/xpdo/xpdo.class.php : 3046) SQLSTATE[28000] [1045] Access denied for user 'admin_100'@'localhost' (using password: YES) [2016-01-17 14:03:06] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSystemSetting`.`key` AS `modSystemSetting_key`, `modSystemSetting`.`value` AS `modSystemSetting_value`, `modSystemSetting`.`xtype` AS `modSystemSetting_xtype`, `modSystemSetting`.`namespace` AS `modSystemSetting_namespace`, `modSystemSetting`.`area` AS `modSystemSetting_area`, `modSystemSetting`.`editedon` AS `modSystemSetting_editedon` FROM `modx_system_settings` AS `modSystemSetting` - [2016-01-17 14:03:06] (ERROR in xPDOConnection::connect @ /home/admin/web/site.com/public_html/core/xpdo/xpdo.class.php : 3046) SQLSTATE[28000] [1045] Access denied for user 'admin_100'@'localhost' (using password: YES) [2016-01-17 14:03:06] (ERROR in xPDOConnection::connect @ /home/admin/web/site.com/public_html/core/xpdo/xpdo.class.php : 3046) SQLSTATE[28000] [1045] Access denied for user 'admin_100'@'localhost' (using password: YES) [2016-01-17 14:03:06] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSystemSetting`.`key` AS `modSystemSetting_key`, `modSystemSetting`.`value` AS `modSystemSetting_value`, `modSystemSetting`.`xtype` AS `modSystemSetting_xtype`, `modSystemSetting`.`namespace` AS `modSystemSetting_namespace`, `modSystemSetting`.`area` AS `modSystemSetting_area`, `modSystemSetting`.`editedon` AS `modSystemSetting_editedon` FROM `modx_system_settings` AS `modSystemSetting` - [2016-01-17 14:03:06] (FATAL) Could not load core MODX configuration!
Решение — исправить данные для подключения к базе в конфиг файле MODX — core/config/config.inc.php