ted_chou12 Posted December 26, 2006 Share Posted December 26, 2006 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 More sharing options...
simcoweb Posted December 26, 2006 Share Posted December 26, 2006 Syntax errors should already display automatically. If it's a MySQL error then you need to use the 'or die(mysql_error()); extension on your queries. Link to comment https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147840 Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Author Share Posted December 26, 2006 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 More sharing options...
genericnumber1 Posted December 26, 2006 Share Posted December 26, 2006 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 1If 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 More sharing options...
ted_chou12 Posted December 26, 2006 Author Share Posted December 26, 2006 thanks, by the way, by computer do you mean my C drive? Link to comment https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147847 Share on other sites More sharing options...
genericnumber1 Posted December 26, 2006 Share Posted December 26, 2006 wherever you have your apache/php installed my friend ;) Link to comment https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147848 Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Author Share Posted December 26, 2006 apache/php installed? is that a program ??? sorry, i am kind of new to this Link to comment https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147849 Share on other sites More sharing options...
genericnumber1 Posted December 26, 2006 Share Posted December 26, 2006 Let's go step by step, do you have a host online, like someone you pay a monthly/yearly fee to? or are you running the php server from your computer? the first one is the most likely one... Link to comment https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147851 Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Author Share Posted December 26, 2006 first one host on web Link to comment https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147853 Share on other sites More sharing options...
genericnumber1 Posted December 26, 2006 Share Posted December 26, 2006 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 1and 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 More sharing options...
ted_chou12 Posted December 26, 2006 Author Share Posted December 26, 2006 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 More sharing options...
genericnumber1 Posted December 26, 2006 Share Posted December 26, 2006 Well in that case if your host is using apache (most likely) just create a .htaccess file with the mentioned line in it :P error messages should then start to work... you don't even have to touch your control panel, just your ftp client. Link to comment https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147856 Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Author Share Posted December 26, 2006 okay Link to comment https://forums.phpfreaks.com/topic/31863-how-to-show-error/#findComment-147858 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.