Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occ command throws exception: TypeError: realpath() null given #11239

Closed
svenmauch opened this issue Sep 16, 2018 · 6 comments
Closed

occ command throws exception: TypeError: realpath() null given #11239

svenmauch opened this issue Sep 16, 2018 · 6 comments
Labels

Comments

@svenmauch
Copy link

svenmauch commented Sep 16, 2018

Steps to reproduce

  1. connect to managed webhosting server with ssh
  2. change to nextcloud directory
  3. run any occ command

Expected behaviour

occ command should execute without errors, in this case add missing db indexes.

Actual behaviour

grafik

Server configuration

Operating system: Linux 3.14.x-grsec

Web server: Apache 2.4.x

Database: MySQL 5.6.x

PHP version: 7.2.x

Nextcloud version: 14.0

Updated from an older Nextcloud/ownCloud or fresh install: Updated from latest 13.x via web updater

Where did you install Nextcloud from: installed via web installer (setup-nextcloud.php) downloaded from nextcloud.com

Signing status:

Signing status No errors have been found.

List of activated apps:

App list "Files Right Click" and "Tasks" are the only non-official apps enabled.

Nextcloud configuration:

Config report '*****', 'passwordsalt' => '*****', 'secret' => '*****', 'trusted_domains' => array ( 0 => '*****', ), 'datadirectory' => '*****/cloud/data', 'overwrite.cli.url' => '*****/cloud', 'dbtype' => 'mysql', 'version' => '*****', 'dbname' => '*****', 'dbhost' => '*****', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => '*****', 'dbpassword' => '*****', 'installed' => true, 'mail_from_address' => 'cloud', 'mail_smtpmode' => 'smtp', 'mail_smtpauthtype' => 'LOGIN', 'mail_domain' => '*****', 'maintenance' => false, 'knowledgebaseenabled' => false, 'overwritehost' => '*****', 'overwriteprotocol' => 'https', 'overwritewebroot' => '/cloud', 'forwarded_for_headers' => array ( 0 => 'CF_CONNECTING_IP', ), 'tempdirectory' => '*****', 'theme' => '', 'loglevel' => 2, 'updater.release.channel' => 'stable', 'updater.secret' => '*****', 'mail_smtpauth' => 1, 'mail_smtpsecure' => 'ssl', 'mail_smtphost' => '*****', 'mail_smtpport' => '*****', 'mail_smtpname' => '*****', 'mail_smtppassword' => '*****', );

Are you using external storage: no

Are you using encryption: no

Are you using an external user-backend: no

Client configuration

Browser: Firefox 62

Operating system: Microsoft Windows 10 (1803)

Logs

Web server error log

Web server error log cannot access

Nextcloud log (data/nextcloud.log)

Nextcloud log empty

Browser log

Browser log doesn't apply
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #1078 (realpath), #10954 (OCC upgrade throws unhandled exception), #11231 (TypeError Exception With v14), #5842 (Cant execute occ command), and #4184 (OCC commands fail when configuring apps_paths).

@MorrisJobke
Copy link
Member

cc @nickvergessen

@svenmauch
Copy link
Author

I recently upgraded to Nextcloud 15.0.0 for which the admin panel is suggesting I run the following commands:

  • occ db:add-missing-indices
  • occ db: convert-filecache-bigint

The error above persists and outputs the same exception for both commands. Running php with command line argument -C yields the same result.

@kesselb
Copy link
Contributor

kesselb commented Dec 29, 2018

Could you share php -v? The content-type and status header only printed when PHP is running as CGI. CLI would be the right one for occ.

@svenmauch
Copy link
Author

Darn, I can't believe I've missed this for months! After finding and running the weirdly placed binary for php-cli everything works just fine.

I guess this issue can be closed if there's no need for an exception handler for idiots like me. :)

@kesselb
Copy link
Contributor

kesselb commented Dec 29, 2018

No worries 😎 In the first place this is a bad server configuration placing a cgi-fcgi binary where you would expect a cli binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants