Jump to content

how to show error?


ted_chou12

Recommended Posts

i wish to show the errors, because everytime there is something wrong with the code, the page just goes blank, and i have to go through every line to find a syntax mistake, often it drived me nuts...
i know there is something called a php.ini file, but what do you put inside? and where do you put it?
Ted
Link to comment
https://forums.phpfreaks.com/topic/31863-how-to-show-error/
Share on other sites

nope. it doesnt display any syntax errors, I uploaded a file:
<?php
phpinfo();
?>
and the information tells me that the display error is off....
for mysql errors, they just give access denied for @localhost using password 'YES' or something like that which is not very useful...
Link to comment
https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147841
Share on other sites

If you use shared hosting you would want to contact, or read the forums to find out how to edit your php.ini file...

In the mean time (I'd really suggest you set it in your php.ini) you could create a .htaccess file in the base of your htdocs.. or wherever you are developing and add this line...

php_flag display_errors 1

If you aren't using shared hosting a quick search on your computer for php.ini will find it right quick for you :D
Link to comment
https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147845
Share on other sites

Okie dokie, then your host might have some way to edit the php.ini, be it you logging in and having a panel, or some other method. You might wanna read some FAQS with your host or read their forums to find out the way to edit your php.ini, you'll be quite happy you did.

As for a temporary fix while you're looking for the php.ini answer you could create a .htaccess file with the line...

php_flag display_errors 1

and that should give you your errors that you seek :D But for a permanent solution it's better if you edit the display_errors setting in your php.ini
Link to comment
https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147854
Share on other sites

okay, i understand, my user panel did have some php flags that allows show error but they dont work, there is a submit button for changes to be saved, but it doesnt save at all, and the default is show no error, so i am not able to change it through the user panel, i just found my host's forum the other day, but is now temporary closed...i am all alone :'(
Thanks anyway.
Ted
Link to comment
https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147855
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.