{"version":"1.0","provider_name":"Gerald Schneider","provider_url":"https:\/\/schneidr.de","author_name":"Gerald Schneider","author_url":"https:\/\/schneidr.de\/author\/gerald\/","title":"PHP auf der Kommandozeile bei Strato","html":"<!-- wp:paragraph -->\n<p>Versucht man die Kommandozeilentools von NextCloud <em>occ <\/em>und <em>updater.phar<\/em> bei Strato zu benutzen dann bekommt man so nette Fehlermeldungen:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>> php updater\/updater.phar\r\nNextcloud Updater - version: v20.0.0beta4-11-g68fa0d4\r\n\r\nCurrent version is 20.0.3.\r\n\r\nUpdate to Nextcloud 20.0.12 available. (channel: \"stable\")\r\nFollowing file will be downloaded automatically: https:\/\/download.nextcloud.com\/server\/releases\/nextcloud-20.0.12.zip\r\nOpen changelog \u2197\r\n\r\nSteps that will be executed:\r\n&#91; ] Check for expected files\r\n&#91; ] Check for write permissions\r\n&#91; ] Create backup\r\n&#91; ] Downloading\r\n&#91; ] Verify integrity\r\n&#91; ] Extracting\r\n&#91; ] Enable maintenance mode\r\n&#91; ] Replace entry points\r\n&#91; ] Delete old files\r\n&#91; ] Move new files in place\r\n&#91; ] Done\r\n\r\nStart update? &#91;y\/N] PHP Warning:  Use of undefined constant STDIN - assumed 'STDIN' (this will throw an Error in a future version of PHP) in phar:\/\/\/mnt\/web120\/e2\/56\/510XXX56\/htdocs\/cloud\/updater\/updater.phar\/vendor\/symfony\/console\/Helper\/QuestionHelper.php on line 117\r\nPHP Warning:  fgets() expects parameter 1 to be resource, string given in phar:\/\/\/mnt\/web120\/e2\/56\/510XXX56\/htdocs\/cloud\/updater\/updater.phar\/vendor\/symfony\/console\/Helper\/QuestionHelper.php on line 133\r\n\r\n\r\n  &#91;RuntimeException]\r\n  Aborted\r\n\r\n\r\nupdate &#91;--no-backup]\r\n\r\nX-Powered-By: PHP\/7.4.23\r\nContent-type: text\/html<\/code><\/pre>\n<!-- \/wp:code -->\n\n<!-- wp:paragraph -->\n<p>oder bei <em>occ<\/em>:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>php occ upgrade\r\nX-Powered-By: PHP\/7.4.23\r\nContent-type: text\/html\r\n\r\nAn unhandled exception has been thrown:\r\nTypeError: Return value of OC\\AppFramework\\Http\\Request::getScriptName() must be of the type string, null returned in \/mnt\/web120\/e2\/56\/51008256\/htdocs\/WordPress-WH3\/cloud\/lib\/private\/AppFramework\/Http\/Request.php:837\r\nStack trace:\r\n#0 \/mnt\/web120\/e2\/56\/510XXX56\/htdocs\/cloud\/lib\/base.php(163): OC\\AppFramework\\Http\\Request->getScriptName()\r\n#1 \/mnt\/web120\/e2\/56\/510XXX56\/htdocs\/cloud\/lib\/base.php(576): OC::initPaths()\r\n#2 \/mnt\/web120\/e2\/56\/510XXX56\/htdocs\/cloud\/lib\/base.php(1091): OC::init()\r\n#3 \/mnt\/web120\/e2\/56\/510XXX56\/htdocs\/cloud\/console.php(49): require_once('\/mnt\/web120\/e2\/...')\r\n#4 \/mnt\/web120\/e2\/56\/510XXX56\/htdocs\/cloud\/occ(11): require_once('\/mnt\/web120\/e2\/...')\r\n#5 {main}<\/code><\/pre>\n<!-- \/wp:code -->\n\n<!-- wp:paragraph -->\n<p>Dazu kommt, dass die PHP-Version nicht unbedingt zur Version passt, die f\u00fcr den Webspace eingestellt ist (in diesem Fall w\u00e4re es eigentlich PHP 7.3 gewesen).<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Ein funktionierendes PHP-Binary findet man unter \/opt\/ in einem Versionsspezifischen Ordner:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>\/opt\/RZphp73\/bin\/php-cli occ db:add-missing-indices\r\nThe current PHP memory limit is below the recommended value of 512MB.\r\nCheck indices of the share table.\r\nCheck indices of the filecache table.\r\nAdding additional size index to the filecache table, this can take some time...\r\nFilecache table updated successfully.\r\nCheck indices of the twofactor_providers table.\r\nCheck indices of the login_flow_v2 table.\r\nCheck indices of the whats_new table.\r\nCheck indices of the cards table.\r\nCheck indices of the cards_properties table.\r\nCheck indices of the calendarobjects_props table.\r\nCheck indices of the schedulingobjects table.\r\nCheck indices of the oc_properties table.<\/code><\/pre>\n<!-- \/wp:code -->\n\n<!-- wp:paragraph -->\n<p>Damit funktionieren sowohl <em>occ<\/em> als auch <em>updater.phar<\/em> einwandfrei :)<\/p>\n<!-- \/wp:paragraph -->","type":"rich","thumbnail_url":"https:\/\/schneidr.de\/wp-content\/uploads\/2021\/09\/DSC_1141-150x150.jpg","thumbnail_width":150,"thumbnail_height":150}