FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP_ini Display Errors is turned on!





miteY
Please is there anyway of turning this off in my account? I will very much appreciate if this can be done.

Thanks in advance.
badai
just put this line in your script:

Code:
error_reporting(0);
Bondings
Did this solve your problem?
miteY
^^^^ No the problem is not yet solved after placing error_reporting(0); in my index.php file

The site in question is running on Joomla 1.5. One of the components was not displaying errors on localhost but now is displaying this error:

Code:
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in . . . /public_html/libraries/joomla/database/database/mysqli.php on line 360
Gregoric
I've been asking why doesn't it show PHP errors while executing recently. You, Bondings, had to read that and turn the reporting on, as I suppose Smile. Well, as for me, you can turn it off, I will only have to debug my sites on localhost.
Bondings
Gregoric wrote:
I've been asking why doesn't it show PHP errors while executing recently. You, Bondings, had to read that and turn the reporting on, as I suppose Smile. Well, as for me, you can turn it off, I will only have to debug my sites on localhost.

I would rather like to keep the error reporting. Most people don't test it out on localhost and besides the errors might be different to due different settings/passwords/...
Gregoric
Bondings wrote:
Gregoric wrote:
I've been asking why doesn't it show PHP errors while executing recently. You, Bondings, had to read that and turn the reporting on, as I suppose Smile. Well, as for me, you can turn it off, I will only have to debug my sites on localhost.

I would rather like to keep the error reporting. Most people don't test it out on localhost and besides the errors might be different to due different settings/passwords/...


All right. Just reminded one situation when I had problem with using OpenID + no SSL on localhost...

Keep it as it is now until more people will dislike it.

As offtopic: is it a waste or a problem if I edit files directly on server? You know, few changes and Ctrl+S that sends the file directly to the server. I am asking because I am saving and debugging very often, even few times at a minute.
Bondings
Gregoric wrote:
As offtopic: is it a waste or a problem if I edit files directly on server? You know, few changes and Ctrl+S that sends the file directly to the server. I am asking because I am saving and debugging very often, even few times at a minute.

Normally that shouldn't be a problem at all. Just make sure you have a backup of the files.
sonam
miteY wrote:
^^^^ No the problem is not yet solved after placing error_reporting(0); in my index.php file

The site in question is running on Joomla 1.5. One of the components was not displaying errors on localhost but now is displaying this error:

Code:
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in . . . /public_html/libraries/joomla/database/database/mysqli.php on line 360


I thinking hiding errors is very bad idea because you don't know what happened with your scripts. This way of codding open backdoor for some attack.

Error on your site just say there are no generated results. Now, you must think did you insert something wrong in mysqli syntax. Or check did your mysqli is empty and if is not run mysqli_num_rows() otherwise redirect, or do whatever.

By the way if you want to stop errors try this, and insert this lines before session_start if you are using sessions.
Code:

ini_set("display_errors", "0");
error_reporting(NULL);



Sonam
miteY
Thank you all for your help.

A well designed website is not supposed to display of errors at all. But in my case the problem was from the sh404SEF component I installed.

The error was corrected by renaming a database table.

Once again, thank you all. FriHost, You ROCK!
Qantas94Heavy
Is there any other way of doing this apart from adding it to every PHP page that I have or adding php.ini files in every directory? If not how would I go about recursively adding a php.ini file in every directory (.htaccess didn't work for me for me, is it just that I'm doing it wrong or is it not possible to use .htaccess with this server configuration)?
sonam
Qantas94Heavy wrote:
Is there any other way of doing this apart from adding it to every PHP page that I have or adding php.ini files in every directory? If not how would I go about recursively adding a php.ini file in every directory (.htaccess didn't work for me for me, is it just that I'm doing it wrong or is it not possible to use .htaccess with this server configuration)?


No, if you want to stop errors you must adding this in any page. It is not at possible to insert ini or htaccess file in any directory and stop errors.

I have error reporting in separate file and I am just include on all pages. But my error reporting is not Off because I would like to see errors and not to hide. Wink

Sonam
Qantas94Heavy
sonam wrote:
Qantas94Heavy wrote:
Is there any other way of doing this apart from adding it to every PHP page that I have or adding php.ini files in every directory? If not how would I go about recursively adding a php.ini file in every directory (.htaccess didn't work for me for me, is it just that I'm doing it wrong or is it not possible to use .htaccess with this server configuration)?


No, if you want to stop errors you must adding this in any page. It is not at possible to insert ini or htaccess file in any directory and stop errors.

I have error reporting in separate file and I am just include on all pages. But my error reporting is not Off because I would like to see errors and not to hide. Wink

Sonam


Oh OK, so I must add it at runtime, my bad... Brick wall Embarassed
MikeFromHC
Bondings wrote:
I would rather like to keep the error reporting. Most people don't test it out on localhost and besides the errors might be different to due different settings/passwords/...


That's fine under some conditions but the messages come from a Joomla 1.5 site and 1.5 is currently supported only for security issues. All support will soon end.

In the vast majority of cases the errors are issues that in no way have affected the performance of the program in any real way and can't be fixed by the average or even above average user even if they can write code.
Related topics
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.