Hi there,
I’m encountering a PHP fatal error when requesting any phpList API endpoints:
<b>Fatal error</b>: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'examplecom_phpl141.phplist_config' doesn't exist in /home/examplecom/phplist.example.com/base/config/parameters.php:29
Stack trace:
#0 /home/examplecom/phplist.example.com/base/config/parameters.php(29): PDO->prepare('select value fr...')
#1 /home/examplecom/phplist.example.com/base/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php(41): include('/home/examplecom/...')
#2 /home/examplecom/phplist.example.com/base/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php(44): Symfony\Component\DependencyInjection\Loader\ProtectedPhpFileLoader->Symfony\Component\DependencyInjection\Loader\{closure}('/home/examplecom/...')
#3 /home/examplecom/phplist.example.com/base/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/DelegatingLoader.php(40): Symfony\Component\DependencyInjection\Loader\PhpFileLoader->load('/home/examplecom/...', NULL)
#4 /home/examplecom/phplist.ex in <b>/home/examplecom/phplist.example.com/base/config/parameters.php</b> on line <b>29</b><br />
Note: I redacted original domain name and replaced it with example
It’s a clean and brand new phpList 3.6.6 install through cPanel. The admin area works great apparently as well as the public pages. The fatal error is there before and after API activation and no matter if it’s an authenticated request or not.
I checked with phpMyAdmin and examplecom_phpl141
table exists, but of course, not examplecom_phpl141.phplist_config
table mentioned in the first line (If I understand the error correctly).
For practical reason, this is line #29 of ./base/config/parameters.php
:
$statement = $pdo->prepare("select value from phplist_config where value = :value");
I also looked at ./config/config.php
and everything looks good to me (credentials, table prefix, etc.).
Finally phpList 3.6.6 is running on PHP 7.4 and the database server is MariaDB 10.3.32.
Does anyone have an idea how to solve this problem?
Thanks!
Edit: the issue is reported here https://github.com/phpList/phplist3/issues/583