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 Quote Link to comment 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. Quote Link to comment 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... Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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 ;) Quote Link to comment 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 Quote Link to comment 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... Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Author Share Posted December 26, 2006 first one host on web Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Author Share Posted December 26, 2006 okay Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.