Guest User

Untitled

a guest
Jan 13th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. 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
  2.  
  3. public function __construct($username='username', $password='supersecretpassword', $host='localhost', $dbname='database', $options=[])
  4. {
  5. $this->isConnected = true;
  6. try {
  7. $this->db_data = new PDO("mysql:host={$host};dbname={$dbname};charset=utf8",$username, $password, $options);
  8. $this->db_data->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  9. $this->db_data->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
  10. } catch (PDOException $e) {
  11. throw new Exception($e->getMessage());
  12. }
  13. }
  14.  
  15. extension=openssl
  16. extension=pdo_firebird
  17. extension=pdo.so
  18. extension=pdo_mysql
  19. extension=pdo_oci
  20. extension=pdo_odbc
  21. extension=pdo_pgsql
  22. extension=pdo_sqlite
  23.  
  24. root@HAL4:/etc/php/7.2/apache2# php -m
  25. [PHP Modules]
  26. calendar
  27. Core
  28. ctype
  29. date
  30. exif
  31. fileinfo
  32. filter
  33. ftp
  34. gettext
  35. hash
  36. iconv
  37. json
  38. libxml
  39. mysqli
  40. mysqlnd
  41. openssl
  42. pcntl
  43. pcre
  44. PDO <-- Still doesn't work
  45. pdo_mysql <-- Nope. Still not working.
  46. Phar
  47. posix
  48. readline
  49. Reflection
  50. session
  51. shmop
  52. sockets
  53. sodium
  54. SPL
  55. standard
  56. sysvmsg
  57. sysvsem
  58. sysvshm
  59. tokenizer
  60. Zend OPcache
  61. zlib
  62.  
  63. [Zend Modules]
  64. Zend OPcache
Add Comment
Please, Sign In to add comment