1

An uncaught Exception was encountered

Type: Error

Message: Call to undefined function mysql_connect()

Filename: C:\xampp\htdocs\Salab\system\database\drivers\mysql\mysql_driver.php

Line Number: 136

Backtrace:

File: C:\xampp\htdocs\Salab\application\third_party\MX\Loader.php Line: 109 Function: DB

File: C:\xampp\htdocs\Salab\application\third_party\MX\Loader.php Line: 65 Function: initialize

File: C:\xampp\htdocs\Salab\application\third_party\MX\Base.php Line: 55 Function: __construct

File: C:\xampp\htdocs\Salab\application\third_party\MX\Base.php Line: 60 Function: __construct

File: C:\xampp\htdocs\Salab\application\third_party\MX\Controller.php Line: 4 Function: require

File: C:\xampp\htdocs\Salab\application\third_party\MX\Modules.php Line: 123 Function: include_once

File: C:\xampp\htdocs\Salab\application\modules\acesso\controllers\Acesso.php Line: 3 Function: spl_autoload_call

File: C:\xampp\htdocs\Salab\index.php Line: 315 Function: require_once

Community
  • 1
  • 1

3 Answers3

1

Could you Send the method you using to connect to the database you could try this

 <?php
    //Create Connection
    $con=mysql_connect("localhost","root","");
    //Create Database
    $CreateDb="Create database db2";
    mysql_query($CreateDb,$con);

    //Select Database 
    mysql_Select_db("db2",$con);

   ?>
Jephren Naicker
  • 336
  • 1
  • 2
  • 18
1

If you are using php7 you should move to mysqli as mysql was deprecated If you are using an earlier version then it seems that the mysql extension is not installed or enabled (note that looking forward you'd better move to mysqli anyway)

Danny Yeshurun
  • 407
  • 6
  • 10
0

Check in your php.ini file if you have the line and it's not commented:

extension=php_mysql.dll