exodus4d / pathfinder

Mapping tool for EVE ONLINE
https://www.pathfinder-w.space
MIT License
386 stars 252 forks source link

Installation Issue: Class Exodus4D\Pathfinder\Controller\Controller does not exist #1021

Open tohuw opened 3 years ago

tohuw commented 3 years ago
*225 FastCGI sent in stderr: "PHP message: Class 'Exodus4D\Pathfinder\Controller\Controller' not found [/var/www/pathfinder/app/Controller/AppController.php:16]PHP message: [vendor/composer/ClassLoader.php:478] include()PHP message: [vendor/composer/ClassLoader.php:346] Composer\Autoload\includeFile()PHP message: [index.php:27] Base->run()PHP message: Invalid class Exodus4D\Pathfinder\Controller\ControllerPHP message: PHP Fatal error:  Uncaught ReflectionException: Class Exodus4D\Pathfinder\Controller\Controller does not exist in /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php:1875
Stack trace:
#0 /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php(1875): ReflectionClass->__construct()
#1 /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php(1898): Base->grab()
#2 /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php(1343): Base->call()
#3 /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php(2308): Base->error()
#4 [internal function]: Base->{closure}()
#5 {main}
  thrown in /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php on line 1875PHP message: Invalid class Exodus4D\Pathfinder\Controller\ControllerPHP message: PHP Fatal error:  Uncaught ReflectionException: Class Exodus4D\Pathfinder\Controller\Controller does not exist in /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php:1875
Stack trace:
#0 /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php(1875): ReflectionClass->__construct()
#1 /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php(1898): Base->grab()
#2 /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php(2191): Base->call()
#3 [internal function]: Base->unload()
#4 {main}
  thrown in /var/www/pathfinder/vendor/bcosca/fatfree-core/base.php on line 1875" while reading response header from upstream, client: 89.187.175.137, server: pathfinder.fancypants.space, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "pathfinder.fancypants.space"

Installed Pathfinder on a new server (cloned from master). Requirements are installed and directory permissions are configured.

wagnerbastian commented 3 years ago

getting the same error

Maybe it has something to do with an error-msg while installing composer:

Class Exodus4D\Pathfinder\Controller\Controller located in ./app/Controller/Controllerr.php does not comply with psr-4 autoloading standard. Skipping. Class Exodus4D\Pathfinder\Db\Sql\Mysql\TableModifier located in ./app/Db/Sql/Mysql/tablemodifier.php does not comply with psr-4 autoloading standard. Skipping. Class Exodus4D\Pathfinder\Db\Sql\Mysql\Column located in ./app/Db/Sql/Mysql/tablemodifier.php does not comply with psr-4 autoloading standard. Skipping. Class Exodus4D\Pathfinder\Db\Sql\Mysql\Constraint located in ./app/Db/Sql/Mysql/tablemodifier.php does not comply with psr-4 autoloading standard. Skipping. Class Exodus4D\Pathfinder\Model\Universe\AbstractUniverseModel located in ./app/Model/Universe/abstractuniversemodel.php does not comply with psr-4 autoloading standard. Skipping. Class Exodus4D\Pathfinder\Model\Pathfinder\AbstractPathfinderModel located in ./app/Model/Pathfinder/AbstractPathfinderModell.php does not comply with psr-4 autoloading standard. Skipping. Class Exodus4D\Pathfinder\Model\AbstractModel located in ./app/Model/AbstractModell.php does not comply with psr-4 autoloading standard. Skipping.

drkthunder02 commented 3 years ago

In order to fix psr-4 errors, the namespace naming structure and the directory and file naming structure must be the same. Then you have to do composer dump-autoload in order to fix it. I will make notes with any changes I have to do to get the psr-4 structure corrected.

drkthunder02 commented 3 years ago

I have fixed the issue. Rename ./app/Db/Sql/Mysql/tablemodifier.php to TableModifier.php Rename ./app/Model/Universe/abstractuniversemodel.php to AbstractUniverseModel.php Rename ./app/Model/Pathfinder/AbstractPathfinderModell.php to AbstractPathfinderModel.php Rename ./app/Model/AbstractModell.php to AbstractModel.php

Then in the pathfinder directory run composer dump-autoload to reoptimize the files, and all should be good.

wagnerbastian commented 3 years ago

Nice! Thanks very much! That worked and solved the 500 internal Server Error on the Setup page!

Cooperw commented 2 years ago

There is another rename for Controller

Controllerr.php -> Controller.php

mv ./app/Controller/Controllerr.php ./app/Controller/Controller.php
mv ./app/Db/Sql/Mysql/tablemodifier.php ./app/Db/Sql/Mysql/TableModifier.php
mv ./app/Model/Universe/abstractuniversemodel.php ./app/Model/Universe/AbstractUniverseModel.php
mv ./app/Model/Pathfinder/AbstractPathfinderModell.php ./app/Model/Pathfinder/AbstractPathfinderModel.php
mv ./app/Model/AbstractModell.php ./app/Model/AbstractModel.php
composer dump-autoload