cRiMiNaL_Genius Posted August 19, 2011 Share Posted August 19, 2011 I'm doing some work on a fancy login system that I found on-line, however it keeps giving me various undefined index errors, for the most part I do have an understanding of what that means, however I think there might be something else to it in this case, the thing is Initially I was having the problem with a script that I was working on that was based on a tutorial that I had seen as it is now I seem to be the only one that's having the problem, not only that I downloaded the original source file for the tutorial and that for the most part only shows more errors, now it could be because of my noobish-ness but even with that in mind I'd still like to get some help, I've uploaded a pic of the error but its unlikely that alone will help hence the original source files of the tutorial I mentioned http://demo.tutorialzine.com/2009/10/cool-login-system-php-jquery/demo.zip and the actual demo http://demo.tutorialzine.com/2009/10/cool-login-system-php-jquery/demo.php I'm not sure if you guys will get the same result however it would be nice to find out why Its not working for me... :| [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/245170-undefined-index-errors/ Share on other sites More sharing options...
btherl Posted August 19, 2011 Share Posted August 19, 2011 Those are "notices", rather then errors. Everyone else probably has them disabled. And unless you want to go through and modify the entire script, I suggest you switch them off too. The relevant setting is this: http://php.net/manual/en/function.error-reporting.php You probably want this setting: // Report all errors except E_NOTICE // This is the default value set in php.ini error_reporting(E_ALL ^ E_NOTICE); Quote Link to comment https://forums.phpfreaks.com/topic/245170-undefined-index-errors/#findComment-1259277 Share on other sites More sharing options...
cRiMiNaL_Genius Posted August 19, 2011 Author Share Posted August 19, 2011 .... :'( I've been recoding this thing for almost 2 weeks I know you're not suppose to cry over silly mistakes but this is just too sad... sigh. You know I had read some stuff about this but a few of them had warnings about turning the notices off because of security concerns, not only that I had the same problem when I was doing my security project at uni and couldn't figure what was wrong sigh. Thank you very much man works perfectly.... sigh wish I had posted this sooner, now I'm going to have to recode everything from scratch again.... oh well you live and learn.... Thanks again btherl, really appreciate it Quote Link to comment https://forums.phpfreaks.com/topic/245170-undefined-index-errors/#findComment-1259290 Share on other sites More sharing options...
btherl Posted August 19, 2011 Share Posted August 19, 2011 Well the notices are useful.. if you are serious about writing solid code then you should have them on. Or use a custom error handler that switches off only the ones you know you don't need. But if you are taking someone else's code and plan to use it as-is, I would usually just switch them off. Then again, if I wanted to take that code and check it thoroughly for any security issues and THEN use it, I would switch them on. So it all depends on where the code is from and what you want to use it for, and whether you want to audit and/or modify it. Just today I found a months old bug in some mature code, and I found it because notices were recently switched on on that particular development machine. Quote Link to comment https://forums.phpfreaks.com/topic/245170-undefined-index-errors/#findComment-1259297 Share on other sites More sharing options...
Network_ninja Posted August 19, 2011 Share Posted August 19, 2011 can you share your code and I will try to look over it... tnx Quote Link to comment https://forums.phpfreaks.com/topic/245170-undefined-index-errors/#findComment-1259331 Share on other sites More sharing options...
cRiMiNaL_Genius Posted August 19, 2011 Author Share Posted August 19, 2011 Well um Ninja actually I did, it was in the post, to be honest though the problem was resolved thanks to btherl, after disabling error_reporting(E_ALL ^ E_NOTICE); the messages stopped so thanks guys both of you Um as btherl mentioned though I am serious about coding actually I have been doing it for a few months now and though I was becoming a "pro" , so for the most part all the coding I've done to date had been done with the warnings on, not only that I'd normally use isset and the get methods so that I suppose would be the main reason why I never came across this problem before. Quote Link to comment https://forums.phpfreaks.com/topic/245170-undefined-index-errors/#findComment-1259443 Share on other sites More sharing options...
KevinM1 Posted August 19, 2011 Share Posted August 19, 2011 What does using $_GET have to do with anything? Quote Link to comment https://forums.phpfreaks.com/topic/245170-undefined-index-errors/#findComment-1259445 Share on other sites More sharing options...
cRiMiNaL_Genius Posted August 19, 2011 Author Share Posted August 19, 2011 Well its a form innit.... but apart from that I was speaking more generally, I was tasked to create a secure chat system I had to use $_GET... well not had to but I had reason to, the information being passed from the form needed to be encrypted before going into the database and decrypted before coming out that meant that I had to use a custom js handler to process the information before it got passed to the database and then have it pulled within the that same time frame so that it could be immediately displayed on the screen... as I said it was a chat system it was really for a school project Quote Link to comment https://forums.phpfreaks.com/topic/245170-undefined-index-errors/#findComment-1259465 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.