Brand New Install CDbConnection is unable to find PDO class

Alin Bugeag

New Member
Hi,
I've just bought your software and I'm trying to do some tests.
I've notice that the campaign that I've created stays in pending mode
Then in server logs I found this error:

[error] [exception.CDbException] exception 'CDbException' with message 'CDbConnection is unable to find PDO class "PDO". Make sure PDO is installed correctly.' in /home/mailwizgothruco/mailwiz.gothru.co/apps/common/framework/db/CDbConnection.php:442

now this server it has php and it's compiled by me, with support for PDO, so it should support it.
'./configure' '--with-apxs2' '--with-gd' '--with-mysql=/usr' '--with-mysqli' '--with-jpeg-dir=/usr' '--with-zlib' '--with-curl' '--enable-ftp' '--with-openssl' '--enable-zip' '--with-config-file-path=/etc' '--enable-soap' '--with-freetype-dir=/usr' '--enable-pdo=shared' '--with-pdo-mysql=shared,/usr' '--without-pdo-sqlite' '--without-sqlite' '--enable-exif' '--libdir=/usr/lib64' '--with-libdir=lib64' '--enable-bcmath' '--with-xsl' '--enable-mbstring' '--with-mcrypt'

PDO
PDO support enabled
PDO drivers mysql
pdo_mysql
PDO Driver for MySQL enabled
Client API version 5.1.73
Directive Local Value Master Value
pdo_mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock

can you shade some light in to what I need to do

Multzumesc ;)
Alin
 

twisted1919

Administrator
Staff member
Make sure the PHP version you are using in command line is the same as the version that you see in the web browser.
You might want to ask your hosting what is the right path to the php binary in the command line for your version of php.

I.E: Maybe your cron jobs starts with /usr/bin/php (or /usr/bin/php-cli) and these are aliased to a lower PHP version without PDO, and in this case, you need to look in the browser, see what version you have and find the right path on the server for that version, for example, in Plesk is something like: /opt/plesk/php/X.Y/bin/php ( where X.Y is the php version, i.e: 7.0 ).
 

Alin Bugeag

New Member
I own the server.
yes, you were wright ... the cron you provided was pointing to the default php installation ... not my compiled version
once I've pointed to the correct php binary the campaign was sent! ;) awesome product and support !!!
 
Top