Installation on lighttpd web server - error 500

Hey guys,

This is my first attempt at installing and using SuiteCRM.
As I have a homemade lab running under Promox (hypervisor) and Alpine Linux containers, I usually use the lighttpd web server and php-fpm for php projects.
I did the correct installation, including adapting the permissions and being able to execute the installation via the CLI, however, when accessing the application I receive error 500, analyzing the logs I see this:
Deprecated : Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/webapps/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 134

Deprecated : Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/webapps/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 144

Deprecated : Return type of Symfony\Component\HttpFoundation\Session\Session::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/webapps/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 131

Deprecated : Return type of Symfony\Component\HttpFoundation\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/webapps/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 141

Fatal error : Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename “/tmp/url_matching_routes.phpEkJeCB” to “/usr/share/webapps/suitecrm/cache/prod/url_matching_routes.php”: rename(/tmp/url_matching_routes.phpEkJeCB,/usr/share/webapps/suitecrm/cache/prod/url_matching_routes.php): Permission denied in /usr/share/webapps/suitecrm/vendor/symfony/filesystem/Filesystem.php:305 Stack trace: #0 /usr/share/webapps/suitecrm/vendor/symfony/filesystem/Filesystem.php(683): Symfony\Component\Filesystem\Filesystem->rename() #1 /usr/share/webapps/suitecrm/vendor/symfony/config/ResourceCheckerConfigCache.php(123): Symfony\Component\Filesystem\Filesystem->dumpFile() #2 /usr/share/webapps/suitecrm/vendor/symfony/routing/Router.php(296): Symfony\Component\Config\ResourceCheckerConfigCache->write() #3 /usr/share/webapps/suitecrm/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php(39): Symfony\Component\Routing\Router->Symfony\Component\Routing{closure}() #4 /usr/share/webapps/suitecrm/vendor/symfony/routing/Router.php(287): Symfony\Component\Config\ResourceCheckerConfigCacheFactory->cache() #5 /usr/share/webapps/suitecrm/vendor/symfony/routing/Router.php(251): Symfony\Component\Routing\Router->getMatcher() #6 /usr/share/webapps/suitecrm/core/backend/Routes/Service/LegacyNonViewActionRedirectHandler.php(89): Symfony\Component\Routing\Router->matchRequest() #7 /usr/share/webapps/suitecrm/core/backend/Routes/Service/LegacyRouteHandler.php(159): App\Routes\Service\LegacyNonViewActionRedirectHandler->isMatch() #8 /usr/share/webapps/suitecrm/core/backend/Routes/Service/LegacyRouteHandler.php(94): App\Routes\Service\LegacyRouteHandler->isLegacyNonViewActionRoute() #9 /usr/share/webapps/suitecrm/core/backend/Kernel.php(127): App\Routes\Service\LegacyRouteHandler->getLegacyRoute() #10 /usr/share/webapps/suitecrm/public/index.php(34): App\Kernel->getLegacyRoute() #11 {main} thrown in /usr/share/webapps/suitecrm/vendor/symfony/filesystem/Filesystem.php on line 305

I believe it has to do with mod_rewrite, does anyone have any ideas?

Hi,
I think you have to correct permissions for this directory

/tmp/url_matching_routes.phpEkJeCB

May be only for tmp folder and everything under it. Try doing to 777

Thanks

Setting a folder permission to 777 is wrong and should be avoided at all costs.

When a user “needs” to put a folder in 777 it means there are underlying issues. And /tmp is a system folder you should not have to change anything manually, this folder is actually already on 1777 perms (all users can write and read and execute, but only the owner of a file may remove it).

I would rather first ensure that SuiteCRM is correctly configured (all files and folders owned by the web server user, files with 0644 and folders with 2755 perms). Then move to check other stuff, although your issue won’t go past this.

Hi…
he has a homemade lab, and it is for his personal use. So for time being he can do to debug and fix the issue.

In my homelab I learned how to tackle issues correctly. From folder permissions to SELinux and … man everything.
So homelab for me means “the opportunity to learn how to do it correctly without causing negative impact on others”. When the user learns to correctly handle the issue, will be able to handle it every time.

Also minimizes the problems from bad development where all these issues are overlooked.

Cheers.

Thanks for the answers.

Check the permissions and I believe they are correct.

My suspicion is in fact mod_rewrite since I believe that at some point the path “/tmp/url_matching_routes.php” has to be changed to “/usr/share/webapps/suitecrm/cache/prod/url_matching_routes.php” to process something request.




Please run the following on the root of the SuiteCRM folder:

chown -R lighttpd.lighttpd . && \
find . -type d -exec chmod 2755 {} \; && \
find . -type f -exec chmod 644 {} \;

And let me know if the errors persist. I remember coming across this issue (apache) not exactly sure how I solved it but wasn’t something that took much time actually. But please try these and lets see if it makes any difference. (harm won’t do)