Page 1 of 2

how to fix this "Display Errors is ON"

Posted: Tue Apr 15, 2008 8:42 am
by Saher
Hi all Joomla! when I install joomla v1.5 in localhost in my pc i used Apache 2.0 Handler and php 5.0.4 the proplem i have its in page "Pre-installation Check" when i install joomla 1.5 in the Recommended Settings joomla tell me its recommend this setting for "Display Errors :OFF:" but in my istallation is "ON" plz tell my how to fix this .

Re: how to fix this "Display Errors is ON"

Posted: Tue Apr 15, 2008 9:00 am
by humvee
Display errors on is not a problem for a localhost/development web site - in fact it can be a benefit if there are any problems whilst you are developing your own web site.
It is an issue for Public/Live web sites here it needs to be switched off.

To do this navigate to your PHP directory and locate the php.ini file.

Look for the line

Code: Select all

display_errors On
:
display_errors.png
Depending on your own particular installation (including OS, distribution, etc, you may find this setting at a different line number so just do a Find with your editor.

Change the On to Off | alternatively on some installations it will show as

Code: Select all

 display_errors 1
just change the 1 to 0 (the number zero)

hth

Andy

Re: how to fix this "Display Errors is ON"

Posted: Tue Apr 15, 2008 9:11 am
by Saher
Thanks ... humvee

Re: how to fix this "Display Errors is ON"

Posted: Tue Apr 15, 2008 10:13 am
by humvee
You are welcome.
If this solves your issue please change the ? icon in your first post to the green tick icon instead :)

Andy

Re: how to fix this "Display Errors is ON"

Posted: Sun Apr 20, 2008 6:08 pm
by petermatra
Go to thiz thread:

http://forum.joomla.org/viewtopic.php?f=429&t=279727

I changed my .htaccess file and it worked.
p

Re: how to fix this "Display Errors is ON"

Posted: Tue Apr 22, 2008 1:09 am
by hcparalegals
Hi Andy,
I am running my Joomla on 1.5.2 and I can't fix the problem. 1and1 isn't providing me with any good support at all. They have good servers but terrible technical support. I tried creating php.ini with this code

Code: Select all

 display_errors 0
file in Joomla root directory and I also tried adding additional code

Code: Select all

php_flag display_errors "0"
to .htaccess file which is also located in joomla root directory /joomla. None work. In fact when I add additional line to .htaccess file the website doesn't want to open up at all. I read few of your posts and none of the solutions work. I am on shared hosting with full php and mysql support. For my database I am using ver 5. Can you please help me out?

Thanks

Andriy.

Re: how to fix this "Display Errors is ON"

Posted: Tue Apr 22, 2008 7:42 am
by humvee
1&1 provide the option to either use PHP4 or PHP5 on their UK Business packages upwards. The attached file is taken directly from my own 1&1 server.
htaccess.zip
unzip the file into the joomla_root/ directory on the server. This will set the preference as PHP5.
Make sure your domain name setting in the 1&1 admin panel is set to the correct directory, typically this would be /joomla (whatever name you want can be used instead of joomla)
Point your web browser at the domain name and the installer should start.
The Display Errors On variable is not critical and it can be controlled by adding

Code: Select all

php_flag display_errors "0"
to the .htaccess file that you add to the server above.
This is for UK/European 1and1, I am unclear whether N.America 1&1 have different configurations on their servers.

Andy

Re: how to fix this "Display Errors is ON"

Posted: Wed Apr 23, 2008 8:09 pm
by humvee
Hi Andriy,

I did a follow up with the 1&1 uk support on this one and their response to me was to advise them of the domain and they would feed back to me what to do. Not too sure whether this means they will do something server side or it will be something doable from my side of the server. (or indeed whether it is just a stall for lack of knowledge ;) ) I will update you as soon as I hear something more.
Incidentally the system on 1&1 UK has changed since I last had to worry about display errors and I don't in fact think adding the display errors setting to .htaccess or a php.ini file is the correct approach, it certainly did not work for me.

Andy

Re: how to fix this "Display Errors is ON"

Posted: Thu Apr 24, 2008 1:33 pm
by hcparalegals
Thanks, I will be waiting for your post.

Re: how to fix this "Display Errors is ON"

Posted: Wed Apr 30, 2008 1:12 pm
by daPSP
Sorry guys if I'll sound really noobie, but where is those php.ini and .htaccess files? I searched all over the freehostia place. I'm on free hosting right now, because I'm trying out joomla. Later I'll move to paid host. Anyway, where should those files be?

Re: how to fix this "Display Errors is ON"

Posted: Thu May 01, 2008 4:28 am
by ircmaxell
Or you could just change the error reporting in the Global Configuration...

Re: how to fix this "Display Errors is ON"

Posted: Thu May 22, 2008 3:11 pm
by joomleb
to humvee:

