• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved PDO ain't working

intelicnl

New Pleskian
Hello,

since a short time ago i uses PDO, now when i want to create a simple query ( $stmt = $db->prepare() ) the website will be blank without errors while error_reporting is on in my php.ini file.

Output of php -m

Code:
Cannot load the ionCube PHP Loader - extension already loaded
PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Warning:  Module 'pdo_sqlite' already loaded in Unknown on line 0
PHP Warning:  Module 'sqlite3' already loaded in Unknown on line 0
PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
ionCube Loader
json
libxml
mbstring
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
 
When error_reporting is on at least errors should be logged to error_log. It is possible that they are not displayed, but they must be logged. Are there any log entries in error_log? If not, add
error_reporting(E_ALL);
as the first line in the <?php ... ?> block of your script where the suspicious statement is used. It is possible that another script that enclosed the one in question has changed the error_reporting setting and for that reason you might not get any log entries despite the correct php.ini setting.
 
When error_reporting is on at least errors should be logged to error_log. It is possible that they are not displayed, but they must be logged. Are there any log entries in error_log? If not, add
error_reporting(E_ALL);
as the first line in the <?php ... ?> block of your script where the suspicious statement is used. It is possible that another script that enclosed the one in question has changed the error_reporting setting and for that reason you might not get any log entries despite the correct php.ini setting.

php.ini settings :

Code:
error_reporting = E_ALL & ~E_STRICT & ~E_DEPRECATED
log_errors = On
display_errors = On

PHP file error settings :

Code:
ini_get('display_errors');
error_reporting(E_ALL);

But still don't get any errors on the page. The panel.log file is empty.
 
Last edited:
Are you using a PHP version that came with Plesk or is this a different PHP version? If you are using a different version, is the PDO module present in it? Is that PHP version properly registered with Plesk?
# /usr/local/psa/bin/php_handler --list

Could it be possible that in that version the PDO module is missing, disabled, damaged? Has it been disabled in php.ini?
 
Are you using a PHP version that came with Plesk or is this a different PHP version? If you are using a different version, is the PDO module present in it? Is that PHP version properly registered with Plesk?
# /usr/local/psa/bin/php_handler --list

Could it be possible that in that version the PDO module is missing, disabled, damaged? Has it been disabled in php.ini?
Thanks, probally PHP 5.6 was disabled while open in plesk and using it on the website? Enabled the PHP version and everything is working right now.
 
Back
Top