So i installed LAMP, in ubuntu 12.04 LT, and apache, php, phpmyadmin and mysql works fine independently, but for example i have a php file:
$conexion = mysql_connect("127.0.1.1", "root", "password") or die("<p class='error'>Lo sentimos no se puede conectar a la base de datos.</p>");
$database = 'elBlog';
mysql_select_db($database, $conexion) or die("<p class='error>Lo sentimos, no se puede conectar...</p>");
Also i tried PDO:
try{
$conn = new PDO('mysql:host=localhost; dbname=elBlog', "root", "password");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}catch(PDOException $e){
echo 'ERROR: ' . $e->getMessage();
}
Php just evades this code, i mean is not even display an error message not for php not for mysql. Looking around in the web i installed all the libraries that php and mysql needs. what is wrong with this??
apache works fine, e.g. the phpinfo file for test is working. phpmyadmin also works fine i already create a DB. what else im missing?? Thanx for your help...