I tried to add the line you suggested to .htaccess but I have back:
"a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request"

Please, Do you have any suggestions for me ?

Re: how to fix this "Display Errors is ON"

Posted: Thu May 22, 2008 4:11 pm
by ircmaxell
eGulp wrote:to humvee:

I tried to add the line you suggested to .htaccess but I have back:
"a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request"

Please, Do you have any suggestions for me ?
Image

Re: how to fix this "Display Errors is ON"

Posted: Thu May 22, 2008 7:02 pm
by joomleb
To ircmaxell:
in first many thanks for reply. So,
Do you mean that I can complete the installation also with "Display Errors ON" ?
and then I can change it simply in Global configuration, is it right ?

If so, please, Can you suggest me the best configuration with an example:

Path to temp folder = ?
GZIP page compression = ?
Error Reporting = ?

To humvee:
my hoster told me "You cannot add php flags in the .htaccess file since our servers are phpSuexec enabled". That's why I have to put a php.ini file in each folder I want the changes.
So, please, Do t"he display errors function" need to have a php.ini file in each joomla installation folder or just one file into the main joomla folder ?

Many Thanks

Re: how to fix this "Display Errors is ON"

Posted: Fri May 23, 2008 8:44 am
by humvee
I believe you will need to add one copy of the php.ini file to the joomla_root/ directory and a further copy in the joomla_root/administrator directory. If you are adding the php.ini ahead of installation itself then also add one to the joomla_root/installation directory.

Andy

Re: how to fix this "Display Errors is ON"

Posted: Fri May 23, 2008 1:08 pm
by joomleb
Hi humvee,

Really Many Thanks, all seem to run very good. Thinking can be useful, this is what I done:
I asked my hoster to give me the php.ini file
I had look for "display_errors = On" inside it
I changed "On" with "Off"
I put a copy of the php.ini file into these folders:
public_html
public_html/administrator
public_html/installation

Why not put this inside the online guide here: http://help.joomla.org/content/view/1945/302/
or in teh new documentation site ?

Re: how to fix this "Display Errors is ON"

Posted: Fri May 23, 2008 1:23 pm
by humvee
This is in the new version of the Installation Manual which i have been rewriting for some months now in between doing these forums and living ;)

The next release of Manual (version 1.0) should hopefully not be too much longer in the workings.

I think this information might already be buried somewhere in the FAQ's of the Help Site or Docs site

[Edit] Sorry forgot to add congratulations and to say glad it worked out :-[ ]

Re: how to fix this "Display Errors is ON"

Posted: Wed Aug 06, 2008 2:46 am
by tekcronic
THIS IS A REPEAT POST BECAUSE IT IS WHAT IS FOUND IN GOOGLE WHEN SEARCHING FOR "DISPLAY ERRORS 1AND1"

After having the same issue I did some research and found what may be the root of the trouble for 1and1 users (though I am using the American side). What seems to be is that 1and1 has listed the example wrong in there FAQ section. I went and did a search for php.ini on the faq.1and1.com site and found the example php.ini file shows:

Code: Select all

allow_url_fopen = off;
memory_limit = 40M;
upload_max_filesize = 20M;
max_execution_time = 50000;
browscap = /usr/local/lib/browscap.ini
register_globals = off;
error_reporting  =  (E_ALL & ~E_NOTICE & ~E_WARNING);
url_rewriter.tags = “a=href,area=href,frame=src,form=fakeentry,fieldset=”;
If you notice the 5th line "browscap = /usr/local/lib/browscap.ini" needs a semi-colon at the end like:

Code: Select all

allow_url_fopen = off;
memory_limit = 40M;
upload_max_filesize = 20M;
max_execution_time = 50000;
browscap = /usr/local/lib/browscap.ini;
register_globals = off;
error_reporting  =  (E_ALL & ~E_NOTICE & ~E_WARNING);
url_rewriter.tags = “a=href,area=href,frame=src,form=fakeentry,fieldset=”;
Other wise everything underneath that line fails to get read. Assuming most use this as the example php.ini they started with an error and add the "display_errors = off;" line at the bottom like myself...

Any way using their example at 1and1 your php.ini file should have the following contents

Code: Select all

### Turn allow_url_fopen ON if you want to allow for site feeds ###
### to reach your site and other content as such ###
### Security Risk involved in allowing allow_url_fopen###
allow_url_fopen = off;
memory_limit = 40M;
upload_max_filesize = 20M;
max_execution_time = 50000;
browscap = /usr/local/lib/browscap.ini;
### Register Globals off for php 4 ###
###if you use an htaccess file to change to 5 this doesn't matter ###
register_globals = off;
error_reporting  =  (E_ALL & ~E_NOTICE & ~E_WARNING);
url_rewriter.tags = “a=href,area=href,frame=src,form=fakeentry,fieldset=”;
display_errors = off;
Then the php.ini file should be placed in the following folders:
  • /
    /administrator
    /installation
