When I try to connect to a mysql database I keep getting that error.
I've checked /etc/php5/apache2/php.ini and I have uncommented the line
extension=mysql.so
Also I have installed packages php5, php5-mysql.
phpinfo() returns that php is compiles with mySQL support.
The odd thing is that phpMyAdmin works perfectly and I can connect to a mySQL database I have.
The code that gives the error is:
$servidor = "localhost";
$nombre_usuario = "";
$contrasenya ="";
$tipo = "mySQL";
switch ($this->tipo) {
case "MSSQL":
$this->conexion = mssql_connect ( $servidor, $nombre_usuario, $contrasenya );
break;
case "mySQL":
$this->conexion = mysql_connect ( $servidor, $nombre_usuario, $contrasenya );
break;
}
And the error is
Fatal error: Call to undefined function mysql_connect() in /var/www/generaFichero/database.php on line 23
I'm under Ubuntu Linux Breezy
Thanks in advance.