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

Remove error display on productive systems and use log file instead #7509

Closed
netAction opened this issue Mar 3, 2014 · 9 comments
Closed
Labels

Comments

@netAction
Copy link

OwnCloud Version: 6.0

Expected behaviour: OwnCloud should never show error messages to users.

Current behaviour: OwnCloud needs setup in Apache VirtualHost directive.

php_flag display_errors off
@DeepDiver1975
Copy link
Member

Which platform are you using?
on all my Debian installations I never had to add this configuration.

@netAction
Copy link
Author

Ubuntu 13.10.

Error messages (even warnings and notices) are shown in HTML by default on most PHP installations.

@PVince81
Copy link
Contributor

PVince81 commented Mar 3, 2014

I also never had this on openSUSE 13.1.
Can this be disabled per .htaccess somehow ?
Or can we set that config from within the PHP code ?

@PVince81 PVince81 added the Bug label Mar 3, 2014
@netAction
Copy link
Author

Are you really sure PHP errors will not be visible to users? What happes when you add some nonsense to index.php?

Maybe this is a solution:

ini_set('display_errors','Off');

@PVince81
Copy link
Contributor

PVince81 commented Mar 3, 2014

Just checked and php.ini in openSUSE 13.1 has this by default:

display_errors = Off

Looks like using ini_set could work: http://stackoverflow.com/a/15949445

@karlitschek
Copy link
Contributor

@netAction I think this is the responsibility of the server admin to configure php properly. We shouldn't try to override server settings from the application side. ownCloud doesn't know if this is a production, development or a debugging server.

@netAction
Copy link
Author

Dropping errors as HTML to the browser is never a good idea. There already is an internal error log. If you do not like this you could build a new one.

In my oppinion, every server could be sometimes used for debugging, too.

@PVince81
Copy link
Contributor

PVince81 commented Mar 4, 2014

Should we update the documentation instead and tell people to disable error display ?
Note that when disabled in php.ini, errors will still be logged in owncloud.log or the server's error log.

@LukasReschke
Copy link
Member

Closing this as this should be the responsibility of the server admin. - It's even documented on the PHP documentation: http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors

@lock lock bot locked as resolved and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants