NethServer Version:NS8
Module: webserver
Hi, When I finish copying the files of my webapp, it shows me an error of fail to open /vendor/autoload.php
Has anyone had a similar error and was able to solve it?
75#75: *139 FastCGI sent in stderr: "PHP message: PHP Warning: include(/usr/share/nginx/html/9001/vendor/autoload.php):
Hi and welcome to NethServer community,
it seems there’s something missing at the end of your posted error message.
You could check the system log page if there’s a more relevant error message.
Maybe it helps to enable “Root directory file listings” or “URL-aware fopen wrappers” in virtual host advanced settings:
Do you have an example/download of the webapp to check what could be the issue?
related to composer
Hello and welcome!
Unfortunately, as @dnutan said this is entirely a composer related issue.
Did you upload the vendor
directory to the webserver?
Thanks to reply,I think that “composer” is the problem, I already ran the “composer install” or “composer update” commands, I also deleted the “vendor” folder and the “composer.lock” files and ran the “composer” commands again install" or “composer update”
Sorry, cannot try right now.
Is it a custom web application or from a project we can test?
Here are the jaxon installation instructions:
yes is a custom web application.
I have used this library for 2 years, even in the previous version of Nethserver 7, and now that I am trying the new version of Nethserver 8 it gave me problems
As I don’t use to work with composer and neither with containers or podman, probably not the right way to do it but maybe gives you a hint on where to look:
# Puts the required jaxon files on main /app folder (not on /app/9001)
runagent -m webserver1 podman exec -i php8.3-fpm composer require jaxon-php/jaxon-core:~4.1
…and then changing ./vendor/autoload.php
to ../vendor/autoload.php
probably related to container namespaces and finding the right path to run composer command (don’t know if upstream bitnami webserver docker image readme (used as base for NS8 app) has more info on how to use it).
it works!
just made some adjustment:
i ran the commands you suggest and i move files on root path:
from app/vendor to app/9001/vendor/
thanks!!