Update to version 5.2.11 fails

I’ve been attempting to update:
image
But it fails with the not very helpful message:
image

Here is the laravel.log:
https://pastebin.com/J1jqZU4V

I cannot see anything related to the attempt to update today (12-07-2021).

Thanks in advance for the help…

Kind regards

It could be a file/folder permissions issue

@david do you have any suggestions to debug this?

pastebin is timing out for me.

@AngryWarrior

here is the culprit

 production.ERROR: file_exists(): open_basedir restriction in effect

You’ll need to enable open_basedir

Hi @david
Thank you for your reply.

It working fine now. Not sure what was wrong with the pastebin…

That is why I made this thread here about making a custom php file to override the mainphp.ini here:

Because I wanted to attempt to open/configure open_basedir.
But I had no success with it. :confounded:

How do I do this correctly?

Thanks in advance. :smiley:
Kind regards
AngryWarrior

Hi @david

[2021-07-22 13:17:54] production.ERROR: file_exists(): open_basedir restriction in effect. **File(/tmp/) is not within the allowed path(s):** (/home/www/) {"userId":1,"exception":"[object] (ErrorException(code: 0): file_exists(): open_basedir restriction in effect. File(/tmp/) is not within the allowed path(s): (/home/www/accnt.tennonetworks.net/) at /home/www/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:28)

What “File(/tmp/” is the system/Invoice Ninja talking about?

The system won’t let me update intil this has been resolved.

Thanks in advance.
Kind regards
Daniel

@AngryWarrior

The system downloads the update package an attempts to download and unpack the file in /tmp

it is this directory it cannot access… It seems your system is locking you into /home/www

Thanks for your reply David.

Indeed.
But where is that “temp” folder located?

Kind regards
AngryWarrior.

/tmp is in the root of the file system.

1 Like

Thank you very much David. :smirk:

Kind regards

Hello, is it possible to define the path of the /tmp folder in .env? I’m having Problems with auto-updating

[2021-12-20 16:34:15] production.ERROR: Unable to open “/tmp/v5.3.39.zip” using mode “w+”: fopen(/tmp/v5.3.39.zip): Failed to open stream: Permission denied {“userId”:1,“exception”:"[object] (RuntimeException(code: 0): Unable to open “/tmp/v5.3.39.zip” using mode “w+”: fopen(/tmp/v5.3.39.zip): Failed to open stream: Permission denied at /kunden/xxx_xxx/webseiten/invoice-ninja/vendor/guzzlehttp/psr7/src/Utils.php:357)

I created a tmp folder /invoice-ninja/tmp and changed the path in /config/self-update.php:

‘download_path’ => env(‘SELF_UPDATER_DOWNLOAD_PATH’, ‘/kunden/xxx_xxx/webseiten/invoice-ninja/tmp’),

‘download_path’ => env(‘SELF_UPDATER_DOWNLOAD_PATH’, ‘/kunden/xxx_xxx/webseiten/invoice-ninja/tmp’),

After running php artisan optimize the auto-update worked :+1:

Would it be possible to add a var in .env to make the path-change permanent?

@gottschild

Thanks for reporting this back, i believe you would just use

SELF_UPDATER_DOWNLOAD_PATH="/path"

in your .env and that will be sufficient.

1 Like