The reason for only those 3 folders is because php should not be executing anywhere else on your Joomla site. If this is not the case add the php.ini anywhere else your browser can access content from the web. (or you have a problem and need to fix the code)

Also your .htaccess file should only be in the root folder "/" as it will effect all sub folders unlike the php.ini (this is for shared hosting on the 1and1 servers)

your .htaccess should contain (and can be added to the bottom of the joomla htaccess.txt)

Code: Select all

AddType x-mapp-php5 .php
example1.jpg

Re: how to fix this "Display Errors is ON"

Posted: Wed Aug 06, 2008 2:45 pm
by humvee
Hi. Tekcronic,

Thanks very much for posting your findings here. You might like to register at the doc.joomla.org wiki pages and create a tutorial on this.

Andy

Re: how to fix this "Display Errors is ON"

Posted: Thu Oct 16, 2008 8:24 pm
by babieblue
Hi. I've followed the instruction and have successfully installed xampp onto the computer and currently installed joomla but got the Display Errors show as "on". I have already changed the php.ini display_errors = off and put a copy into the root,admin/install as well and it still shows "on" What can I do to fix this?

thanks.

Re: how to fix this "Display Errors is ON"

Posted: Fri Oct 17, 2008 12:26 am
by tekcronic
I believe with xampp your going to want to either use the portal http://localhost/xampp or place the php.ini in the folder "\xampp\php"

Re: how to fix this "Display Errors is ON"

Posted: Fri Oct 17, 2008 12:29 am
by brad
1&1 (and others) are a disgrace for still leaving register globals on serverwide. Disabling via a php.ini directive is pretty pointless with regard to server security, see: http://community.joomla.org/team-blogs/ ... -time.html

also: http://community.joomla.org/team-blogs/ ... en-up.html


... oh and I bet they still run php4...

*sigh*

Re: how to fix this "Display Errors is ON"

Posted: Fri Oct 17, 2008 5:47 am
by s2krish
babieblue wrote:Hi. I've followed the instruction and have successfully installed xampp onto the computer and currently installed joomla but got the Display Errors show as "on". I have already changed the php.ini display_errors = off and put a copy into the root,admin/install as well and it still shows "on" What can I do to fix this?

thanks.
Hi, in XAMPP, php.ini is found in xampp\apache\bin. You sud edit that file.

Re: how to fix this "Display Errors is ON"

Posted: Fri Oct 17, 2008 6:12 am
by babieblue
I still couldn't get the display errors to be off when I re-run the joomla installation scripts.

First Attempt:
I edited the php.ini script in /xampp/php and make copy to /htdocs/joomla, /joomla/admin, /joomla/install. It didn't work.

Second Attempt:
I edited the php.ini script in /xampp/apache/bin and make copy to /htdocs/joomla, /joomla/admin, /joomla/install. It didn't work.

What else can I do to get the display errors to be "off"?

Thanks a lot :)

Re: how to fix this "Display Errors is ON"

Posted: Sat Dec 13, 2008 8:01 pm
by sbarnold
Thanks for that .htaccess file, I'm using 1and1 also. I'll give it a try.

Re: how to fix this "Display Errors is ON"

Posted: Sun Mar 15, 2009 10:04 am
by hieu_t_pham
Hi all, could you please advise why the PHP core configuration shown "display_errors Off" when I used phpinfo() to check, but it still inform Display Errors ON when I install Joomla?

Re: how to fix this "Display Errors is ON"

Posted: Tue Mar 17, 2009 10:54 pm
by pzd6tl
Hello, I was trying to locate the "Display Errors is ON" but I could not locate it in my php.ini file.

Can you anyone assist?

Here is my php.ini file:

register_globals = off
allow_url_fopen = off

expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

[Zend]
zend_extension=/usr/local/zo/ZendExtensionManager.so
zend_extension=/usr/local/zo/4_3/ZendOptimizer.so

Re: how to fix this "Display Errors is ON"

Posted: Thu May 21, 2009 12:38 am
by gammo
humvee wrote:

Code: Select all

php_flag display_errors "0"
to the .htaccess file that you add to the server above.
Andy
That did it. Thanks Andy.

Re: how to fix this "Display Errors is ON"

Posted: Mon Aug 10, 2009 8:12 pm
by victoryrock
humvee wrote: ...To do this navigate to your PHP directory and locate the php.ini file.
Andy
humvee,

Where do I find this file?

victoryrock

Re: how to fix this "Display Errors is ON"

Posted: Wed Sep 02, 2009 9:02 pm
by smilodon-se
victoryrock wrote: Where do I find this file?
I found mine in "\XAMPP\xampp\php" folder.

Thanks for the above info. It got solved in my case, too.