Summary
Hello!
After transfering the site to Modx Revolution 2.8.3 to CloudWays hosting, the frontend has no working.
Step to reproduce
There is no information in the modx logs. The server logs contain the following errors:
[authz_core:error [pid 1700:tid 139722542057216 [ client denied by server configuration: public_html/core/docs/changelog.txt
[proxy_fcgi:error [pid 1700:tid [client : Got error 'PHP message: PHP Fatal error: Uncaught Error: Object of class xPDOQuery_mysql could not be converted to string in /home/............Template->display()\n#4 /public_html/core/components/pdotools/model/pdotools/pdotools.class.php(582):...', referer: https://phpstack-121789.cloudwaysapps.com/manager/index.php?a=resource/update&id=30
Of course, I tried updating pdoTools to the latest version, clearing the cache, rebooting the server.
Environment
Modx Revolution 2.8.3
Apache
PHP 7.4
MariaDB 10.5
Thank you for helps!
Did you run setup again after transferring the site?
-
You can ignore the first error. (MODX tries to access “core/docs/changelog.txt” just to make sure that the “core” folder is protected.)
-
The second error (“class xPDOQuery_mysql could not be converted to string”) seems to be triggered by the manager (and not the frontend).
Thank you!
Did you run setup again after transferring the site?
I asked this question to the hosting support who were transferring the project.
The same error occurs when trying to load the any pages of the site:
[proxy_fcgi:error [pid 91041:tid 1397235990 [client AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Object of class xPDOQuery_mysql could not be converted to string in /home/............r.php(229): Fenom\\Template->display()\n#4 /home/.../public_html/core/components/pdotools/model/pdotools/pdotools.class.php(582):...', referer: https://phpstack-1217890.cloudwaysapps.com/legal-information.html
As far as I understand, the problem is in page processing using PdoTools
Just run “setup” again (for the correct MODX version) to make sure that all the paths are correct.
The problem with this error message is, that it isn’t complete. So it’s unclear what exactly throws the error
/home/............r.php(229)
- What file is this refering to?
#4 /home/.../public_html/core/components/pdotools/model/pdotools/pdotools.class.php(582):...
- Where are
#3
, #2
, #1
of this stack trace?
Sorry,
This is full error:
[Wed Mar 27 17:37:05.056689 2024] [proxy_fcgi:error] [pid 91041:tid ...] [client ...] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Object of class xPDOQuery_mysql could not be converted to string in /home/.../public_html/core/components/pdotools/vendor/fenom/fenom/src/Fenom/Template.php(487) : eval()'d code:19\nStack trace:\n#0 /home/.../public_html/core/components/pdotools/vendor/fenom/fenom/src/Fenom/Render.php(215): Fenom\\Template->{closure}()\n#1 /home/...public_html/core/components/pdotools/vendor/fenom/fenom/src/Fenom/Render.php(215): Closure->__invoke()\n#2 /home/.../public_html/core/components/pdotools/vendor/fenom/fenom/src/Fenom/Template.php(492): Fenom\\Render->display()\n#3 /home/.../public_html/core/components/pdotools/vendor/fenom/fenom/src/Fenom/Render.php(229): Fenom\\Template->display()\n#4 /home/.../public_html/core/components/pdotools/model/pdotools/pdotools.class.php(582):...', referer: https://phpstack-....cloudwaysapps.com/manager/index.php?a=resource/update&id=608
A similar error occurs when opening each page. At the same time, the backend works.
The problem seems to occur when the code uses eval(). This function runs an (arbitrary) string as PHP code.
So without knowing what the concrete string is in this case, it’s impossible to say what command in the string generates the error.
Please tell me what can be do in this case?