Undefined index - php error #30


  • Defect
  • Waiting
Open
Assigned to _ForgeUser4509640
  • _ForgeUser6870623 created this issue Sep 12, 2011

    What steps will reproduce the problem?
    - Using PHP 5.x.x

    What is the expected output? What do you see instead?
    - expected: No errors on login screen
    - what i see: errors

    - Notice: Use of undefined constant link - assumed 'link' in C:\xampp\htdocs\auction\scripts\config.php on line 31
    - Notice: Undefined index: error in C:\xampp\htdocs\auction\login.php on line 22

    What version of the product are you using?
    - jar file version: 0.1.8
    - Web Interface v0.1

    Do you have an error log of what happened?
    - no errors in minecraft server log file.

    Please provide any additional information below.
    - I was testing this plugin and web interface today and it was working great. i really liked it. however when moved it from my test server (home pc)   to my main server i started getting errors above on the index page before log in. it was still possible to login but there were many more errors on each page and the interface did not function correct.

    - I tried reinstalling everyhing and had no luck. I did some goggleing and found that the "Undefined index error" was a problem that showed up a lot when people upgraded from php version 4.x.x to 5.x.x. my home pc was running on 4.x.x and my main server is running 5.5.8. The cause of the problem seems to be the way the php is coded. i am not sure if this is the problem because i have little experiance with php so i cant really explain anymore. a quick google search for ": Undefined index: error" should bring up somthing of use.

    Hope i can sort this out soon because i really like this plugin. its a fantastic idea.

  • _ForgeUser6870623 added the tags New Defect Sep 12, 2011
  • _ForgeUser6870623 posted a comment Sep 16, 2011

    Dont know how but i got this working agian. what i posted above was totally wrong. from searching google it looked like that was the problem but i guess not.

  • _ForgeUser6827021 posted a comment Sep 21, 2011

    Replace:

    if($_GET['error'] == 1) { echo "Login failed"; }

    with

    if(isset($_GET['error'] == 1)) { if($_GET['error'] == 1) { echo "Login failed"; } }

    should fix it :) same counts for other errors (there are a few more ;) ) put the "if(isset" part above the check, and replace the 'error' with the correspondig part. If u understand what i mean if not here is a example:

    if(isset($_GET['success'])) { if($_GET['success']==1){ echo "Item bought."; } }

  • _ForgeUser4509640 posted a comment Sep 27, 2011

    Should have fixed most of this, let me know if there are still problems.

  • _ForgeUser4509640 removed a tag New Sep 27, 2011
  • _ForgeUser4509640 added a tag Waiting Sep 27, 2011

To post a comment, please login or register a new account.