Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: ChurchCRM 5.5.0 Installation issue #6826

Closed
pinalgirkar opened this issue Jan 19, 2024 · 20 comments
Closed

Bug: ChurchCRM 5.5.0 Installation issue #6826

pinalgirkar opened this issue Jan 19, 2024 · 20 comments
Labels
Milestone

Comments

@pinalgirkar
Copy link

pinalgirkar commented Jan 19, 2024

Description
Hello ,

I was in the process of manual installation of ChurchCRM 5.5.0 on Centos 7 Apache 2.2, MYSQL 5.5, PHP 8.1.2.

However, the script throws an issue while hitting setup URL {protocol://domain.com/churchcrm/setup}. The slim.log file has been attached which is generated in the logs directory
2024-01-19-slim.log

  • ChurchCRM version: 5.5.0
  • PHP version the server running: PHP 8.2.13
  • DB Server and Version the server is running: MySQL 5.5.62

Steps To Reproduce

  1. Install the zip file
  2. Unzip the file and give chown permission
  3. And then visit the URL ([protocol]://[domain_name]/churchcrm/setup) on browser and the error occurs

📋 Logs:

Fatal error: Uncaught Slim\Exception\HttpNotFoundException: Not found. in [[path_to_churchcrm]]/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php:76 Stack trace:
#0 [[path_to_churchcrm]]/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(44): Slim\Middleware\RoutingMiddleware->performRouting(Object(Laminas\Diactoros\ServerRequest))
#1 [[path_to_churchcrm]]/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous)) #2 [[path_to_churchcrm]]/ChurchCRM/Slim/Middleware/VersionMiddleware.php(14): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Laminas\Diactoros\ServerRequest))
#3 [[path_to_churchcrm]]/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): ChurchCRM\Slim\Middleware\VersionMiddleware->__invoke(Object(Laminas\Diactoros\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#4 [[path_to_churchcrm]]/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Laminas\Diactoros\ServerRequest))
#5 [[path_to_churchcrm]]/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Laminas\Diactoros\ServerRequest))
#6 [[path_to_churchcrm]]/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Laminas\Diactoros\ServerRequest))
#7 [[path_to_churchcrm]]/session/index.php(91): Slim\App->run()
#8 {main} thrown in [[path_to_churchcrm]]/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php on line 76

Expected behavior

The installation wizard should load

Desktop (please complete the following information):

  • OS and Version: Centos 7
  • Browser (and Version): Chrome/120.0.0.0 Safari

Could you please replicate this issue at your end and fix this?.

@MrClever
Copy link
Collaborator

MrClever commented Jan 22, 2024

This seems to be the same issue that was raised in #6824 and possibly related to #6784

@jpowell53590
Copy link

I'm having the same issue here too. I'm on a shared hosting platform. Running PHP 8.2.

My site is using https (SSL) and do prefer to use secure URLs. Sounds like a mod-rewrite issue since version 5.3.x works fine.

I will be installing 5.3 into a new folder to see what differences are in config.php file and apply the changes to the 5.5 version

@MrClever
Copy link
Collaborator

@jpowell53590 / @pinalgirkar - there were a number of fixes rolled into the 5.5.0 release. Have you tried that?

@jpowell53590
Copy link

@jpowell53590 / @pinalgirkar - there were a number of fixes rolled into the 5.5.0 release. Have you tried that?

I AM trying to get 5.5.0 working using the cPanel install. The 5.3.x was via the Scriptalious (sp?). (the web hosting company did not have the 5.5 available, only the 5.3 which worked just fine with https. My site is using SSL and ChurchCRM 5.5.0 is looking for a http path

@MrClever
Copy link
Collaborator

ChurchCRM is protocol agnostic - it makes no difference to the app if you're using SSL or not. However, it's important to make sure the $URL[x] array in the Include/Config.php file correctly references the protocol in use for all the access addresses (domains etc) you plan to use (https or http etc). Also, see the notes in that file on using shared SSL certificates too. I also recommend not using the 5.3.0 release as there are known bugs with the installer in that release.

@jpowell53590
Copy link

jpowell53590 commented Feb 1, 2024

I installed ChurchCRM from my web hosting Softaculous catalog which has version 5.3 and that version works just fine. I then looked at the config.php file in the working CRM and fixed the broken (5.5.0) CRM version. Saved my changes and tried again. Still throws a fatal error which I copied/pasted here. I noticed it's a little different

Fatal error: Uncaught Slim\Exception\HttpNotFoundException: Not found. in
/home/[redacted_serverpath]/members/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php:76 Stack trace:
#0 /home/[redacted_serverpath]/members/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(44): Slim\Middleware\RoutingMiddleware->performRouting()
#1 /home/[redacted_serverpath]/members/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process()
#2 /home/[redacted_serverpath]/members/ChurchCRM/Slim/Middleware/VersionMiddleware.php(14): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#3 /home/[redacted_serverpath]/members/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): ChurchCRM\Slim\Middleware\VersionMiddleware->__invoke()
#4 /home/[redacted_serverpath]/members/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#5 /home/[redacted_serverpath]/members/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle()
#6 /home/[redacted_serverpath]/members/vendor/slim/slim/Slim/App.php(183): Slim\App->handle()
#7 /home/[redacted_serverpath]/members/session/index.php(91): Slim\App->run()
#8 {main} thrown in /home/[redacted_serverpath]/members/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php on line 76

@jpowell53590
Copy link

P.S. I redacted the server path from that stack trace. It does not launch the setup page or give me the login screen.

I think your manual install instructions needs a few more steps. I checked the chmod permissions and they're correct.

@MrClever
Copy link
Collaborator

MrClever commented Feb 1, 2024

P.S. I redacted the server path from that stack trace. It does not launch the setup page or give me the login screen.

That's fine - we're really only interested in the ChurchCRM root and the directories/files under that.

I think your manual install instructions needs a few more steps. I checked the chmod permissions and they're correct.

Please let me know which page you used, so we can update it.

@jpowell53590
Copy link

The page I was using to manually install ChurchCRM:
https://github.com/ChurchCRM/CRM/wiki/Installing-ChurchCRM-in-Cpanel-shared-hosting

I did not have to do step #15 -- I verified that the files (644) and directories (755) have the correct permissions

it would be nice if there were some steps about editing the include/config.php file UNLESS the setup script was supposed to do that when accessing ChurchCRM for the first time.

P.S. The URL path I see when the error stack trace appears is https://[my domain]/[level1_dir]/[level2_dir]/session/begin

@MrClever
Copy link
Collaborator

MrClever commented Feb 1, 2024

I amended step 15 so it says check and change if necessary etc. As for the config file, that shouldn't need touching for the vast majority of users as the setup process populates everything so you end up with a working configuration. If that's not happening then it's a failure of the setup process. We support people as much as possible when things go wrong, but given the multitude of hosting configurations, we will never be able to code something that is 100% reliable with every/any possible hosting configuration.

Thanks for the feedback on the CPanel documentation.

@jpowell53590
Copy link

You're very welcome. And definitely agree with you on the myriad of hosting configurations ...it's a mess. You're definitely correct you won't be able to create one script for all configurations.

My brain is shutting down, but tomorrow I will rename the config.php file and copy over the sample and just put in the URL[0] path and see what happens. I'm a retired programmer so my logic thinking is that it fails when trying to start a Slim session. So, it can't run the setup script.

@TiagoMRodrigues
Copy link
Contributor

doing a fresh install in here. Had to go back to version 5.3.1 to not have this error.
tried before 5.5.0, 5.4.1, even master(541e231), deleted db between all of them. and kept the same config file that eventually worked on 5.3.1

@tonyatan62
Copy link

Hello there. I am new here and trying to install and I am having problem to do the installation. I am hoping that someone can help me. The following is the details and the logs that I am getting. I really appreciate your help on this.

ChurchCRM version: 5.5.0
PHP version the server running: PHP version: 8.1.27
DB Server and Version the server is running: MySQL 5.7.44

I alco check the folder and file permissions and they are set as 644 and 755 respectively.

Logs:
PHP Warning: require_once([path]/public_html/churchcrm/vendor/composer/autoload_real.php): Failed to open stream: No such file or directory in /home/contactirect/public_html/churchcrm/vendor/autoload.php on line 23
PHP Fatal error: Uncaught Error: Failed opening required '[path]/public_html/churchcrm/vendor/composer/autoload_real.php' (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in [path]/public_html/churchcrm/vendor/autoload.php:23

Stack trace:
#0 [path]public_html/churchcrm/setup/index.php(14): require_once()
#1 {main}
thrown in [path]/public_html/churchcrm/vendor/autoload.php on line 23
PHP Fatal error: Uncaught Error: Call to undefined function ChurchCRM\dto\gettext() in [path]/public_html/churchcrm/ChurchCRM/dto/SystemConfig.php:87
Stack trace:
#0 [path]/public_html/churchcrm/ChurchCRM/dto/SystemConfig.php(297): ChurchCRM\dto\SystemConfig::buildConfigs()
#1 [path]/public_html/churchcrm/setup/index.php(18): ChurchCRM\dto\SystemConfig::init()
#2 {main}
thrown in [path]/public_html/churchcrm/ChurchCRM/dto/SystemConfig.php on line 87
PHP Fatal error: Uncaught Error: Call to undefined function ChurchCRM\dto\gettext() in [path]/public_html/churchcrm/ChurchCRM/dto/SystemConfig.php:87

@TiagoMRodrigues
Copy link
Contributor

TiagoMRodrigues commented Feb 15, 2024

did you copy Include/Config.php.example to Include/Config.php and did all necessary changes?

@tonyatan62
Copy link

hi Tiago - thanks for the reply. I did that, I changed the contect of config.php.example and saved that on the same folder as include/config.php. However it seems the log is still saying the same thing.

@DawoudIO
Copy link
Contributor

This is the issue I think

Call to undefined function ChurchCRM\dto\gettext()

How was this server built it is on a hosting system

Also what is OS, check to make
sure you have gettext installed, we have not seen this issue in ages

@DAcodedBEAT
Copy link
Contributor

@pinalgirkar / @jpowell53590 / @tonyatan62 Great news! @grayeul was able to identify the root cause of the original problem (which came from the Slim Http Framework upgrade in ChurchCRM v5.4.0) (#6880), contribute the fix (#6881), and this fix has now been merged! Be on the look out for the next release of ChurchCRM! 🎉

@DAcodedBEAT DAcodedBEAT added this to the vNext milestone Feb 19, 2024
@DawoudIO
Copy link
Contributor

DawoudIO commented Mar 8, 2024

Please test with 5.6.0 release

@DawoudIO DawoudIO closed this as completed Mar 8, 2024
@jpowell53590
Copy link

jpowell53590 commented Mar 8, 2024 via email

@DawoudIO
Copy link
Contributor

DawoudIO commented Mar 9, 2024

glad it worked, yes file a PR with the changes and we can include it... we sometime hide the church name / logo for privacy, so if we can make that a flag in the setting it would be better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants