Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index: QUERY_STRING #2

Open
shineabraham opened this issue May 7, 2021 · 1 comment
Open

Undefined index: QUERY_STRING #2

shineabraham opened this issue May 7, 2021 · 1 comment

Comments

@shineabraham
Copy link

i got this error on running index.php. can you tell me how I could run this program for custom SSID and password
Fatal error: Uncaught ErrorException: Undefined index: QUERY_STRING in /Users/shineabraham/Documents/AGREEFY/Research and Development/mobileconfig-iOS/PHPMobileConfig/classes/class.helper.php:312
Stack trace:
#0 /Users/shineabraham/Documents/mobileconfig-iOS/PHPMobileConfig/classes/class.helper.php(312): {closure}(8, 'Undefined index...', '/Users/shineabr...', 312, Array)
#1 /Users/shineabraham/Documents/mobileconfig-iOS/PHPMobileConfig/inc.ssl.php(33): HELPER::setURL('https://')
#2 /Users/shineabraham/Documents/mobileconfig-iOS/PHPMobileConfig/index.php(12): require_once('/Users/shineabr...')
#3 {main}
thrown in /Users/shineabraham/Documents/mobileconfig-iOS/PHPMobileConfig/classes/class.helper.php on line 312

@alve89
Copy link
Owner

alve89 commented May 10, 2021

It's like the same question you asked in issue #1 - unfortunately I can't tell you why your PHP server does not set these variables. You can fix this by

  1. Running phpinfo()
  2. Get the server variable $_SERVER['XXXXXX'], where XXXXXX is the name of the variable that stores the query (it's the bold part of e. g. https://domain.tld/?**key1=value1&key2=value2**)
  3. Change line
    $query = explode('&', $_SERVER['QUERY_STRING']);
    from $query = explode('&', $_SERVER['QUERY_STRING']); to $query = explode('&', $_SERVER['XXXXXX']);

If you tell me your variable-name afterwards, I can implement this additionally for the next version of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants