Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Fatal error: Uncaught Error: Class 'PDO' not found in /var/www/the_website.net/config/DB.php:20 Stack trace: #0 /var/www/the_website.net/public_html/index.php(16): DB->__construct() #1 {main} thrown in /var/www/the_website.net/config/DB.php on line 20
- public function __construct($username='username', $password='supersecretpassword', $host='localhost', $dbname='database', $options=[])
- {
- $this->isConnected = true;
- try {
- $this->db_data = new PDO("mysql:host={$host};dbname={$dbname};charset=utf8",$username, $password, $options);
- $this->db_data->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $this->db_data->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
- } catch (PDOException $e) {
- throw new Exception($e->getMessage());
- }
- }
- extension=openssl
- extension=pdo_firebird
- extension=pdo.so
- extension=pdo_mysql
- extension=pdo_oci
- extension=pdo_odbc
- extension=pdo_pgsql
- extension=pdo_sqlite
- root@HAL4:/etc/php/7.2/apache2# php -m
- [PHP Modules]
- calendar
- Core
- ctype
- date
- exif
- fileinfo
- filter
- ftp
- gettext
- hash
- iconv
- json
- libxml
- mysqli
- mysqlnd
- openssl
- pcntl
- pcre
- PDO <-- Still doesn't work
- pdo_mysql <-- Nope. Still not working.
- Phar
- posix
- readline
- Reflection
- session
- shmop
- sockets
- sodium
- SPL
- standard
- sysvmsg
- sysvsem
- sysvshm
- tokenizer
- Zend OPcache
- zlib
- [Zend Modules]
- Zend OPcache
Add Comment
Please, Sign In to add comment