Occ returns errormessage [Solved]

after upgrade to 15.0.6 i can’t use occ

Nextcloud is installed on strato space in subdirectory nextcloud

owner of directory is customer, sudo isn’t avaiable

php occ --version returns:

X-Powered-By: PHP/7.2.15
Content-type: text/html

An unhandled exception has been thrown:
TypeError: Return value of OC\AppFramework\Http\Request::getScriptName() must be of the type string, null returned in /mnt/web207/xx/yy/zzzzzz/htdocs/nextcloud/lib/private/AppFramework/Http/Request.php:838
Stack trace:
#0 /mnt/web207/xx/yy/zzzzzz/htdocs/nextcloud/lib/base.php(154): OC\AppFramework\Http\Request->getScriptName()
#1 /mnt/web207/xx/yy/zzzzzz/htdocs/nextcloud/lib/base.php(591): OC::initPaths()
#2 /mnt/web207/xx/yy/zzzzzz/htdocs/nextcloud/lib/base.php(1068): OC::init()
#3 /mnt/web207/xx/yy/zzzzzz/htdocs/nextcloud/console.php(46): require_once('/mnt/web207/xx/...')
#4 /mnt/web207/xx/yy/zzzzzz/htdocs/nextcloud/occ(10): require_once('/mnt/web207/xx/...')

any ideas ?

You may try the app ‘occweb’ from the Nextcloud appstore and see what happens.

Great tip - thanks. Both occ commands successfull

only missing php-module imagick and missing php-memory-cache. First one is not important, i think. Second is not possible with strato as hoster

I am having exactly the same problem as was listed above. I can not use occ because of a NULL return error in getScriptName(). I am only having this issue with an installation on OpenWrt. Other than this issue, everything seems to work fine with NextCloud on OpenWrt.

Note that I do not have this problem on my Debian installations. My Debian installations do not include either the php-module imagick or php-memcache packages so I do not think this is the problem. I assume there is some package which is missing on my OpenWrt installations, but I have no idea what it is.

Any pointers would be appreciated.

Looks like my mistake. For some reason, OpenWrt does not seem to like the command “php”. They renamed it to “php-cli”. When I run occ with “php-cli” on OpenWrt it works fine.