Raspberry Pi Owncloud 10.4.1

Steps to reproduce

  1. installed owncloud version 10.4.1
  2. php -v is running on 7.3.14
  3. Not able to open up owncloud page. Getting the internal server error as per below

Expected behaviour

Should be able to go to owncloud page

Actual behaviour

Page showing this error.

<?php /** * @author Jörn Friedrich Dreyer * @author Lukas Reschke * @author Morris Jobke * @author Philipp Schaffrath * @author RealRancor * @author Robin Appelman * @author Sergio Bertolín * @author Thomas Müller * @author Vincent Petry * * @copyright Copyright (c) 2018, ownCloud GmbH * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ // Show warning if a PHP version below 7.1.0 is used, this has to happen here // because base.php will already use 7.1 syntax. if (\version_compare(PHP_VERSION, '7.1.0') === -1) { echo 'This version of ownCloud requires at least PHP 7.1.0
'; echo 'You are currently running PHP ' . PHP_VERSION . '. Please update your PHP version.'; return; } // Show warning if PHP 7.4 or later is used as ownCloud is not compatible with PHP 7.4 if (\version_compare(PHP_VERSION, '7.4.0alpha1') !== -1) { echo 'This version of ownCloud is not compatible with PHP 7.4
'; echo 'You are currently running PHP ' . PHP_VERSION . '.'; return; } // running oC on Windows is unsupported since 8.1, this has to happen here because // is seems that the autoloader on Windows fails later and just throws an exception. if (\stripos(PHP_OS, 'WIN') === 0) { echo 'ownCloud Server does not support Microsoft Windows.'; return; } try { require_once __DIR__ . '/lib/base.php'; OC::handleRequest(); } catch (\OC\ServiceUnavailableException $ex) { \OC::$server->getLogger()->logException($ex, ['app' => 'index']); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printExceptionErrorPage($ex); } catch (\OC\HintException $ex) { OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printErrorPage($ex->getMessage(), $ex->getHint()); } catch (\OC\User\LoginException $ex) { OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage()); } catch (\OCP\Files\ForbiddenException $ex) { OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage()); } catch (\Throwable $ex) { try { \OC::$server->getLogger()->logException($ex, ['app' => 'index']); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } catch (\Throwable $ex2) { // with some env issues, it can happen that the logger couldn't log properly, // so print out the exception directly // NOTE: If we've reached this point, something has gone really wrong because // we couldn't even get the logger, so don't rely on ownCloud here. \header("{$_SERVER['SERVER_PROTOCOL']} 599 Broken"); \OC::crashLog($ex); \OC::crashLog($ex2); } } ### Server configuration **Operating system**: **Web server:** Apache/2.4.38 (Raspbian) **Database:** **PHP version:** PHP 7.3.14-1~deb10u1 (cli) (built: Feb 16 2020 15:07:23) ( NTS ) **ownCloud version:** (see ownCloud admin page) 10.4.1 **Updated from an older ownCloud or fresh install:** i deleted and do a fresh installation. **Where did you install ownCloud from:** command line download 10.4.1.zip wget https://download.owncloud.org/community/owncloud-10.4.1.zip **Signing status (ownCloud 9.0 and above):** ``` Login as admin user into your ownCloud and access http://example.com/index.php/settings/integrity/failed paste the results into https://gist.github.com/ and puth the link here. ``` **The content of config/config.php:** ``` Log in to the web-UI with an administrator account and click on 'admin' -> 'Generate Config Report' -> 'Download ownCloud config report' This report includes the config.php settings, the list of activated apps and other details in a well sanitized form. or If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your ownCloud installation folder *ATTENTION:* Do not post your config.php file in public as is. Please use one of the above methods whenever possible. Both, the generated reports from the web-ui and from occ config:list consistently remove sensitive data. You still may want to review the report before sending. If done manually then it is critical for your own privacy to dilligently remove *all* host names, passwords, usernames, salts and other credentials before posting. You should assume that attackers find such information and will use them against your systems. ``` **List of activated apps:** ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your ownCloud installation folder. ``` **Are you using external storage, if yes which one:** local/smb/sftp/... No **Are you using encryption:** yes/no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... #### LDAP configuration (delete this part if not used) ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your ownCloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ``` ### Client configuration **Browser:** **Operating system:** ### Logs #### Web server error log ``` Insert your webserver log here ``` #### ownCloud log (data/owncloud.log) ``` Insert your ownCloud log here ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```

That isn’t an error, it’s showing raw PHP as text, that means you don’t have things setup correctly… Apache/PHP/mod-php or whatever you’re using… it’s not interpreting php extensions as php scripts so it’s just dumping it as plain text…

Sounds like you have php cli installed so you can run php -v but your web server isn’t configured to make use of it.

1 Like