CakePHP 4.5 / RHEL 9

72 views Asked by At

I have installed a cakephp 4.5 on a Linux environment (so far no problem). The application works correctly. When I launch the project on a browser, I get the view that displays the state of cakephp (PagesController.php).

The problem is as follows: When I create another controller and change the route (to see if I've reached my controller), it doesn't load and I get the "failed to open stream" error (not all the time).

I've set the rights to root or apache and 777 but it doesn't work. The only manipulation that works is the following:

  • I move a file that already exists when installing cakephp, in my case PagesController.php, to another directory.
  • I copy PagesController.php to PagesController2.php.
  • I move PagesController2.php to its original directory, renaming it PagesController.php. The application still works.
  • I then use the original PagesController.php file and duplicate it again as PagesController2.php.
  • I move PagesController2.php to the Controller directory, renaming it CityController.php for example. I modify my route: $builder->connect('/', ['controller' => 'City', 'action' => 'index', 'home']);

I have access to my page.

The problem is with all the files (css, js, img) I import into my project. The application having been developed locally.

If anyone has any ideas... Thank you.

I've looked at a lot of tutorials but no solution to my problem. I'm ready to try any solution that comes my way.

0

There are 0 answers