IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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 January 11th, 2004, 11:25 AM
flashgc flashgc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 84 flashgc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 39 m 36 sec
Reputation Power: 10
Server problem or code problem???

Running IIS 5.0 on Server 2000

The default page served is HOME.PHP which utilizes several include files for various elements of the page. The Site Navigation table, Featured Link table, Google Search table, User Info table, Registration Info table and Link To Geek Emporium tables are all PHP includes.

The User Info table is the one most recently added (a couple of days ago) and it's been working fine as far as it goes. This morning, that table doesn't process nor does anything that comes after it on the page WHILE IT'S SERVED AS THE DEFAULT DOCUMENT. If you do a direct call to the doc (URL includes document name) it all processes correctly.

Like I said, this has been working fine for a day or two then all of a sudden it stopped doing so. I've temporarily gotten past it by putting the default doc back to HOME.HTM which uses a redirect to HOME.PHP thus causing it to process correctly. ??? Any ideas anyone ???
__________________
Gordon
======
ECNCweather.com
Where are we going and why am I in this handbasket?

Reply With Quote
  #2  
Old January 12th, 2004, 09:59 PM
flashgc flashgc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 84 flashgc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 39 m 36 sec
Reputation Power: 10
Aw c'mon... Not even a semi-educated WAG? Leave it to me to find a situation completely unique.

Just in case it might provide a little inspiration, here is the code for userinfo.php
PHP Code:
<?php
if(isset($_SERVER['HTTP_REFERER']))
{
    
$url $_SERVER['HTTP_REFERER'];
    
$title fetchpagetitle($url);
}
else
{
    
$title 'N/A';
}

echo 
'<table width="98%" border="0" cellspacing="0" cellpadding="2" valign="top" align="center">';
echo 
' <tr>';
echo 
'   <th nowrap bgcolor="#666666"><font size="-1" face="Arial, Helvetica, sans-serif" color="#FFFFCC">USER INFO</font></th>';
echo 
' </tr>';
echo 
' <tr><td bgcolor="#333333"><font size="-1" face="Arial, Helvetica, sans-serif" color="#FFFFCC" link="#FFFFCC" vlink="#FFFFCC">';
echo 
'   <strong>Referrer:</strong> ',$_SERVER['HTTP_REFERER'];
echo 
'</font></td></tr>';
echo 
' <tr><td bgcolor="#333333"><font size="-1" face="Arial, Helvetica, sans-serif" color="#FFFFCC" link="#FFFFCC" vlink="#FFFFCC">';
echo 
'   <strong>Page title:</strong> ',$title;
echo 
'</font></td></tr>';
echo 
' <tr><td bgcolor="#333333"><font size="-1" face="Arial, Helvetica, sans-serif" color="#FFFFCC" link="#FFFFCC" vlink="#FFFFCC">';
echo 
'   <strong>IP Address:</strong> ',$_SERVER['REMOTE_ADDR'];
echo 
'</font></td></tr>';
$hostname gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo 
' <tr><td bgcolor="#333333"><font size="-1" face="Arial, Helvetica, sans-serif" color="#FFFFCC" link="#FFFFCC" vlink="#FFFFCC">';
echo 
'   <strong>Host Name:</strong> ',$hostname;
echo 
'</font></td></tr>';
echo 
' <tr><td bgcolor="#333333"><font size="-1" face="Arial, Helvetica, sans-serif" color="#FFFFCC" link="#FFFFCC" vlink="#FFFFCC">';
echo 
'   <strong>Browser:</strong> ',$_SERVER["HTTP_USER_AGENT"];
echo 
'</font></td></tr>';
echo 
' <tr><td bgcolor="#333333"><font size="-1" face="Arial, Helvetica, sans-serif" color="#FFFFCC" link="#FFFFCC" vlink="#FFFFCC">';
echo 
'   <strong>Query String:</strong> ',$_SERVER['QUERY_STRING'];
echo 
'</font></td></tr>';
echo 
' <tr><td bgcolor="#333333"><font size="-1" face="Arial, Helvetica, sans-serif" color="#FFFFCC" link="#FFFFCC" vlink="#FFFFCC">';
echo 
'   <strong>Remote Port:</strong> ',$_SERVER["REMOTE_PORT"];
echo 
'</font></td></tr>';
echo 
'</font></td></tr>';
echo 
'</table>';
echo 
'<br />';
function 
fetchpagetitle($url
{
    
$fp fopen($url'r');
    while(!
feof($fp)) {
        if(
preg_match('/<title>([^<]*)</title>/i'fgets($fp1024), $matches)) {
            
$title $matches[1];
            break;
        }
    }
    
fclose($fp);
    return 
$title;
}
?>

Last edited by flashgc : January 12th, 2004 at 10:04 PM.

Reply With Quote
  #3  
Old January 13th, 2004, 12:20 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,239 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 15 h 17 m
Reputation Power: 4445
I have no idea about PHP on IIS, sorry.

Reply With Quote
  #4  
Old January 15th, 2004, 11:58 AM
flashgc flashgc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 84 flashgc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 39 m 36 sec
Reputation Power: 10
Just as a followup... I had the server rebooted and the problem cleared up. We still have no idea as to the particular nature of the problem or why the server should gag on that particular code only when serving the document as default. Way too queer.

Reply With Quote
  #5  
Old January 17th, 2004, 07:48 PM
flashgc flashgc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 84 flashgc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 39 m 36 sec
Reputation Power: 10
Chapter two of followup.... within 24 hrs of the reboot, the php code started falling down again. I don't know why IIS would serve it correctly sometimes and not others, but I finally pinned it down to a function in the code. Once I removed that function (gets page title of referring page) the code seems to work fine regardless.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > Server problem or code problem???

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap