I have invoice ninja (open source accounting platform) running on hestia and it works like a charm.
The only issue I have is that when trying to use its automatic update mechanisms I have observed the following:
[2023-09-23 08:16:55] production.ERROR: PharData::__construct(): open_basedir restriction in effect. File(/home/jaquilina/web/billing.eagleeyet.net) is not within the allowed path(s): (/home/jaquilina/.composer:/home/jaquilina/web/billing.eagleeyet.net/public_html:/home/jaquilina/web/billing.eagleeyet.net/private:/home/jaquilina/web/billing.eagleeyet.net/public_shtml:/home/jaquilina/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) {“userId”:1,“exception”:"[object] (ErrorException(code: 0): PharData::__construct(): open_basedir restriction in effect. File(/home/jaquilina/web/billing.eagleeyet.net) is not within the allowed path(s): (/home/jaquilina/.composer:/home/jaquilina/web/billing.eagleeyet.net/public_html:/home/jaquilina/web/billing.eagleeyet.net/private:/home/jaquilina/web/billing.eagleeyet.net/public_shtml:/home/jaquilina/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) at /home/jaquilina/web/billing.eagleeyet.net/public_html/app/Http/Controllers/SelfUpdateController.php:86)
[stacktrace] #0 /home/jaquilina/web/billing.eagleeyet.net/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(254): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}() #2 /home/jaquilina/web/billing.eagleeyet.net/public_html/app/Http/Controllers/SelfUpdateController.php(86): PharData->__construct() #3 /home/jaquilina/web/billing.eagleeyet.net/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\SelfUpdateController->update()
This seems to indicate an openbase_dir restriction is in place. How can I go about fixing this so I can use Invoice Ninja’s automatic update mechanisms?
To add /home/jaquilina/web/billing.eagleeyet.net to open_basedir directive you should create a new php-fpm backend template and once modified, assign it to your web site.
Example using php 8.2 and ninja as a new template name (new template name must have this format YOURNAME-PHP-X_Y.tpl, where X_Y is your PHP version).
cd /usr/local/hestia/data/templates/web/php-fpm/
cp PHP-8_2.tpl ninja-PHP-8_2.tpl
But you get the error always or only when trying to update?
I suppose the problem is that dir /home/jaquilina/web/billing.eagleeyet.net doesn’t have write perms, you could add write perms to that directory but Hestia will change again perms to read only for security reasons.
I would try to reach the vendor to know why it needs to create dirs outside the docroot to update.
I got a reply from Invoice Ninja dev and he said it normally means one needs to increase php memory limits but still doesnt seem to resolve that issue.
There is no need to change the memory limit in the template, create a .user.ini (it has a dot in front) file in your public_html dir with the memory_limit you need, for example:
memory_limit = 256M
The only difference between default and hosting templates is this directive:
disable_symlinks if_not_owner from=%docroot%;
So, if you are not using symbolic links it is fine.
Did you create the right php-fpm template and changed it for your site? Show the output of these commands.
ls -l /usr/local/hestia/data/templates/web/php-fpm/
v-list-web-domain jaquilina billing.eagleeyet.net