My client lost their hosting account (credit card mix up). After a some time they were able to get their host to restore their account–database and files. I’ve verfied the the database and pw are valid, db looks ok at quick glance.
The domain has been updated to point to the new IP address but I’m getting 500 error when I try to view the front or backend.
I’ve renamed the .htaccess so that’s not in play. This is an older site so I’m thinking that php 7.3 isn’t the issue (for now).
I don’t know what else to check.
This is in the error in the log.
[08-Jul-2022 10:06:17 America/Boise] PHP Warning: include_once(/home2/xxxxxxxx/public_html/core/xpdo/om/mysqli/xpdodriver.class.php): failed to open stream: No such file or directory in /home2/xxxxxxxx/public_html/core/xpdo/xpdo.class.php on line 1881
[08-Jul-2022 10:06:17 America/Boise] PHP Warning: include_once(): Failed opening '/home2/xxxxxxxx/public_html/core/xpdo/om/mysqli/xpdodriver.class.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home2/xxxxxxxx/public_html/core/xpdo/xpdo.class.php on line 1881
[08-Jul-2022 10:06:17 America/Boise] PHP Warning: Creating default object from empty value in /home2/xxxxxxxx/public_html/core/model/modx/modx.class.php on line 2423
[08-Jul-2022 10:06:17 America/Boise] PHP Fatal error: Uncaught Error: Call to undefined method stdClass::validate() in /home2/xxxxxxxx/public_html/core/model/modx/modx.class.php:2424
Stack trace:
#0 /home2/xxxxxxxx/public_html/core/model/modx/modx.class.php(556): modX->_initContext('web', false, NULL)
#1 /home2/xxxxxxxx/public_html/index.php(50): modX->initialize('web')
#2 {main}
thrown in /home2/xxxxxxxx/public_html/core/model/modx/modx.class.php on line 2424
Hi @terrybarth Have you checked that the complaining resource (core/xpdo/om/mysqli/xpdodriver.class.php) actually exists? also make sure you have the rigth permissions for the core folders
The file does exist.
Permission on all the core folders is 755
Permission on the file is 644. I compared this to another site I have and this is consistent.
New information:
If I go to the site with either of these I get server 500
www.domain.com
http://www.domain.com
If go to the site with this, I get 404 https://www.domain.com
I don’t have any way of know if the host changed the php version and I doubt they would tell me if even they could tell.
The base did not have an !. I added it. No change.
The .htaccess is out of the picture
No index.html (one of the first things I checked)
While I didn’t do a file by file check, the main folder are in the right place.
The error in the log is in my first post. All files are present.
New information:
I just manually cleared the cache (don’t why I didn’t think of that before, rookie mistake). Now I get the modx error: Site temporarily unavailable.
I uploaded and ran the setup for this version. On the first panel, where you choose the languge, there is a text message above it all that says:
Deprecated : Array and string offset access syntax with curly braces is deprecated in /home2/xxxxxxxx/public_html/setup/includes/parser/modinstallsmarty.class.php on line 75
So I found another post in the community that says this error is just a warning so I proceeded with the setup and got this error and was unable to continue.
**Deprecated** : Array and string offset access syntax with curly braces is deprecated in **/home2/normand1/public_html/setup/includes/parser/modinstallsmarty.class.php** on line **75**
**Warning** : Cannot modify header information - headers already sent by (output started at /home2/xxxxxxxx/public_html/setup/includes/parser/modinstallsmarty.class.php:75) in **/home2/xxxxxxx/public_html/setup/includes/request/modinstallrequest.class.php** on line **234**
You should be able to see the PHP version in cPanel. If not, you can create an info.php file with just this content and view it in your browser:
<?php
phpinfo();
I wonder if the issue is the ownership of the file or directory that’s there but not found. It’s very odd that it’s finding the MODX and xPDO class files, but not that one.
Would be dur to some permissions issues? Do you think I should do a full install over the top vs just setup? Would this resolve any permission problems?
**Warning** : require_once(/home2/xxxxxxx/public_html/setup/includes/drivers/modinstalldriver_mysqli.class.php): failed to open stream: No such file or directory in **/home2/xxxxxxx/public_html/setup/includes/modinstall.class.php** on line **80**
**Fatal error** : require_once(): Failed opening required '/home2/xxxxxxx/public_html/setup/includes/drivers/modinstalldriver_mysqli.class.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in **/home2/xxxxxxx/public_html/setup/includes/modinstall.class.php** on line **80**
Please check your core/config/config.inc.php file closely - I think there may be a config variable set to “mysqli” instead of “mysql”. Note the i at the end. Look in the variables at the top of the file.
That might be something the host “conveniently fixed” as part of the restore (as mysqli was the replacement for mysql; but xPDO uses PDO and not mysqli).
Great catch. I am curious though, how would this file have been edited? Wouldn’t the host have to edit it manually? How would they even know about this file?
I suspect it’s an automated “fix” as part of the restore. The PHP MySQL functions (e.g. mysql_query()) have been removed, which in most cases could easily be fixed by replacing it with the MySQLI functions (e.g. mysqli_query()). So if they’re restoring and something doesn’t work, they may have some script running to replace mysql with mysqli across a code-base.
But, that doesn’t account for accessing MySQL via PDO, which uses mysql for the driver type/DSN, so they broke that.
If you haven’t done it yet, it’s worth doing an “upgrade” to the same version to make sure nothing else in any of the other files was “fixed” the same way.
Also, make sure your .htaccess file has the section that forces www. or non-www. URLs uncommented, otherwise you’re likely to have more permission problems.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.