You are not logged in.
Hi there,
I am trying to fix my php7 setup for some time now, without success. I now need some help because I just have no idea what to try next.
None of my php webapps do work. Any hints are welcome. I start with the error given by tt-rss:
Exception while creating PDO object:could not find driver
So I check if my php7 setup is configured correctly:
php7 -m |grep pdo
pdo_mysql
php7 -i |grep PDO
PDO
PDO support => enabled
PDO drivers => mysql
PDO Driver for MySQL => enabled
cat /etc/httpd/conf/httpd.conf |grep -i php
LoadModule php7_module modules/libphp7.so
Include conf/extra/php7_module.conf
I created an info.php and there I can see that the PDO driver is not loaded:
I assume on a working setup, "mysql" would be listed in this category. But I don't see why it shouldn't be loaded.
I am happy to produce any logs you may need to help me. Thanks already for reading until here and best regards,
watnuss
Last edited by Watnuss (2021-02-08 20:29:03)
Offline
*bump*
I am going to build a mirror setup of the system in question trying to figure out what is wrong, next. In the meantime, I would be immensely thankful for any input.
Offline
Hey watnuss,
i just set up a test-vm with a basic apache-php7-mysql-installation and after configuring it there was nothing special about getting PDO to work…
Could you share your complete phpinfo()-test-page as well as the output of
grep pdo /etc/php7/php.ini
?
Offline
Hi hoerbert,
the phpinfo() output can be found at nopaste.ml (This site encodes the paste in the url. Pastebin was not working for me.)
And
grep pdo /etc/php7/php.ini
;extension=pdo_dblib
extension=pdo_mysql
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
; http://php.net/pdo-odbc.connection-pooling
;pdo_odbc.connection_pooling=strict
;pdo_odbc.db2_instance_name
pdo_mysql.default_socket=
Thanks a lot!
watnuss
Last edited by Watnuss (2021-02-08 19:09:06)
Offline
There is a non-standard loaded configuration file. =>
Loaded Configuration File: /etc/webapps/tt-rss/php.ini
I dont't know why it is loaded, but my guess is, that you have to enable the pdo-extension in this file, because the standard file does not seem to be loaded.
Offline
Thanks for the pointer. This config is loaded for the tt-rss webapp I am running.
cat /etc/httpd/conf/httpd.conf|grep tt-rss
# tt-rss settings
Include conf/extra/tt-rss.conf
And that config looks like:
cat /etc/httpd/conf/extra/tt-rss.conf
<VirtualHost *:443>
SSLEngine on
#SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCipherSuite HIGH:!aNULL:!MD5
ServerName tt-rss.myserver.net
ServerAdmin admin@myserver.net
DocumentRoot /usr/share/webapps/tt-rss
#SSLCertificateFile /etc/httpd/conf/server.crt
SSLCertificateFile /etc/letsencrypt/live/myserver.net/fullchain.pem
#SSLCertificateKeyFile /etc/httpd/conf/server.key
SSLCertificateKeyFile /etc/letsencrypt/live/myserver.net/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/myserver.net/chain.pem
<Directory /usr/share/webapps/tt-rss/>
Options FollowSymlinks
Require all granted
AllowOverride all
#php_admin_value open_basedir none
php_admin_value open_basedir "/var/lib/tt-rss:/usr/share/webapps/tt-rss:/etc/webapps/tt-rss:/srv/http"
</Directory>
PHPINIDir /etc/webapps/tt-rss
ErrorLog /var/log/httpd/tt-rss.info-error_log
CustomLog /var/log/httpd/tt-rss.info-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerName tt-rss.myserver.net
ServerAdmin admin@myserver.net
DocumentRoot /usr/share/webapps/tt-rss
Redirect permanent tt-rss.myserver.net https://tt-rss.myserver.net/
</VirtualHost>
And there is the culprit:
PHPINIDir /etc/webapps/tt-rss
I just deleted it. It was in my config commented out before.
I must have introduced this error from an old config while merging configs between updated-to php8 and then newly installed php7 compatibility packages. Thank you very very much hoerbert. I was looking through logs for ages and tried a lot of different configs (already thought I totally messed up my setup, and I kind of did, just not totally)
You made my day. Thanks!
watnuss
Offline