Modifying the php.ini file to resolve an unwanted exception
source link: https://www.codesd.com/item/modifying-the-php-ini-file-to-resolve-an-unwanted-exception.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Modifying the php.ini file to resolve an unwanted exception
I'm in the middle of transferring my site over to another server and ran across this error when trying to load the main index file:
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /htdocs/www/demoportal/login.php:8 Stack trace: #0 /htdocs/www/demoportal/login.php(8): PDO->__construct('mysql:host=db2....', '???', '???') #1 /htdocs/www/demoportal/index.php(3): require('/htdocs/www/dem...') #2 {main} thrown in /htdocs/www/demoportal/login.php on line 8
The line that apparently is giving an error is the following:
$db = new PDO("mysql:host=" . $host . ";dbname=" . $database, $user, $password);
The version of PHP on my system is PHP Version 5.3.19-1~dotdeb.0.
I'm not sure what I need to look for in the php.ini file to modify or edit. Any help would be appreciated.
You don't have the MySQL PDO drivers installed/loaded.
Related Articles
How to locate the php.ini file (xampp)
File too important to download to the server even when the php.ini file has changed
You can not edit the php.ini file!
How to correctly add the ZendFramework to the php.ini file?
Modify the php.ini settings without modifying the original php.ini file or by using the htaccess
How to modify the php configuration directory of the php.ini file on a subdomain
How to change session_save_path in the php.ini file?
Accessing the php.ini file
How to modify my php.ini file in linux
The php.ini file does not work?
Laravel 5.3 Homestead php7 reload the php.ini file
How to configure the php.ini file for mail () in MAC OS?
How to modify the eclipse.ini file from the command prompt - ubuntu
Enable short open tag without the php.ini file
Recommend
-
120
ivim - An easy & highly customizable vim configuration _ _ (_) __(_)___ ___ / / | / / / __ `__ \ / /| |/ / / / / / / / /_/ |___/_/_/ /_/ /_/ Version: 3.0
-
64
GitHub is where people build software. More than 28 million people use GitHub to discover, fork, and contribute to over 85 million projects.
-
62
Percona Monitoring and Management (PMM) provides an excellent solution for system monitoring. Sometimes, though, you’ll have...
-
56
Do you need to modify the metrics collected from Linux by
-
60
At Shape we come across many sketchy pieces of JavaScript. As part of our everyday routine, we dive into them head first to understand what they’re doing and how. The scripts might be maliciously injected into pag...
-
41
CMake has for single configuration configurators the following build types (configuration) : Empty (Qt Creator wrongly refer...
-
43
thank u, [Symbol.iterator].next Thomas Barrasso
-
8
Blocking Unwanted Connections with a Hosts File  Â
-
23
JBoss: Exception Delay During War File Deployment advertisements I'm trying to deploy a war on my remote server which is continuously failing...
-
5
A guide to exception handling in PHP Elevate your PHP skills and improve your application with this comprehensive guide to exception handling. Discover best practices, pra...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK