Results 1 to 3 of 3

Thread: php 7.2 and Contao 3.5.35

  1. #1
    New user
    Join Date
    07-16-09.
    Posts
    29

    Default php 7.2 and Contao 3.5.35

    Hi,

    My provider urges me to update the PHP version from 5.6 to 7.2. My installation of Contao 3.5.35 obviously can't cope with that, because I get a fatal error:

    Code:
    Fatal error: Uncaught exception Error with message Call to undefined function Contao\Database\mysql_connect() thrown in system/modules/core/library/Contao/Database/Mysql.php on line 47
    #0 system/modules/core/library/Contao/Database.php(81): Contao\Database\Mysql->connect()
    #1 system/modules/core/library/Contao/Database.php(165): Contao\Database->__construct(Array)
    #2 [internal function]: Contao\Database::getInstance()
    #3 system/modules/core/library/Contao/System.php(140): call_user_func(Array)
    #4 system/modules/core/library/Contao/User.php(158): Contao\System->import('Database')
    #5 system/modules/core/classes/FrontendUser.php(62): Contao\User->__construct()
    #6 system/modules/core/library/Contao/User.php(220): Contao\FrontendUser->__construct()
    #7 [internal function]: Contao\User::getInstance()
    #8 system/modules/core/library/Contao/System.php(140): call_user_func(Array)
    #9 system/modules/core/controllers/FrontendIndex.php(31): Contao\System->import('FrontendUser', 'User')
    #10 index.php(19): Contao\FrontendIndex->__construct()
    #11 {main}
    Is there something I can do?

    Thanks in advance!
    Last edited by xchs; 07/05/2018 at 17:38. Reason: Code-Tags

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Yes, change
    PHP Code:
    $GLOBALS['TL_CONFIG']['dbDriver'] = 'MySQL'
    to
    PHP Code:
    $GLOBALS['TL_CONFIG']['dbDriver'] = 'MySQLi'
    in your system/config/localconfig.php.

  3. #3
    New user
    Join Date
    07-16-09.
    Posts
    29

    Thank you, this saved my day!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •