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: Fatal error: Uncaught Slim\Exception\HttpNotFoundException while installing ChurchCRM 5.4.0 #6784

Closed
jameswill opened this issue Dec 28, 2023 · 25 comments
Labels
Milestone

Comments

@jameswill
Copy link

Description

Hello ,

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

However, the script throws a following issue while doing so . On hitting setup URL i.e :

http://domain.com/churchcrm/setup the following error is thrown i.e :

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(87): Slim\App->run() #8 {main} thrown in /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php on line 76 
  • ChurchCRM version: 5.4.0
  • PHP version is the server running: 8.1.2
  • DB Server and Version are you running: MYSQL 5.5

Steps To Reproduce

  1. Fill in the db details and url details inside Include/Config.php
  2. Go to http://domain.com/churchcrm/setup
  3. Above error is thrown in browser and same is shown under logs.

Expected behavior

ChurchCRM should be installed successfully

Screenshots and/or logs

Output of slim.log

[28-Dec-2023 01:04:57 America/New_York] PHP 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(87): Slim\App->run()
#8 {main}
  thrown in /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php on line 76

Desktop (please complete the following information):

  • OS: Centos 7
  • Browser [e.g. chrome, safari] : Mozilla Firefox
  • Version : 115.6.0esr (64-bit)

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

@jameswill jameswill added the bug label Dec 28, 2023
@dowen9aol
Copy link

dowen9aol commented Dec 28, 2023

I too am getting this error after upgrading from 5.1.0 to 5.4.0

UPDATE - Upgrading from 5.3.1 to 5.4.0:
I went back to 5.1.0 and manually extracted 5.1.1 and updated DB and all worked great
I then proceeded to do the same with 5.2.0, then with 5.2.1, then with 5.2.2 then with 5.2.3
All the way up through 5.3.1 and all worked great - I could login and navigate.

Then I extracted 5.4.0 and went through the DB upgrade - and the error shows again:
P.S. - I changed my actual path to [mypath] below

404 Not Found
The application could not run because of the following error:

Details

Type: Slim\Exception\HttpNotFoundException
Code: 404
Message: Not found.
File: [mypath]/cms/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php
Line: 76
Trace

#0 [mypath]/cms/vendor/slim/slim/Slim/Routing/RouteRunner.php(56): Slim\Middleware\RoutingMiddleware->performRouting(Object(Laminas\Diactoros\ServerRequest))
#1 [mypath]/cms/ChurchCRM/Slim/Middleware/VersionMiddleware.php(14): Slim\Routing\RouteRunner->handle(Object(Laminas\Diactoros\ServerRequest))
#2 [mypath]/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(168): ChurchCRM\Slim\Middleware\VersionMiddleware->__invoke(Object(Laminas\Diactoros\ServerRequest), Object(Slim\Routing\RouteRunner))
#3 [mypath]/cms/ChurchCRM/Slim/Middleware/AuthMiddleware.php(36): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Laminas\Diactoros\ServerRequest))
#4 [mypath]/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(168): ChurchCRM\Slim\Middleware\AuthMiddleware->__invoke(Object(Laminas\Diactoros\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#5 [mypath]/cms/vendor/slim/slim/Slim/Middleware/BodyParsingMiddleware.php(64): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Laminas\Diactoros\ServerRequest))
#6 [mypath]/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\BodyParsingMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#7 [mypath]/cms/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Laminas\Diactoros\ServerRequest))
#8 [mypath]/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#9 [mypath]/cms/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Laminas\Diactoros\ServerRequest))
#10 [mypath]/cms/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Laminas\Diactoros\ServerRequest))
#11 [mypath]/cms/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Laminas\Diactoros\ServerRequest))
#12 [mypath]/cms/v2/index.php(40): Slim\App->run()
#13 {main}

@bja2u
Copy link

bja2u commented Dec 29, 2023

Likewise just upgraded from 5.1.0 to 5.4.0 running php 8.1 and receive the "Upgrade Required" screen using Chrome browser V.120

@DAcodedBEAT
Copy link
Contributor

I was unable to reproduce this locally, @bja2u can you help debug this?

@bja2u
Copy link

bja2u commented Dec 29, 2023

Logs state:

defaultLogger.INFO: Current Version: 5.1.1 {"dbVersion":"5.1.1","softwareInstalledVersion":"5.4.0"} {"url":"/SystemDBUpdate.php?upgrade=true","correlation_id":
[2023-12-28T16:29:14.283449-08:00] defaultLogger.WARNING: No upgrade path for 5.1.1 to 5.4.0 [] {"url":"/SystemDBUpdate.php?upgrade=true","correlation_id":
[2023-12-28T16:29:14.309924-08:00] defaultLogger.INFO: Complete database upgrade; redirecting to Main menu [] {"url":"/SystemDBUpdate.php?upgrade=true",,"correlation_id"
[2023-12-28T16:29:14.438822-08:00] defaultLogger.INFO: Database is not current, redirecting to SystemDBUpdate [] {"url":"/Menu.php",,"correlation_id"

@bja2u
Copy link

bja2u commented Dec 29, 2023

I used the upgrade option in the application

@DAcodedBEAT
Copy link
Contributor

@bja2u this sounds like a different issue than what was initially reported

@bja2u
Copy link

bja2u commented Dec 29, 2023

ok. Ill add a new issue for mines then.

@DawoudIO
Copy link
Contributor

ya the 5.4.0 build had an upgrade DB bug... fixing it in 5.4.1 which will be released today

@MrClever
Copy link
Collaborator

Interestingly, my script-based upgrade on my production system didn't have a problem :-/ I simply backup the .htaccess file (need to maintain that due to my hosting provider), then extract the zip over the top, set permissions, put back the .htaccess and run through the DB upgrade in a browser.

@DAcodedBEAT
Copy link
Contributor

Yeah, I'm a little surprised too because I also upgraded to 5.4.0 via the db upgrade just fine (I was the first installation to confirm it works)

@DawoudIO
Copy link
Contributor

Please give it a try with 5.4.1

@DawoudIO DawoudIO added this to the v5.4.1 milestone Dec 30, 2023
@bja2u
Copy link

bja2u commented Dec 30, 2023

Just installed 5.4.1 no issues for me! thanks for prompt resolution! Happy New Year!

@dowen9aol
Copy link

dowen9aol commented Dec 31, 2023 via email

@jameswill
Copy link
Author

jameswill commented Jan 2, 2024

Hello @DawoudIO ,

Sorry for the late reply.

However, I get this same error with the latest 5.4.2 fresh install on the above mentioned environment i.e :

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 

How do I resolve this ?.

@bja2u
Copy link

bja2u commented Jan 3, 2024

I am getting this on 5.4.2:

[2024-01-03T10:23:35.072199-06:00] slim-app.ERROR: Slim Application Error Type: TypeError Code: 0 Message: ChurchCRM\Slim\Request\SlimUtils::renderJSON(): Argument #2 ($obj) must be of type array, string given, called in /api/routes/system/system-upgrade.php on line 21 File: /ChurchCRM/Slim/SlimUtils.php

@jameswill
Copy link
Author

jameswill commented Jan 5, 2024

Hi,

I tried 5.4.3 version and getting the same error on starting the installation page. I am using Linux server with PHP 8.1 and Mysql 5.7 I followed the following steps.

  1. Downloaded the zip
  2. Renamed the /include/config.php.example to /include/config.php
  3. Filled DB details.
  4. Access to web to install the script and getting the following error.
Fatal error: Uncaught Slim\Exception\HttpNotFoundException: Not found. in [[path]]/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php:76 Stack trace:
#0 [[path]]/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(44): Slim\Middleware\RoutingMiddleware->performRouting(Object(Laminas\Diactoros\ServerRequest))
#1 [[path]]/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#2 [[path]]/ChurchCRM/Slim/Middleware/VersionMiddleware.php(14): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Laminas\Diactoros\ServerRequest))
#3 [[path]]/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): ChurchCRM\Slim\Middleware\VersionMiddleware->__invoke(Object(Laminas\Diactoros\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#4 [[path]]/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Laminas\Diactoros\ServerRequest))
#5 [[path]]/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Laminas\Diactoros\ServerRequest))
#6 [[path]]/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Laminas\Diactoros\ServerRequest))
#7 [[path]]/session/index.php(91): Slim\App->run()
#8 {main} thrown in [[path]]/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php on line 76 

@MrClever
Copy link
Collaborator

MrClever commented Jan 8, 2024

Just renaming the configuration file and filling out the DB connection details is only half the information needed for the application to run. Please review the $sRootPath and $URL[0] elements below the database configuration in that file. The system assumes that if a Config.php file exists, it is fully populated with the necessary information (not just the database).

@jameswill
Copy link
Author

Just renaming the configuration file and filling out the DB connection details is only half the information needed for the application to run. Please review the $sRootPath and $URL[0] elements below the database configuration in that file. The system assumes that if a Config.php file exists, it is fully populated with the necessary information (not just the database).

Sorry for the half info..I have added $sRootPath and $URL[0] as well and getting the same error.

@MrClever
Copy link
Collaborator

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

@dowen9aol
Copy link

dowen9aol commented Feb 1, 2024 via email

@ceemjay
Copy link

ceemjay commented Feb 20, 2024

I have just done a new install on 5.5.0 on shared Linux hosting - at eukhost - and now getting the same error message.
Fatal error: Uncaught Slim\Exception\HttpNotFoundException: Not found.
in /home/felmersham/claphamparishchurch.com/churchcrm/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php:76

I have only just discovered ChurchCRM after having installed Churchinfo on the same server which installed fine, I have installed CI for several different churches before.

Happy to provide more info if needed. Thanks

@grayeul
Copy link
Contributor

grayeul commented Feb 20, 2024

I believe this problem has likely been fixed by #6881 and has been merged into master (if you are able to pull/run from git). A new release is expected at some point before long, that should include this.

@ceemjay
Copy link

ceemjay commented Feb 20, 2024

OK never done that before but will give it a go.
I thought that the problem had been fixed in a version earlier than 5.5.0 - apologies if I misunderstood,

@DAcodedBEAT
Copy link
Contributor

Actually just looked - sadly I am no expert with github so if you (or anyone else) could advise as to what I need to do to get this update I would be most grateful. Thanks

Hello @ceemjay!

Currently there is no action for you to take (unless you want to run code which hasn't been officially released).

We will try to cut a release either this week or next week. Once this new version is released, try to re-install ChurchCRM on your shared hosting provider.

@ceemjay
Copy link

ceemjay commented Feb 20, 2024

Actually just looked - sadly I am no expert with github so if you (or anyone else) could advise as to what I need to do to get this update I would be most grateful. Thanks

Hello @ceemjay!

Currently there is no action for you to take (unless you want to run code which hasn't been officially released).

We will try to cut a release either this week or next week. Once this new version is released, try to re-install ChurchCRM on your shared hosting provider.

Well I am keen to get it working and not wait. I copied the 6 changed files and have not got a login prompt. Hopefully everything will be OK now!!!

Many thanks to all for the help.

PS I was too slow to delete my last post !!

This issue was closed.
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

8 participants