PDO is enabled but Joomla has PDO issue?

postcd

Well-Known Member
Oct 22, 2010
721
21
68
Hello, i had CGI as PHP handler set in WHM, then i see in EasyApache when doing build that i ahve ticket "PDO"
then i switched to SuPHP PHP handler and then Jommla site got issue:

Fatal error: Class 'PDO' not found in /home/****/public_html/includes/database/database.inc on line 184
I want to ask what can be the cause?

php -v
PHP 5.2.17 (cli) (built: Dec 18 2013 06:48:06)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
PS: i though i have PHP 5.3 and its also selected in EasyApache when i try to build based on previous config.. In PHPInfo() i have "PHP Version 5.3.28"

pdo not found?
php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
ereg
exif
filter
ftp
gd
gettext
hash
iconv
imap
json
libxml
mbstring
mcrypt
mysql
mysqli
openssl
pcre
Phar
posix
Reflection
session
SimpleXML
sockets
SourceGuardian
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend Guard Loader
zip
zlib
Thank you
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

Check to see if you are using an individual php.ini file within the account. You can also install "PDO" as a PECL module. EX:

Code:
pecl install pdo
Thank you.
 

postcd

Well-Known Member
Oct 22, 2010
721
21
68
It is Joomla and i did not found php.ini in that site folder nor in includes folder.
Im currently in the middle of easyapache build because of that issue i executed it from within WHM :-(
so "pecl install pdo" im afraid if it cant anyhow interfere with easyapache build process.
Not sure why this all happend when i switched from CGI to SuPHP handler.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Let us know if you experience the issue after installing the PDO Pecl module when EasyApache completes.

Thank you.
 

postcd

Well-Known Member
Oct 22, 2010
721
21
68
You can also install "PDO" as a PECL module. EX:

Code:
pecl install pdo
I tried it and result:
pecl install pdo
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/ PDO"
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize

... many lines there ...

/root/tmp/pear/PDO/pdo_dbh.c:1122: warning: assignment discards qualifiers from pointer target type
/root/tmp/pear/PDO/pdo_dbh.c:1126: warning: assignment discards qualifiers from pointer target type
make: *** [pdo_dbh.lo] Error 1
ERROR: `make' failed
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Actually, with PHP 5.3, you should enable PDO with EasyApache. Do you notice any difference in output after selecting PDO in your EasyApache build profile and rebuilding Apache/PHP? It should look like this:

Code:
# php -m|grep PDO
PDO
Thank you.
 

postcd

Well-Known Member
Oct 22, 2010
721
21
68
It dont return PDO, Michael.

I submitted ticket at a time i created this topic, but so far no one of 3 involved technicians discovered why after EasyApache build PHP modules are not loaded. (even PDO is selected in easy apache)

As i say i remember i only switched from cgi to suphp and restarted apache, then found these errors and php -m dont return modules selected in EasyApache.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I am happy to see the issue was resolved. Thank you for updating us with the outcome.