/
[install] Fatal Error on Clean Install [5.2.2-B1]

[install] Fatal Error on Clean Install [5.2.2-B1]

When no /system/config.php file exists and attempt to perform Clean Install is made a fatal error happens:

Fatal error: Call to undefined function _connect() in .../core/kernel/db/db_connection.php on line 273

Here is xDebug stack trace:

Error happens right after step, where I've entered database credentials.

This happens because initial /system/config.php file version with default values only is put into OpCache and therefore any content change of that file isn't reflect in sequential "require $file;" constructs for 2 seconds. Unlikely this is what happens during installation: change file content in one place > read it in another place.

Problem happens only when OPCache (see http://php.net/manual/en/book.opcache.php) is enabled in PHP.

Solution

When changing contents of "/system/config.php" file during installation in the "KInstallToolkit::SaveConfig" method, then the opcode cache for that file needs to invalidated.

Related Tasks

INP-1507 - Getting issue details... STATUS