OwnCloud displays PHP error even when deactivated

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

OwnCloud displays PHP error even when deactivated

Florian Leleu

Hello everyone,

we hide errors from our customers, we just want to log them for later analysis.

Here's what we did:

php_value[display_errors] = off
php_value[display_startup_errors] = off

We stopped Redis to simulate an error, and ... the error is displayed:

http://i.imgur.com/eZX0Aud.png

So actually it seems that OwnCloud rewrites the display_errors variable :/

Has anyone already encounter that matter ? We couldn't find anything in https://doc.owncloud.com/server/admin_manual to circumvent that.

Thanks.

--

Cordialement,


Florian LELEU
Administrateur Systèmes Linux, Cognix Systems

Rennes | Brest | Saint-Malo | Paris
[hidden email]

Tél. : 02 30 96 34 40




_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OwnCloud displays PHP error even when deactivated

450084394239
Doing the same on my ownCloud 10.1.0 installation shows an "internal server"
error page of ownCloud instead of the stack trace like happening at your
setup.



--
Sent from: http://owncloud.10557.n7.nabble.com/Users-f1.html
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: OwnCloud displays PHP error even when deactivated

Florian Leleu

Hi,

thanks for your answer. Do you have anything specific in your config.php that could involve hiding errors ?

I'll re-check the setup again.


Le 04/03/2019 à 18:40, 450084394239 a écrit :
Doing the same on my ownCloud 10.1.0 installation shows an "internal server"
error page of ownCloud instead of the stack trace like happening at your
setup.



--
Sent from: http://owncloud.10557.n7.nabble.com/Users-f1.html
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

--

Cordialement,


Florian LELEU
Administrateur Systèmes Linux, Cognix Systems

Rennes | Brest | Saint-Malo | Paris
[hidden email]

Tél. : 02 30 96 34 40




_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: OwnCloud displays PHP error even when deactivated

Florian Leleu

Hi again,

I did some test again, here is the configuration:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT
display_errors = Off
html_errors = Off

I shut down MySQL and I still have the errors displayed in my web browser rather than in my error.log

I checked the phpinfo() and the configuration is as defined.

I did my own simple PHP script to connect to the DB and no errors are shown ...

I got a HTTP ERROR 500 and the error is in my error.log

Could you try the very same test by shutting down your DB ?

Thanks.


Le 05/03/2019 à 08:47, Florian Leleu a écrit :

Hi,

thanks for your answer. Do you have anything specific in your config.php that could involve hiding errors ?

I'll re-check the setup again.


Le 04/03/2019 à 18:40, 450084394239 a écrit :
Doing the same on my ownCloud 10.1.0 installation shows an "internal server"
error page of ownCloud instead of the stack trace like happening at your
setup.



--
Sent from: http://owncloud.10557.n7.nabble.com/Users-f1.html
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

--

Cordialement,


Florian LELEU
Administrateur Systèmes Linux, Cognix Systems

Rennes | Brest | Saint-Malo | Paris
[hidden email]

Tél. : 02 30 96 34 40




--

Cordialement,


Florian LELEU
Administrateur Systèmes Linux, Cognix Systems

Rennes | Brest | Saint-Malo | Paris
[hidden email]

Tél. : 02 30 96 34 40




_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: OwnCloud displays PHP error even when deactivated

450084394239
No special configuration in the config.php, just the plain one after the
ownCloud installation.

Shutting down the database is not possible as this is a live / productive
system but i guess i will also get the same generic/themed internal error
message of ownCloud without the full stacktrace.

Specs:

ownCloud 10.1.0
nginx
PHP (php-fpm) 7.2.x



--
Sent from: http://owncloud.10557.n7.nabble.com/Users-f1.html
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: OwnCloud displays PHP error even when deactivated

Carlos Damken
What does it show in the log files?
On Mar 5, 2019, at 06:13, 450084394239 <[hidden email]> wrote:
No special configuration in the config.php, just the plain one after the
ownCloud installation.

Shutting down the database is not possible as this is a live / productive
system but i guess i will also get the same generic/themed internal error
message of ownCloud without the full stacktrace.

Specs:

ownCloud 10.1.0
nginx
PHP (php-fpm) 7.2.x



--
Sent from: http://owncloud.10557.n7.nabble.com/Users-f1.html


User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: OwnCloud displays PHP error even when deactivated

Florian Leleu

Hi,

I don't think it matters to the main topic.

The former question is "why does OwnCloud display errors when it's turned off".

Btw I did some other testing running PHP7.0 with official package on Debian and I ended up having the same result.

So far:

Debian 8 / Nginx / Redis / MySQL / PHP7.0 -> displays error when set Off

Debian 9 / Nginx / MySQL / PHP7.2 -> displays error when set Off

I tried tweaking  the "log_type" parameter in config.php thinking it might change the display setting but so far no luck either.

https://doc.owncloud.org/server/10.1/admin_manual/configuration/server/logging_configuration.html

If I write a PHP code like that to test Redis:
<?php

// Check Redis
try {
    $redis = new Redis();
    $redis->connect('127.0.0.1', 6379);
    $redis->ping();
} catch (Exception $e) {
    header('HTTP/1.1 503 Service Unavailable');
    die();
}

I shut down Redis, nothing is displayed on my browser but it's logged in the error.log of NGinx.
Within the same context, if I try to load the login page of OwnCloud the whole error is displayed.
I'm thinking that my settings are rewritten dynamically within OwnCloud's code.

Sneaking in the code I could find that but it's going my way in lib/base.php

                // Don't display errors and log them
                \error_reporting(E_ALL | E_STRICT);
                @\ini_set('display_errors', 0);
                @\ini_set('log_errors', 1);

Le 05/03/2019 à 13:50, Carlos Damken a écrit :
What does it show in the log files?
On Mar 5, 2019, at 06:13, 450084394239 <[hidden email]> wrote:
No special configuration in the config.php, just the plain one after the
ownCloud installation.

Shutting down the database is not possible as this is a live / productive
system but i guess i will also get the same generic/themed internal error
message of ownCloud without the full stacktrace.

Specs:

ownCloud 10.1.0
nginx
PHP (php-fpm) 7.2.x



--
Sent from: http://owncloud.10557.n7.nabble.com/Users-f1.html

User mailing list [hidden email] http://mailman.owncloud.org/mailman/listinfo/user


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

--

Cordialement,


Florian LELEU
Administrateur Systèmes Linux, Cognix Systems

Rennes | Brest | Saint-Malo | Paris
[hidden email]

Tél. : 02 30 96 34 40




_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user