Download a project source code, run with a lot of NOTICE level error, so in the php.ini file opened the error_reporting under the default Value:e_all & ~e_notice, but found that after opening will cause Call to undefined function mysql_connect () error, Connection not on database. Open Development Value:e_all | E_strict
and Production Value:e_all & ~e_deprecated are also unable to load the database module. All closed words can, I do not know if you have encountered this problem, solve ~!
Reply content:
Download a project source code, run with a lot of NOTICE level error, so in the php.ini file opened the error_reporting under the default Value:e_all & ~e_notice, but found that after opening will cause Call to undefined function mysql_connect () error, Connection not on database. Open Development Value:e_all | E_strict
and Production Value:e_all & ~e_deprecated are also unable to load the database module. All closed words can, I do not know if you have encountered this problem, solve ~!
Your mistake has error_reporting
nothing to do with options, but it doesn't show errors when you close this option, but the error still exists, but it doesn't show up.
From the wrong point of view is obviously not installed on your MySQL extension, it should be noted that the current PHP default is not installed MySQL extension. If you are windows, you can find it in php.ini.
; Extension=php_mysql.dll
Remove the preceding semicolon, if you are using Ubuntu, and your PHP is apt-get
installed, then you can enter it in the terminal
sudo apt-get install Php-mysql
To install the MySQL extension. If you are using other Linux distributions, you will need to recompile PHP yourself and add the Configure--with-mysql=mysqlnd
Do not know what you download the source code, I once looked at a source code, is also this error, because he is using the PDO way to load the database, but I did not open the PDO module, you can look at the code.