Warning: Attempt to read property “config” on null in C:\wamp64\www\modx\core\vendor\xpdo\xpdo\src\xPDO\xPDO.php on line 304
What MODX version are you trying to install?
At what step does this error occur?
With this limited information, my best guess is, that the code is not able to correctly establish the database connection.
I’m using modx-3.1.2-pl-advanced version
During the installation step
( ! ) Warning: Attempt to read property “config” on null in C:\wamp64\www\modx\core\vendor\xpdo\xpdo\src\xPDO\xPDO.php on line 304
Call Stack
Time Memory Function Location
1 0.0004 450344 {main}( ) …\index.php**:0
2 0.2138 2378432 modInstallRequest->handle( ) …\index.php:30
3 0.2345 2593832 include( 'C:\wamp64\www\modx\setup\controllers\install.php ) …\modinstallrequest.class.php:81
4 0.2394 2660448 modInstallRunner->run( $mode = NULL ) …\install.php:34
5 0.2395 2660480 modInstallRunnerWeb->execute( $mode = NULL ) …\modinstallrunner.class.php:49
6 0.2423 2661712 modInstall->getConnection( $mode = NULL ) …\modinstallrunnerweb.class.php:38
7 0.2424 2661712 modInstall->_connect( $dsn = NULL, $user = NULL, $password = NULL, $prefix = NULL, $options = [] ) …\modinstall.class.php:172
8 0.6996 3067232 xPDO\xPDO->__construct( $dsn = NULL, $username = NULL, $password = NULL, $options = [‘cache_path’ => ‘C:/wamp64/www/modx/core/cache/’, ‘table_prefix’ => NULL, ‘setup’ => TRUE], $driverOptions = [3 => 0] ) …\modinstall.class.php:**467
( ! ) Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in C:\wamp64\www\modx\core\vendor\xpdo\xpdo\src\xPDO\xPDO.php on line 304
( ! ) TypeError: array_merge(): Argument #2 must be of type array, null given in C:\wamp64\www\modx\core\vendor\xpdo\xpdo\src\xPDO\xPDO.php on line 304
Call Stack
Time Memory Function Location
1 0.0004 450344 {main}( ) …\index.php**:0
2 0.2138 2378432 modInstallRequest->handle( ) …\index.php:30
3 0.2345 2593832 include( 'C:\wamp64\www\modx\setup\controllers\install.php ) …\modinstallrequest.class.php:81
4 0.2394 2660448 modInstallRunner->run( $mode = NULL ) …\install.php:34
5 0.2395 2660480 modInstallRunnerWeb->execute( $mode = NULL ) …\modinstallrunner.class.php:49
6 0.2423 2661712 modInstall->getConnection( $mode = NULL ) …\modinstallrunnerweb.class.php:38
7 0.2424 2661712 modInstall->_connect( $dsn = NULL, $user = NULL, $password = NULL, $prefix = NULL, $options = [] ) …\modinstall.class.php:172
8 0.6996 3067232 xPDO\xPDO->__construct( $dsn = NULL, $username = NULL, $password = NULL, $options = [‘cache_path’ => ‘C:/wamp64/www/modx/core/cache/’, ‘table_prefix’ => NULL, ‘setup’ => TRUE], $driverOptions = [3 => 0] ) …\modinstall.class.php:467
9 0.7122 3075840 array_merge( $arrays = [‘cache_path’ => ‘C:/wamp64/www/modx/core/cache/’, ‘table_prefix’ => NULL, ‘setup’ => TRUE], NULL ) …\xPDO.php:**304
Can you be a bit more specific?
The installation of MODX has multiple steps (see image below).
Are you saying that everything works OK (including setting up the database connection in the “Connect” step) and then only on the “Install” step you get the error?
Does the file core/cache/setup/settings.cache.php
exist?
Does it have content (especially a value for 'database_dsn' =>
)?
Do the folders core/cache/
and core/cache/setup/
have the correct permissions?