Author Topic: Undefined index: SCRIPT_URI  (Read 8764 times)

0 Members and 1 Guest are viewing this topic.

Offline WeatherAnomaly

  • Senior Member
  • **
  • Posts: 56
    • Pinellas Weather
Undefined index: SCRIPT_URI
« on: November 24, 2008, 11:43:00 PM »
Hi All

I'm checking out the ability of the AJAX/PHP powered scripts from Saratoga weathe and am running into an issue. I get the error below. Please don't tell me to disable the Notice inmy php.ini. I'm looking for the root cause. If I go into the Settings.php file and set "allowThemeSwitch" to false most of those error go away. If I then go and set the "flyoutmenu" a few lines down in the Settings.php file all the errors are gone but then so are the nice menues. When the errors are happening the graphics are aslo pushed way down on the page. I'm running IIS7 with PHP 5.25 set up as a fastCGI. Any ideas?

Notice: Undefined index: SCRIPT_URI in C:\inetpub\wwwroot\include-style-switcher.php on line 345

Notice: Undefined index: SCRIPT_URI in C:\inetpub\wwwroot\include-style-switcher.php on line 347

Notice: Undefined index: SCRIPT_URI in C:\inetpub\wwwroot\include-style-switcher.php on line 345

Notice: Undefined index: SCRIPT_URI in C:\inetpub\wwwroot\include-style-switcher.php on line 347

Notice: Undefined index: SCRIPT_URI in C:\inetpub\wwwroot\include-style-switcher.php on line 345

Notice: Undefined index: SCRIPT_URI in C:\inetpub\wwwroot\include-style-switcher.php on line 347
-The National Weather Service is one of the "few" US Government operations (US Department of Commerce) that give every American a "tangible benefit" for their tax dollar.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Undefined index: SCRIPT_URI
« Reply #1 on: November 25, 2008, 02:45:38 AM »
I just love IIS servers... always something just a bit different.  the $_SERVER['SCRIPT_URI'] (a mostly standard feature for PHP) seems to not be set by your PHP installation.

You might try changing the two occurrences of $_SERVER['SCRIPT_URI'] to $_SERVER['PHP_SELF'] in the include-style-switcher.php module and see if that fixes the Notice: errata

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline WeatherAnomaly

  • Senior Member
  • **
  • Posts: 56
    • Pinellas Weather
Re: Undefined index: SCRIPT_URI
« Reply #2 on: November 25, 2008, 06:45:39 AM »
Fantastic Ken! Your suggestion worked like a charm. I've read all the threads about the AJAX/PHP/Perl scripts and the discussion of relative paths and wwwroot starting points. I would have to agree that with PHP any website should have paths relative to the starting point. I know I can do an include or make an web alias back to the true web root but do you happen to know off hand which php files need to be edited so I can run the web from a sub dir. Just the php names would be fine and would save me a bunch of trial and error. Once I get this figured out I'll do a complete write up of running your AJAX/PHP from an IIS server. Thanks again Ken.
-The National Weather Service is one of the "few" US Government operations (US Department of Commerce) that give every American a "tangible benefit" for their tax dollar.

Offline NDSWeather

  • NDS Weather - Colorado City
  • Contributor
  • ***
  • Posts: 118
  • NDS Weather - Colorado City CO
Re: Undefined index: SCRIPT_URI
« Reply #3 on: January 25, 2009, 05:33:23 PM »
Fantastic Ken! Your suggestion worked like a charm. I've read all the threads about the AJAX/PHP/Perl scripts and the discussion of relative paths and wwwroot starting points. I would have to agree that with PHP any website should have paths relative to the starting point. I know I can do an include or make an web alias back to the true web root but do you happen to know off hand which php files need to be edited so I can run the web from a sub dir. Just the php names would be fine and would save me a bunch of trial and error. Once I get this figured out I'll do a complete write up of running your AJAX/PHP from an IIS server. Thanks again Ken.

Once I get this figured out I'll do a complete write up of running your AJAX/PHP from an IIS server.
Any news on this yet?

NDS Weather
6153 Davis Wireless Vantage Pro2 FW 1.90 Serial Port
Now Only WeatherLink 6.0.5
KCOCOLOR2154 CW4784

 

anything