muhyal
November 12, 2021, 7:02am
1
Hi,
Many software on my server run with PHP 7.4, but one only supports 7.3. For this reason, I have done the installation in the link below.
https://www.virtualmin.com/multiplephp/#Installing_PHP_version_56_andor_73_andor_80_on_Ubuntu_1804_and_2004
However, no matter what I did, I could not connect to the database. The connection is fine in PHP 7.4, but after switching to 7.3, the software cannot connect to the database.
What would you recommend on this?
Thank you very much in advance for your support.
SYSTEM INFORMATION
OS type and version:
Ubuntu Linux 20.04.3
Webmin version:
1.981
Virtualmin version:
6.17-3
Related products version:
PHP 7.3.31, 7.4.25, 8.0.12
Whoops
November 12, 2021, 7:51am
2
Its impossible to guess without knowing what application you are referring to. I would probably use something else if it locks down by version.
muhyal
November 12, 2021, 7:56am
3
I tested with two virtualmins configured with the same clean settings. Unable to connect to database with PHP 7.3. However, database connection can be made with PHP 7.4.
The same software works with 7.3 on cPanel or Plesk panel. I synced the Apache modules, PHP extensions and all the configurations one by one but the result is still the same.
Swift framework based PHP software:
Whoops
November 12, 2021, 8:46am
4
Anything in the logs and reports?
muhyal
November 12, 2021, 9:34am
5
Error logs;
[Fri Nov 12 12:32:10.979820 2021] [proxy_fcgi:debug] [pid 1570447:tid 140082195441408] mod_proxy_fcgi.c(1028): [client 10.192.26.76:64627] AH01078: serving URL fcgi://localhost:8002/home/domain/public_html/staff/index.php, referer: https://domain.com/staff/Tickets/Manage/MyTickets/-1
[Fri Nov 12 12:32:10.979828 2021] [proxy:debug] [pid 1570447:tid 140082195441408] proxy_util.c(2339): AH00942: FCGI: has acquired connection for (*)
[Fri Nov 12 12:32:10.979834 2021] [proxy:debug] [pid 1570447:tid 140082195441408] proxy_util.c(2393): [client 10.192.26.76:64627] AH00944: connecting fcgi://localhost:8002/home/domain/public_html/staff/index.php to localhost:8002, referer: https://domain.com/staff/Tickets/Manage/MyTickets/-1
[Fri Nov 12 12:32:10.979946 2021] [proxy:debug] [pid 1570447:tid 140082195441408] proxy_util.c(2602): [client 10.192.26.76:64627] AH00947: connected /home/domain/public_html/staff/index.php to localhost:8002, referer: https://domain.com/staff/Tickets/Manage/MyTickets/-1
[Fri Nov 12 12:32:10.980080 2021] [proxy:debug] [pid 1570447:tid 140082195441408] proxy_util.c(3068): AH02824: FCGI: connection established with 127.0.0.1:8002 (*)
[Fri Nov 12 12:32:10.986539 2021] [proxy_fcgi:error] [pid 1570447:tid 140082195441408] [client 10.192.26.76:64627] AH01071: Got error 'PHP message: Unable to connect to Database. Please verify the username, password, grant permissions and the database status: SWIFT::Initialize', referer: https://domain.com/staff/Tickets/Manage/MyTickets/-1
[Fri Nov 12 12:32:10.986653 2021] [proxy:debug] [pid 1570447:tid 140082195441408] proxy_util.c(2354): AH00943: FCGI: has released connection for (*)
Whoops
November 12, 2021, 10:11am
6
The database is definitely ‘dbname’ and not ‘domain_dbname’ same for the user? Can you connect to database from shell/ command line?
jotst
November 12, 2021, 10:22am
7
Can’t really help
But did you checked with phpinfo file on that location so php-fpm- version is there functional not only in virtualmin GUI!
Also extensions needed some aren’t in the php 7.3 which are there in 7.4
And look for the mysql / mariadb version if supported libraries drivers php versions are there.
Maybe also better to look for that apllication to update to php 7.4 and php 8 support
While 7.3 is hmm EOL almost, so time better spended in updating Aplication to newer php version makes in my eyes more sense here.
(cachings sessions…)
muhyal
November 12, 2021, 7:16pm
8
Hi again,
I noticed the instructions in the link below and created a new database user with the commands below.
nano /root/.my.cnf
[client]
password = MYSQLROOTPASSWORD
CREATE USER 'my_user_using_native_password_auth'@'localhost'IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
And I set this new username and password to my config.php.
What is the way to make this setting permanent, default and bulk on mysql server?
system
Closed
January 11, 2022, 7:17pm
9
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.