Hi,
I have successfully updated nextcloud on a raspberry pi 4 to
version is 29 with php 8.3.
My only problem is that the cron jobs are not working anymore (saw this on the configuration website of nextcloud).
I get the error that the OCC scripts cannot we executed during to an open_basedir restriction:
$sudo -u www-data php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ maintenance:repair
PHP Warning: require_once(): open_basedir restriction in effect. File(/var/www/nextcloud/console.php) is not within the allowed path(s): (/dev/urandom) in /var/www/nextcloud/occ on line 11
PHP Warning: require_once(/var/www/nextcloud/console.php): Failed to open stream: Operation not permitted in /var/www/nextcloud/occ on line 11
PHP Fatal error: Uncaught Error: Failed opening required '/var/www/nextcloud/console.php' (include_path='.:/usr/share/php') in /var/www/nextcloud/occ:11
Stack trace:
#0 {main}
thrown in /var/www/nextcloud/occ on line 11
I checked my php.ini and also the apache config files but no open_basedir is set!?
This is not solving it. I dont have any restrictions set on open_basedir in my php.ini and honestly dont want to add ones since i am also running various other services on the device.
I dont understand why it is restricting this without an entry - this is the miracle and stopping my php to run the conjobs
You have it defined somewhere. There’s nothing with Nextcloud’s installation that sets open_basedir. And the error you’re seeing is coming from PHP itself.
Keep in mind that multiple configuration files can be used by PHP and they won’t all be called php.ini.
Given your provided output, this should get you closer to an answer:
Dear Josh,
Thanks a lot - this helped solve it. Interestingly, php8.3 referred to a subfolder cli and apache2 for its ini. And there, there was a new entry with the open_basedir added - which is not where it should be.
I deleted the entry and now php and the scripts work again as they should.
Thanks!
Best
Oliver