Forum

Can't get PDO working with PHP 5.4 and Hiawatha

MarcusXP
18 July 2016, 07:20
Hi,

I can't get PDO working with PHP 5.4 on CentOS7 and Hiawatha 10.3

if I run: "php -m" it shows that PDO module is loaded:

[root@allmytasks /]# php -m
PHP Warning: Module 'PDO' already loaded in Unknown on line 0 --> this warning goes away if I remove the line "extension=pdo.so" from /etc/php.ini, but still doesn't work
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mhash
openssl
pcntl
pcre
PDO
pdo_sqlite
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
zip
zlib


But if I create a PHP file with this content and load it in the website
echo "<?php phpinfo(); ?>"
it doesn't show PDO module

Can anyone help please?
I spent half a day banging my head with this, searched the forums, googling etc.. nothing worked..
I'm not a web developer, I don't know how to troubleshoot this quicker..

thanks a lot,
Marcus

MarcusXP
18 July 2016, 07:21
The actual error I am getting is this one:

Fatal error: Class 'PDO' not found in /var/www/allmytasks/class.db.sqlite3.php on line 66
Hugo Leisink
18 July 2016, 15:51
I don't know. But since this is a PHP issue, not a Hiawatha issue, you better address this at the PHP website [nl1.php.net].
MarcusXP
19 July 2016, 07:04
Thanks Hugo.
Actually I'm gonna give it another try, with Gentoo Linux (in docker instance) and Hiawatha 10.3 installed from source, and scrap my previous configuration (CentOS7 with Hiawatha 10.0)

I have one question though:
After I compiled hiawatha and it installed the files on disk, how do I make it install as service?

thanks!
MarcusXP
19 July 2016, 07:09
Nevermind my previous question
It seems that it is enough to run /usr/local/sbin/hiawatha
This topic has been closed.