ID: 46275 Updated by: [EMAIL PROTECTED] Reported By: info at jonathanhogervorst dot com -Status: Open +Status: Bogus Bug Type: PDO related Operating System: CentOS 4.5 PHP Version: 5.2.6 New Comment:
php.ini-dist : ; Print out errors (as a part of the output). For production web sites, ; you're strongly encouraged to turn this feature off, and use error logging ; instead (see below). Keeping display_errors enabled on a production web site ; may reveal security information to end users, such as file paths on your Web ; server, your database schema or other information. http://php.net/manual/en/errorfunc.configuration.php Note: This is a feature to support your development and should never be used on production systems (e.g. systems connected to the internet). Previous Comments: ------------------------------------------------------------------------ [2008-10-11 09:13:00] info at jonathanhogervorst dot com Description: ------------ I'm using PDO to connect to a MySQL-database. I moved my website to a new server, and when I opened the site I saw an error saying that the MySQL-plugin for PDO wasn't installed. In the error-text was my MySQL login-data displayed. Reproduce code: --------------- Run this code on a server without the MySQL-plugin for PDO: <?php $db = new PDO('mysql:host=host;dbname=db', 'usr', 'pass'); ?> Expected result: ---------------- A PDO-object in $db. Actual result: -------------- Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /home/***/domains/***/public_html/db.php:2 Stack trace: #0 /home/***/domains/***/public_html/***.php(2): PDO- >__construct('mysql:host=host...', 'usr', 'pass') #1 {main} thrown in /home/***/domains/***/public_html/db.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46275&edit=1