upgrade to 1.9.2 has PHP setting display_errors message

upgrade to 1.9.2 has PHP setting display_errors message

by Jay Melton -
Number of replies: 11
Hello:

I've just upgraded from 1.9.1+ to 1.9.2. After upgrading, I get a "Enabling the PHP setting display_errors is not recommended on production sites because some error messages may reveal sensitive information about your server." message on the Administration Notifications page.

I didn't make any modifications, and I've never seen the warning before.

Jay
Average of ratings: -
In reply to Jay Melton

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Nadav Kavalerchik -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
i saw that too.
you can see all php settings in : http://www.yousite.com/moodle/admin/phpinfo.php

i guess you (we) can have a php.ini file in the main folder that has
display_errors=off
in it.

or if you have old php 4.x you can have .htaccess file with similar line
"php_flag display_errors 0"
In reply to Nadav Kavalerchik

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Matthew Bibby -
Hi, I am new to using moodle and have come across this issue also.

I created a file php.ini with display_errors=off in it and uploaded it to folder where my moodle is . . . cleared by internet cache . . . however it didn't resolve the issue.

I am 99.99999% sure this is a user error on my part, any ideas on where I have gone wrong?

Thanks in advance,

Matt
In reply to Nadav Kavalerchik

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Luka Peters -
Since I changes at the php.ini is not permitted by the hoster I added the line
php_flag display_errors 0
to the .htaccess file residing in the moodle folder, but got an internal server error(code 500).

Has someone any other suggestion as to where to configure this?

In reply to Jay Melton

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It was added as part of the latest round of security fixes. Really it means what it says - you should consider changing this setting in php.ini on a production site.
In reply to Howard Miller

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Jay Melton -
Thanks to both of you for getting back to me on this. I'm working on a hosted environment. Should I request the company to modify the php.ini file, or can I create my own? If it's the latter, where exactly should the file go and what exactly should go in the file, please?

Jay
In reply to Jay Melton

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Marc Grober -
Good luck getting your ISP to change php.ini settings..... however, there is a good chance that you can customize your php.ini. Ask you web host for details.
In reply to Marc Grober

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Edwin Cruz -

As long as this message is there I can't upload any new plugins or modules, need help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

In reply to Edwin Cruz

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Ken Task -
Picture of Particularly helpful Moodlers

Edwin,

You've posted in a really old thread.  Did you just upgrade to 1.9.2?  Really? Considering that version 1.9 is now at 1.9.19+ that's 17 point versions behind.  If that's all your provider can do, I'd strongly advise shopping for another provider.

You *should* post a new messsage not part of this thread (a new message) with a problem description along with some technical information ... starting with your provider.  Did a little leg work for you there:

sev.sutoribiorivera.net
HostGator on theplanent.com

A Moodle upgrade is pending …

Without knowing more specifics concerning you package:

http://support.hostgator.com/articles/specialized-help/technical/moodle-and-php-versions

HostGator support might need to be involved in assisting you as I can see by the page above that one cannot do some things for themselves … Cpanel, etc.

Also see they do have information concerning their systems .. use of suPHP
http://support.hostgator.com/articles/specialized-help/technical/what-is-php-ini

http://support.hostgator.com/articles/cpanel/php-settings-that-cannot-be-changed

'spirit of sharing', Ken

In reply to Jay Melton

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Andrew Gasiorowski -

To get rid of this error you need to find your PHP.ini file located something like this "C:\moodle\server\PHP\PHP.ini" Then using Crimson editor look for the display_errors located about a quarter of the down the ini file down and then type in off next to the = symbol (see below). I hope this is helpful. Cheers

; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; It's recommended that errors be logged on production servers rather than
; having the errors sent to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)  
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = off

In reply to Jay Melton

Re: upgrade to 1.9.2 has PHP setting display_errors message

by Chris Megahan -
Picture of Core developers

If you are in a shared hosting environment with limited access to the php configuration files, I'd suggest modifying the .htaccess file and add the following line.

php_flag display_errors off

I haven't tested it, but that should correct your problem.