Bug #51029 [NoF->Fbk]: PHP does not display any error message on operations on non-existant database

From: Date: Sun, 25 Apr 2010 18:04:26 +0000
Subject: Bug #51029 [NoF->Fbk]: PHP does not display any error message on operations on non-existant database
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-149879@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51029&edit=1 ID: 51029 Updated by: felipe@php.net Reported by: ahmetsinan at gmail dot com Summary: PHP does not display any error message on operations on non-existant database -Status: No Feedback +Status: Feedback Type: Bug Package: MySQL related Operating System: Linux PHP Version: 5.2SVN-2010-02-12 (SVN) New Comment: Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2010-02-20 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2010-02-12 21:51:30] jani@php.net Exactly what PHP version are you using? ------------------------------------------------------------------------ [2010-02-12 19:53:34] ahmetsinan at gmail dot com Description: ------------ PHP does not displays any error messages, while inserting to a non-existant table in non-existant database and creating a table in non-existant database. Displaying the errors is on. Reproduce code: --------------- $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("sthnonexistant", $con); $sql = "CREATE TABLE IF NOT EXISTS registration ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, email varchar(255) NOT NULL, UNIQUE KEY id (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;"; mysql_query($sql,$con); Expected result: ---------------- An error message, containing that database does not exist. Actual result: -------------- Success message. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51029&edit=1

« previous php.bugs (#149879) next »