IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 29th, 2005, 12:27 AM
HeadElf's Avatar
HeadElf HeadElf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 250 HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 2 m 34 sec
Reputation Power: 12
php errors

This is driving me nuts. I'm getting a local error for coding that tests fine online.

Notice: Undefined variable: inc in D:\ActiveWebfiles\AxwoodWebsite\SecretSantaFiles\index.php on line 27


Line 27 says
Code:
 if (!$inc) { include("Home.htm"); } 


Is this stupid or what?!

Help! I'm running IIS and php 5.0 build 2195 on a Win2000 system.

And before somebody says "url must have http://localhost", I get the same using this url.

http://localhost/AxwoodWebsite/SecretSantaFiles/index.php produces "Notice: Undefined variable: inc in D:\ActiveWebfiles\AxwoodWebsite\SecretSantaFiles\index.php on line 27"

Thanks.

HeadElf
__________________
HeadElf
OfficeElf.com

Last edited by HeadElf : October 29th, 2005 at 12:29 AM.

Reply With Quote
  #2  
Old October 29th, 2005, 02:25 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,957 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 15 h 35 m 19 sec
Reputation Power: 802
This question doesn't have anything to do with IIS, maybe try the PHP forum if you don't get a solution.

My guess, perhaps $inc isn't present.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved
of it. --Mark Twain

Reply With Quote
  #3  
Old October 29th, 2005, 08:54 PM
HeadElf's Avatar
HeadElf HeadElf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 250 HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 2 m 34 sec
Reputation Power: 12
Trust me, $inc DOES exist in the programming and it is very definately NOT a php problem. The script works great on the online web server, and without issue. On my local system, with the above configuration, not only will the server not do page to page navigation (<a href="index.php?inc=4">), it won't hold the variable content nor recognize session variables. It's something in the setup, I just can't figure what.

I'm testing a new editor that's supposed to be so much better (still reserving opinion until I can get the server/php on my local machine working correctly). Until now, I've simply moved the files to the online server and tested them there. For this configuration/testing bit, I'm using already proven scripts so I know there are no errors produced by the script.

HeadElf

Reply With Quote
  #4  
Old November 1st, 2005, 12:06 AM
edwinbrains's Avatar
edwinbrains edwinbrains is offline
Retired Moderator
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Jan 2004
Location: London, UK
Posts: 6,670 edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)  Folding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced Folder
Time spent in forums: 1 Week 6 Days 23 h 39 m 19 sec
Reputation Power: 92
Quote:
Originally Posted by HeadElf
I'm getting a local error for coding that tests fine online.


It might be caused by servers configured differently. The error you're getting is just a notice, not an error. In php.ini there is an error_reporting variable. If you set this to:

error_reporting = E_ALL & ~E_NOTICE

you'll be shown all errors except for notices (which is the message you're currently getting). This is probably how your online server is configured.
Comments on this post
SimonGreenhill agrees!
__________________
- Edwin -

The General Rules Thread | The General FAQ Thread

Reply With Quote
  #5  
Old November 1st, 2005, 04:52 AM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
As Ed & Doug said - this is a php issue.

What's happening is that you're trying to use $inc before setting it (i.e. undefined variable inc ) in the line if (!$inc) { include("Home.htm"); }. However since $inc doesn't exist, !$inc is true, and you end up include'ing Home.htm.

These types of warnings are generally hidden by setting the error-reporting level as edwin mentioned ( which is why you're not getting that error on your other server ), but it's far better practice to use something like:
PHP Code:
if ( ! isset( $inc ) ) { include("Home.htm"); } 


--Simon

Reply With Quote
  #6  
Old November 1st, 2005, 09:48 AM
HeadElf's Avatar
HeadElf HeadElf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 250 HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level)HeadElf User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 2 m 34 sec
Reputation Power: 12
Thanks for the feedback, guys.

I'm actually not accessing the variable in the line of code mentioned, just checking to see if it exists. And, if I click any of the other menu items which DOES set the variable, the variable isn't set, so no other page comes up, just the homepage. This setup works perfectly online (it's there and working fine now!) so it's got to be something in the php setup. I just don't know enough to go find it.

Thanks again.

HeadElf

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > php errors


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT