formtools / core

The Form Tools Core.

Home Page:https://formtools.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean installation with PHP 8.2 is not working

HonkXL opened this issue · comments

Tying to perform a clean install on AlmaLinux 8 with PHP 8.2 and MariaDB 10.8.8 is not working. On step 3 of the installation it tries to create the tables in the database, but nothing happens. If I click again to "Next" it says that the tables already exists, but in fact the DB is empty. A already installed FormTools on the same server still works.

Here the error message from the log:

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught PDOException: There is no active transaction in /formtools/global/code/Database.class.php:148\nStack trace:\n#0 /formtools/global/code/Database.class.php(148): PDO->rollBack()\n#1 /formtools/global/code/Installation.class.php(88): FormTools\\Database->rollbackTransaction()\n#2 /formtools/install/actions-installation.php(180): FormTools\\Installation::deleteTables()\n#3 {main}\n thrown in /formtools/global/code/Database.class.php on line 148', referer: formtools/install/

Hi man, unfortunately this github forum is terrible to find help.
So I faced the same problem, I downgraded some software and libraries and works. So do it this:

In summary:

  1. Ubuntu 20.04.6 LTS
  2. wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
  3. apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
  4. apt install -f mysql-client=8.0* mysql-community-server=8.0* mysql-server=8.0*
  5. apt-get install php7.4
  6. apt-install pdo-mysql

Reference:
Formtools 3.1.11
Requirements:
Ubuntu 20.04.6 LTS
PHP 7.4
Mysql Ver 8.0.33 for Linux on x86_64

Is the most important: when you setting up mysql please, choose the authentication option to keep the compatibility (Use Legacy Authentication Method) with Mysql 5.x. Any question, let me know.

Website reference:
How to install MySQL 5.7 or 8 on Ubuntu 18.04, 20.04, 22.04
https://www.devart.com/dbforge/mysql/how-to-install-mysql-on-ubuntu/

How to uninstall MySQL from ubuntu 20.04
https://devnote.in/how-to-uninstall-mysql-from-ubuntu-20-04/

PDOException “could not find driver”
https://stackoverflow.com/questions/2852748/pdoexception-could-not-find-driver

MySQL 8.0 is now fully supported in PHP 7.4
https://www.ma-no.org/en/networking/databases/mysql-8-0-is-now-fully-supported-in-php-7-4

How To Install PHP 8.1 and Set Up a Local Development Environment on Ubuntu 22.0
https://www.digitalocean.com/community/tutorials/how-to-install-php-8-1-and-set-up-a-local-development-environment-on-
ubuntu-22-04

How To Install Linux, Apache, MySQL, PHP (LAMP) Stack on Ubuntu 22.04
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-22-04

In general it is not good idea to downgrade to outdated versions. PHP 7.4 is no longer supported and for security reason it should not be used in a productive environment.

In my opinion it's a bug that the installation of formtools is not running in a up to date environment.

A dirty workaround is to set up the aplication in a testenvironment with outdated php and dump the database to the productive system. But it's still a bug...

I have problem instaling formtools on ubuntu 22.04 and php 8.1, apache and nginx.
There is a way to create the tables on MariaDB command line.