Linus
January 6, 2017, 11:21am
1
Hi, I have a problem. I bought me an full installed Cubietruck but after starting the Apache, I wan't to use the nc. I put every thing in the right order but the index.html and the index.php booth without any data for an overlay.
So my question is, what can I do to get my nextcloud run?
I use Debian, if this is important
Falls hier jemand deutsch spricht und mir so antworten kann gerne auch :)
ham
January 6, 2017, 12:28pm
3
Hi / Hallo
In my Case: the index.html reload the index.php and the index.php isn’t empty
In meinem Fall: Die index.html ruft die index.php datei auf. Und die index.php ist nicht leer.
<?php
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @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 5.6.0 is used, this has to happen here
// because base.php will already use 5.6 syntax.
if (version_compare(PHP_VERSION, '5.6.0') === -1) {
echo 'This version of Nextcloud requires at least PHP 5.6.0 ';
echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
return;
}
try {
require_once __DIR__ . '/lib/base.php';
OC::handleRequest();
} catch(\OC\ServiceUnavailableException $ex) {
\OC::$server->getLogger()->logException($ex, array('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(), $ex->getMessage());
} catch (Exception $ex) {
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($ex);
} catch (Error $ex) {
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($ex);
}
Linus
January 6, 2017, 12:39pm
4
Thanks/Danke
so my index.html also linked to the index.php but there is only the php code and I don’t know why.
Also meine Index.html verlinkt auch auf die index.php jedoch steht da nur reiner php Code kein Html bzw style und wenn ich die Website anspreche dann komme ich auch auf die index.php jedoch war es das dann auch schon ich bekomme dann eine komplett weiße Website ausgegeben und ich habe leider keine Ahnung wie ich da mir da Abhilfe schaffen könnte
If you’re only seeing PHP code, can you verify you’ve enabled the PHP module and restarted the webserver?
ham
January 6, 2017, 1:25pm
6
Hi
Please try to add a file named like error1234.php into the root folder of your nextcloud installation.
input the followed string and call it with http://yourdomain.com/error1234.php
if the output still blank, then maybe you have some server problems.
Bitte, erstelle eine Datei in deinem Hauptordner (wo nextcloud läuft). Du kannst den namen frei wählen. Vielleicht error1234.php
Nun fĂĽge folgendes ein und rufe die datei mit http://deinedomain.com/error1234.php auf.
Wenn die anzeige immer noch weiss ist, prĂĽfe bitte deine Server einstellung.
<?php
echo "Display Errors Title - from PHP TAG:";
// ----------------------------------------------------------------------------------------------------
// - Display Errors
// ----------------------------------------------------------------------------------------------------
ini_set('display_errors', 'On');
ini_set('html_errors', 0);
// ----------------------------------------------------------------------------------------------------
// - Error Reporting
// ----------------------------------------------------------------------------------------------------
error_reporting(-1);
// ----------------------------------------------------------------------------------------------------
// - Shutdown Handler
// ----------------------------------------------------------------------------------------------------
function ShutdownHandler()
{
if(@is_array($error = @error_get_last()))
{
return(@call_user_func_array('ErrorHandler', $error));
};
return(TRUE);
};
register_shutdown_function('ShutdownHandler');
// ----------------------------------------------------------------------------------------------------
// - Error Handler
// ----------------------------------------------------------------------------------------------------
function ErrorHandler($type, $message, $file, $line)
{
$_ERRORS = Array(
0x0001 => 'E_ERROR',
0x0002 => 'E_WARNING',
0x0004 => 'E_PARSE',
0x0008 => 'E_NOTICE',
0x0010 => 'E_CORE_ERROR',
0x0020 => 'E_CORE_WARNING',
0x0040 => 'E_COMPILE_ERROR',
0x0080 => 'E_COMPILE_WARNING',
0x0100 => 'E_USER_ERROR',
0x0200 => 'E_USER_WARNING',
0x0400 => 'E_USER_NOTICE',
0x0800 => 'E_STRICT',
0x1000 => 'E_RECOVERABLE_ERROR',
0x2000 => 'E_DEPRECATED',
0x4000 => 'E_USER_DEPRECATED'
);
if(!@is_string($name = @array_search($type, @array_flip($_ERRORS))))
{
$name = 'E_UNKNOWN';
};
return(print(@sprintf("%s Error in file \xBB%s\xAB at line %d: %s\n", $name, @basename($file), $line, $message)));
};
$old_error_handler = set_error_handler("ErrorHandler");
// other php code
?>
Source: debugging - How can I get useful error messages in PHP? - Stack Overflow
Linus
January 6, 2017, 2:17pm
7
Danke,
ja mein Bildschirm bleibt weiss, an welchen Einstellungen kann es denn liegen?
Thanks,
yes my overlay stays at white color, which settings could be it?
What does your webserver error log show?
Apache/nginx, whatever you use?
ham
January 6, 2017, 3:11pm
9
Hi
There no text like: “Display Errors Title - from PHP TAG”?
Du kannst versuche eine weitere Datei zu erstellen “phptest.php” mit inhalt:
You can try to add an other file like phptest.php with content:
<?php
echo phpinfo();
?>
Ruf sie auf mit: yourdomain.com
call it with yourdomain.com
Es sollte eine Seite mit folgendem Logo ersteinen:
It should show you some logo:
Verwendest du Apache oder nginx?
Do you use apache or nginx?
Linus
January 6, 2017, 3:12pm
10
I use Apache but where can I see where the logs are(can’t find a document for it)
Ich benutze Apache aber weiĂź wirklich nicht mehr weiter
Linus
January 6, 2017, 3:16pm
11
Wenn ich die Funktion aufrufe gibt er mir die ganzen Informationen zum server, kann mir das weiterhelfen?
If I join the function then he gives me the information from the server, can this may help me?
ham
January 6, 2017, 3:46pm
12
Premission of files? pls check with: ls -ll and compare with your added files (phptest.php / error1234.php).
Was sind deine Datei/Ordner berechtigungen? bitte prĂĽfe diese mal mit ls -ll und vergleiche sie mit den erstellten (phptest.php / error1234.php).
Apache log:
tail -f /var/log/apache2/error.log -> to leave ctrl + c
or
cat /var/log/apache2/error.log
PHP error handling check:
php --info | grep error
Can you pls give us the output here?
Kannst du uns bitte die ausgaben hier mal zeigen?
additional:
Nextcloud log: tail -f /your/directory/nextcloud/data/nextcloud.log -> But only for nextcloud self
Linus
January 6, 2017, 4:02pm
13
on the graphical overlay i work with an normal user, so i have no writing permissions, on the commandline i work as root so i have all permissions
Auf der Graphischen Oberfläche arbeite ich mit einem normalen Benutzer mit leserechten auf der Komandoebende als root mit natürlich allen rechten
How can I show you the output
Wie kann ich den Output kopieren?
Sorry, but i dont have to do with these things before
Sorry ich bin echt neu auf dem Gebiet
ham
January 6, 2017, 4:34pm
14
Please try (on your server with GUI):
Open two terminal windows (as root) and a browser (eg. firefox)
first terminal: tail -f /var/log/apache2/error.log
second terminal: sudo systemctl restart apache2.service -> or service apache2 restart
now go with the browse to your page
-> in the first terminal you will find some errors -> copie that (ctrl + c) -> go to help.nextcloud.com -> and past your result.
Bitte versuche folgendes (auf dienem Server mit Grafischer Oberfläche):
öffne zwei terminal fenster (als root) und einen browser (bsp. firefox)
gib bitte im ersten terminal fenster folgendes ein: tail -f /var/log/apache2/error.log
im zweiten: sudo systemctl restart apache2.service -> or service apache2 restart
öffnen dein seite und überprüfe das erste terminal fenster
-> kopiere diese bitte (ctrl + c) -> gehe zu demo.nextcloud.com -> und fĂĽge diese nun hier ein
Maybe we find something. Wich PHP-Version do you have?
Vielleicht finden wir ja was.
Welche PHP Version gab phptest.php aus?
Linus
January 6, 2017, 5:27pm
15
Danke an alle am Ende lag es an einem sau dummen Tippfehler, tut mir leid.
Thanks to everybody for his help, at the end it was an very stupid fail of myself, i’m sorry.
Dennis
August 24, 2017, 8:48pm
16
Hallo, was war der Tippfehler?
Denn ich hab gleiches Problem… :-/