onlyican Posted November 7, 2006 Share Posted November 7, 2006 Hey guysLet me explain a bit hereI run PHP on my machine, using the Apache (on a Windows Based System)I also go down to the office some times to work on scripsWhich is running PHP on IISOn My Machine I get error messages (Notice: Failed: ect ect)But down the office I get a different messageA NoticeNotce: Unidifined indexwhich shows when I run a statement such as echo "<input type='text' name='field' value='".$_POST["field"]."' />";The error will be coming up as $_POST["field"] as not definedA simple way round this is something like$field = isset($_POST["field"]) ? $_POST["field"] : "";echo "<input type='text' name='field' value='".$field."' />";so I am not asking bout the errorBUTWhen I build a script, I build it at home, and then show my boss on his machine, which means spending 10 mins correcting these errorsHow do I set it to show me these errors on my machineCheers guys Link to comment https://forums.phpfreaks.com/topic/26441-error-messages/ Share on other sites More sharing options...
bqallover Posted November 7, 2006 Share Posted November 7, 2006 hmmm. All that I can think of is that your office PHP installation is pre-4.1.0, when $HTTP_POST_VARS was used instead of $_POST. If it is pre-4.1.0 I'd say the best thing is to upgrade or failing that, use $HTTP_POST_VARS, etc. instead.Hope that helps. Link to comment https://forums.phpfreaks.com/topic/26441-error-messages/#findComment-120919 Share on other sites More sharing options...
onlyican Posted November 7, 2006 Author Share Posted November 7, 2006 no that does not helpAs I said, the error is coming up as the var $_POST["field"] does not existsif I post the form, which means $_POST["field"] is now set, then the error goesI want to get those errors on my screen, so I can clean them up before I show him the result againAnd for information, both versions of PHP are POST V5 Link to comment https://forums.phpfreaks.com/topic/26441-error-messages/#findComment-120935 Share on other sites More sharing options...
Jenk Posted November 7, 2006 Share Posted November 7, 2006 In a short statement:Fix the errors when the code is on your machine.change your php.ini directive:[code]error_reporting = E_ALL[/code]on your home machine. Link to comment https://forums.phpfreaks.com/topic/26441-error-messages/#findComment-120938 Share on other sites More sharing options...
onlyican Posted November 7, 2006 Author Share Posted November 7, 2006 ok, that kinda didn't work, although it should have, so what I done instead was I have a inc_header.php file, on the top of every page.so I added some PHP codeerror_reporting(2047);(2047 is E_ALL)Thanks for the helpand before you say it, yes I did restart the server Link to comment https://forums.phpfreaks.com/topic/26441-error-messages/#findComment-120964 Share on other sites More sharing options...
Jenk Posted November 7, 2006 Share Posted November 7, 2006 lolso what's in your php.ini for that directive already? Link to comment https://forums.phpfreaks.com/topic/26441-error-messages/#findComment-121014 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.