Topic: install issue on my web server

Hello,
I am trying to setup FA on my web server. However in the final step 5 of the setup I get error. It gives the following errors.

session_start(): open(/var/php_sessions/sess_3fb6225dd22252b4d515f15d9deecf50, O_RDWR) failed: No such file or directory (2) in file: /hermes/bosnaweb22a/b140/ipw.mhasan/account/install/isession.inc at line 94
session_start(): Failed to read session data: files (path: /var/php_sessions) in file: /hermes/bosnaweb22a/b140/ipw.mhasan/account/install/isession.inc at line 94
mysqli_connect(): (HY000/2002): No such file or directory in file: /hermes/bosnaweb22a/b140/ipw.mhasan/account/includes/db/connect_db_mysqli.inc at line 206
Undefined index: dbname in file: /hermes/bosnaweb22a/b140/ipw.mhasan/account/includes/db/connect_db_mysqli.inc at line 208
mysqli_select_db() expects parameter 1 to be mysqli, bool given in file: /hermes/bosnaweb22a/b140/ipw.mhasan/account/includes/db/connect_db_mysqli.inc at line 208
Undefined index: dbname in file: /hermes/bosnaweb22a/b140/ipw.mhasan/account/includes/db/connect_db_mysqli.inc at line 210
mysqli_query() expects parameter 1 to be mysqli, bool given in file: /hermes/bosnaweb22a/b140/ipw.mhasan/account/includes/db/connect_db_mysqli.inc at line 213
Cannot connect to database. User or password is invalid or you have no permittions to create database.

I created a mysql database and entered any information correctly. I dont understand whats wrong.
Can you please help?

Re: install issue on my web server

Looks like the directory permissions of /var/ is not right. You need to set the permissions to allow. Is it root server or cpanel based server.

If it's root server you can do that with help of terminal.

For the cpanel based server check with hosting provider to set the permissions for you to continue.

Subscription service based on FA
HRM CRM POS batch Themes

Re: install issue on my web server

can you please elaborate what permissions i should ask for from my hosting provider? just enough so i can ask the right question. I contacted my hosting provider and they said FA can be used through their service, but being an external software, they were not allowed to help setup the software.

======
FYI I dont understand many of this stuff. I first setup FA on my local machine and liked it very much. Hence wanted to move to a web to get easy access from anywhere.

======
Really appreciate your help

Re: install issue on my web server

Just tell them. Their hosting does not store the sessions due to permission problem server. Just show them the errors and tell them. These errors are not because of the software. It happened with their hosted server permissions. Not the software files.

Subscription service based on FA
HRM CRM POS batch Themes

Re: install issue on my web server

I am getting the same problem on my own server. Database has been created in mysql as well as user and password, permisions are all green, but no matter what I put in, the user name, root, localhost, ip address, all fail with the same/similar error message.

mysqli_connect(): (HY000/2002): No such file or directory in file: /hermes/bosnaweb22a/b140/ipw.mhasan/account/includes/db/connect_db_mysqli.inc at line 206

I have been through the forum and have seen the same problem many times. A post suggested altering line 203, but the correction offered does not reflect the actual line 203

Example : this is missing a large chunck of the actual line

$db = mysqli_connect($connection["host"], $connection["dbuser"], $connection["dbpassword"]);

change to

$db = mysqli_connect($connection["host"], $connection["dbuser"], $connection["dbpassword"],NULL,3307);
Where 3307 is your mysql port.

and line 208 posted solutions

Line 208 of the file includes/db/connect_db_mysqli.inc is:

if (!mysqli_select_db($db, $connection["dbname"]))

A possible modification to it would be:

if (!$connection["dbname"] && !mysqli_select_db($db, $connection["dbname"]))

are also different from the actual line 208.

I have tried this from every angle and can't find a solution, it is a recurring problem and theme on this forum, can someone please help. I can't check out the program if I it won't let me install it.

6 (edited by kvvaradha 04/24/2020 07:52:33 am)

Re: install issue on my web server

The issue he initiated is different than your issue. The session failure is php library missing issue from the hosting provider.  Your issue is connected with MySql server port number. Sometimes the MySql server needs to connect it with its port number. Usually the default port no is 3306. But some servers the port no might be configure with another available port.

Here your problem is the port no,  you have to get right port no to connect the MySql server.  And also don't forget to check the MySql server credentials.

Update
Looks like your MySql server is down or port no changed.

Subscription service based on FA
HRM CRM POS batch Themes

7 (edited by hendersonbeattie 04/24/2020 10:22:38 am)

Re: install issue on my web server

After much effort got it working.

The system will not let me continue as root full stop.

I created a user and granted privileges via mysql, so it should have all worked, but it didn't, it just kept reporting the same error.

So I installed phpMyAdmin, which did not want to install mcrypt, but with a lot of research I was able to get it installed (this is some bug with Ubuntu 18.04 server apparently). Then phpmyadmin hid itself in usr/share, so I had to put a link from /var/www/html to phpmyadmin in usr/share.

phpmyadmin finally worked and to my shock I discovered that the user I had created and given privileges to and was showing as having privileges in mysql, had not been given privileges?? So on the phpmyadmin panel I was able to grant the user priveleges.

And then I was able to log in.

What a journey.

I do not recommend changing the config files as suggested, as it was reporting the correct error, no permission, the problem was mysql not granting the permissions it was supposed to.

I hope this might help any one else with the same headache.

Re: install issue on my web server

Perfect and thanks for writing it here. So in future people will get it sorted by themselves.

Subscription service based on FA
HRM CRM POS batch Themes