Jump to content
Froxlor Forum
  • 0

PDO-MySQL driver not available error when its installed.


Question

Posted

Hello All,

I am trying the cronjob to update certificates but getting this error

froxlor[21536]: The php PDO extension or PDO-MySQL driver is not available
froxlor[21536]: --- DEBUG: #0 /var/www/froxlor/lib/Froxlor/Database/Database.php(213): Froxlor\Database\Database::getDB() #1 /var/www/froxlor/lib/Froxlor/Cron/MasterCron.php(213): Froxlor\Database\Database::__callStatic() #2 /var/www/froxlor/lib/Froxlor/Cron/MasterCron.php(34): Froxlor\Cron\MasterCron::init() #3 /var/www/froxlor/scripts/froxlor_master_cronjob.php(26): Froxlor\Cron\MasterCron::run() #4 {main}
We are sorry, but a MySQL - error occurred.

I know its installed already and I am using the admin portal without any problem.  

13 answers to this question

Recommended Posts

  • 0
Posted

most likely cause for this is PHP being another version on CLI where MySQL extension is missing. 

Which PHP version does the Webinterface show and whats the output of php -v on the shell?

 

  • 0
Posted

Hello!

After update, getting same error. The php -v:

PHP 8.1.4 (cli) (built: Mar 20 2022 16:51:10) (NTS)

the Webinterface shows 

PHP Version 8.0.17

please let me know, how to update

 

  • 0
Posted

Depending on what interface you are using for web, install libapache2-mod-php8.1 or php8.1-fpm or php8.1-cgi and ofc adjust settings in froxlor accordingly.

What is activated/active for CLI is not the same as web.

  • 0
Posted

Server: API FPM/FastCGI

php8.1-fpm ist schon die neueste Version (8.1.4-1+0~20220320.14+debian10~1.gbp16e58c)

how should I adjust settings in froxlor? in gui?

  • 0
Posted

Yes. You need to tell froxlor that you are also using 8.1 now and where to find it (fpm Daemon and PHP config settings)

  • 0
Posted

habe in PHP-FPM Version eingetragen:

1582857986_Bildschirmfoto2022-04-03um08_42_41.thumb.png.d189960882f4ca3d2417afdb193d5ac7.png

und gespeichert.

Anschliessend PHP-Konfiguration angepasst

53871260_Bildschirmfoto2022-04-03um08_43_37.thumb.png.36980b08ecb99a893f18dd83c1c0d495.png

dann bekomm ich nach Aufruf eine Fehlermeldung:

php /var/www/froxlor//install/scripts/config-services.php --froxlor-dir=/var/www/froxlor/ --create
PHP Parse error:  syntax error, unexpected integer "1" in /var/www/froxlor/install/scripts/config-services.php on line 31

Zwischenzeitlich reboot half auch nicht weiter

 

 

 

  • 0
Posted

Du brauchst doch nach dem einfachen hinzufügen einer neuen FPM vesion nicht die das config-services script ausführen. Einfach nur einer oder mehreren kunden/domains diese config zuweisen, wird automatisch benutzt.

Wenn du für froxlor selbst 8.1 haben willst, setzt du die Version für die Froxlor Vhost PHP Config entsprechend um. Der Cronjob macht den Rest.

  • 0
Posted
vor 13 Minuten schrieb d00p:

ist bereits gefixed für die kommende Version, ist auch nur eine Kleinigkeit, das kannst du auch falls nötig in der Datei selbst anpassen: https://github.com/Froxlor/Froxlor/commit/11533c2d7528586af4468ecade74f74a6368d36e

erledigt, dann doch noch was aufgepoppt:

PHP Fatal error:  Uncaught Error: Call to undefined function Froxlor\Config\simplexml_load_file() in /var/www/froxlor/lib/Froxlor/Config/ConfigParser.php:113
Stack trace:
#0 /var/www/froxlor/lib/Froxlor/Cli/Action/ConfigServicesAction.php(103): Froxlor\Config\ConfigParser->__construct()
#1 /var/www/froxlor/lib/Froxlor/Cli/Action/ConfigServicesAction.php(44): Froxlor\Cli\Action\ConfigServicesAction->createConfig()
#2 /var/www/froxlor/lib/Froxlor/Cli/Action/ConfigServicesAction.php(19): Froxlor\Cli\Action\ConfigServicesAction->validate()
#3 /var/www/froxlor/lib/Froxlor/Cli/CmdLineHandler.php(64): Froxlor\Cli\Action\ConfigServicesAction->run()
#4 /var/www/froxlor/lib/Froxlor/Cli/CmdLineHandler.php(47): Froxlor\Cli\CmdLineHandler->__construct()
#5 /var/www/froxlor/install/scripts/config-services.php(28): Froxlor\Cli\CmdLineHandler::processParameters()
#6 {main}
  thrown in /var/www/froxlor/lib/Froxlor/Config/ConfigParser.php on line 113

 

  • 0
Posted
vor 11 Minuten schrieb d00p:

apt install php8.1-xml

done

das ursprüngliche problem bleibt:

Do you want to apply the config now? [y/N]:y
froxlor[4645]: The php PDO extension or PDO-MySQL driver is not available

 

  • 0
Posted

Guck doch einfach via dpkg -l welche PHP 8.0 Pakete du alle installiert hattest oder 7.4 oder welche Version vorher auch immer funktioniert hat und dann installierst du die alle für 8.1 auch...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...