YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.72k stars 742 forks source link

[bug] Unsuccessful Installation #12668

Closed ozinfotech closed 4 years ago

ozinfotech commented 4 years ago

🐞 bug report

⁉️ Describe the bug

I downloaded the complete version (5.2.0) of YetForceCRM. The process of installing via the web interface was fine until the final stage where I received an "installation unsuccessful" error.

πŸ”₯ How to trigger the error

Steps to reproduce the behavior:

  1. wget the complete [YetiForceCRM version 5.2.0] (https://github.com/YetiForceCompany/YetiForceCRM/releases/download/5.2.0/YetiForceCRM-5.2.0-complete.zip) from a command line
  2. Unzip the files
  3. Enable debugging according to the section below
  4. Start the installation process from a web browser and ensure requirements are met (note: I am seeing an error for the .htaccess file and reported it here)
  5. Finalize the installation
  6. Receive "Installation unsuccessful" error

πŸ‘Ž Actual Behavior

Receive an "installation unsuccessful" error when attempting to install for the first time.

πŸ‘ Expected Behavior

Was hoping the installation would have occurred correctly.

πŸ‘· Testing

N/A as these tests assume that the CRM is installed.

πŸ“· Screenshot of configuration

πŸ“ PHP/Apache/Nginx/Browser/CRM Logs

For the e-mail, I am including screenshot and cache/logs/system.log as that is the only log in the cache/logs folder.

🌍 Your Environment

Environment Version / Name
YetiForce 5.2.0
Web server (name and version) Apache 2.4.41
PHP 7.3.15
Browser (name and version) Google Chrome Version 80.0.3987.122 (Official Build) (64-bit)
Operating System (name and version) CENTOS 7.7
Database (name and version) mySQL phpMyAdmin v4.9.4 with WHM version 86.0.9

❓ Additional context

None at this time.

❗️ Inform the community if you solve the problem

davide-alghi commented 4 years ago

Hi @ozinfotech, you have to fix your htaccess problem before install. you wrote VHM as webserver, but that is your web host manager, not the webserver: maybe is it apache?

anyway, to enable htaccess you need something like this

<Directory /var/www/html/yetiforcefolder/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

into your web server virtualhost file (AllowOverride All is mandatory)

mariuszkrzaczkowski commented 4 years ago

it looks like there is a problem loading the database. send php error logs and database logs

ozinfotech commented 4 years ago

Hi @ozinfotech, you have to fix your htaccess problem before install. you wrote VHM as webserver, but that is your web host manager, not the webserver: maybe is it apache?

anyway, to enable htaccess you need something like this

<Directory /var/www/html/yetiforcefolder/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

into your web server virtualhost file (AllowOverride All is mandatory)

DOH! You are right, I've updated the webserver as Apache 2.4.41.

For some reason, I can't seem to get the changes to show up in the httpd.conf file. I've used all of the 'safe' locations to edit the files by adding that directive with the proper folder location including _/etc/apache2/conf.d/includes/pre_mainglobal.conf, _/etc/apache2/conf.d/includes/pre_virtualhostglobal.conf, and _/etc/apache2/conf.d/includes/post_virtualhostglobal.conf. Whenever I restart Apache, however, the directive never gets integrated. I tried doing it in a single file and restarting Apache, then moving to the next file when it didn't work. I even tried all three files at once and still can't seem to get it to show up in the httpd.conf file.

it looks like there is a problem loading the database. send php error logs and database logs

I've got the SQL_DIE_ON_ERROR variable set to true in the Debug.php file. When I set it to false, I still got an 'installation unsuccessful' error. To retry the installation I had to keep dropping all the tables to try the install again. It appears that until the .htaccess issue is resolved, I'm stuck doing this unless you really want me to do it and see what happens.

davide-alghi commented 4 years ago

as Mariusz suggests, please attach Apache error log and MySql log. the logs only from start installation time to installation crash time

ozinfotech commented 4 years ago

I think I found a bug in cPanel. I finally figured out I needed to put a custom .conf file for that host according to the httpd.conf file (and your instructions) for ensuring that the .htaccess problem is resolved. After creating the file and running the '_/scripts/ensure_vhostincludes --all-users' script, the httpd.conf file only includes the custom .conf file for port 80, but not port 443,. I'm requesting assistance from cPanel to fix this, and then I'll continue with the error logs if there are still issues.

EDIT: It wasn't a bug. I didn't include a .conf file in the 'ssl' folder as well. Now that it is straightened out, I'll work on installing again tomorrow.

ozinfotech commented 4 years ago

security note: please @ozinfotech, remember to change your DB and YF password because into your logs they're in clear

The Apache error log fills up with those errors after the web site has been dormant for a while. I have the site locked down just to specific IP addresses at the moment, so there should not be anything hitting it from the public internet.

mariuszkrzaczkowski commented 4 years ago

The ModSecurity module in apache blocked the installation, admin server must take care of it

[Thu Mar 12 16:41:05.135314 2020] [:error] [pid 13705] [client 165.x.x.x:43680] [client 165.x.x.x] ModSecurity: collections_remove_stale: Failed to access DBM file "/var/cpanel/secdatadir/yetiuser-global": Permission denied [hostname "domain.name"] [uri "/install/Install.php"] [unique_id "XmqsbbtmQKi0jhF0e7gYzgAAAAU"]
[Thu Mar 12 16:41:05.135466 2020] [:error] [pid 13705] [client 165.x.x.x:43680] [client 165.x.x.x] ModSecurity: collections_remove_stale: Failed to access DBM file "/var/cpanel/secdatadir/yetiuser-ip": Permission denied [hostname "domain.name"] [uri "/install/Install.php"] [unique_id "XmqsbbtmQKi0jhF0e7gYzgAAAAU"]
davide-alghi commented 4 years ago

security note: please @ozinfotech, remember to change your DB and YF password because into your logs they're in clear

ozinfotech commented 4 years ago

security note: please @ozinfotech, remember to change your DB and YF password because into your logs they're in clear

I had sanitized the passwords before I attached the files, but I'll change anyway since I still can't get it installed, even with ModSecurity turned off. I'll get some more logs today.

ozinfotech commented 4 years ago

This time around, after disabling ModSecurity, the Apache error logs were not updated with any errors. Same thing with the SQL logs.

Attached is another sanitized system.log. system.log

With these errors, I'm wondering if it has something to do with the database since it never gets populated at all.

2020-03-16 19:54:02.7747 [info][yii\db\Connection::open] - Opening DB connection: mysql:host=localhost;dbname=db_yeti;port=3306
2020-03-16 19:54:03.4873 [info] - Cannot translate this: 'MySQL' for module 'Install', lang: en-US
2020-03-16 19:54:03.5049 [info] - Cannot translate this: 'mysql' for module 'ConfReport', lang: en-US
2020-03-16 19:54:03.5049 [info] - Cannot translate this: 'MariaDb' for module 'ConfReport', lang: en-US
2020-03-16 19:54:03.5049 [info] - Cannot translate this: '10.0.38' for module 'ConfReport', lang: en-US

And also attached is a new sanitized _errorlog. error_log

mariuszkrzaczkowski commented 4 years ago

strange that in logs you have global variables empty should be given in them

$_GET = []
$_POST = []

send us a phpinfo email (github@yetiforce.com)

ozinfotech commented 4 years ago

Attached is sanitized information. info.pdf

ozinfotech commented 4 years ago

Did you all have a chance to check this out?

mariuszkrzaczkowski commented 4 years ago

No configuration errors are visible, your administrator should take care of it or you can buy the support package and we will verify that.

ozinfotech commented 4 years ago

Got it resolved. Thanks!

mariuszkrzaczkowski commented 4 years ago

give details of the solution to your problem

ozinfotech commented 4 years ago

I did nothing as I was out of work for a couple weeks, but when I went to install today it went fine. I could tell it was going to be different when the page asking for the name of the company had a couple other fields it didn't have before. I wish I could say I did something on my end to make it work, but it appears that waiting for whatever reason did the trick.