PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

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 Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old June 30th, 2004, 09:18 PM
SeanFromIT SeanFromIT is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Covington, KY, US
Posts: 10 SeanFromIT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to SeanFromIT Send a message via Yahoo to SeanFromIT
PHP Include Bug?

Server Info:
Windows 2000 Server Edition
Microsoft IIS 5
PHP 4.3.7

Everything works fine for several hours and then I go to reload a .php page and the browser (IE or Mozilla) will redirect to one of the PHP include files called by that page. If I restart the IIS service it still does it, but if I reboot the entire system (thus resetting the PHP service?) everything goes back to normal.

Any ideas on why this is so? Yes, I know IIS sucks and I should switch to Apache but I would like to see if there's a fix for this problem :-)

Reply With Quote
  #2  
Old June 30th, 2004, 10:26 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: PHP Include Bug?

Never heard or seen this before, how do you have PHP set up as CGI or ISAPI. Give me as much info as possible, as this seems like a strange occurrence. Also post the code of one of the pages that this is happening too.

Reply With Quote
  #3  
Old June 30th, 2004, 10:53 PM
SeanFromIT SeanFromIT is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Covington, KY, US
Posts: 10 SeanFromIT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to SeanFromIT Send a message via Yahoo to SeanFromIT
RE: PHP Include Bug?

I have it set up as CGI.

Here's the code on one of the pages that it has happened to:

php Code:
Original - php Code
  1.  
  2. <? include("http://www.holmeshigh.com/alpha/test/includes/globalpaths.inc") ?>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  4.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5.  
  6. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  7.  
  8. <head>
  9.  
  10.     <title>|+:>Holmes Online<:+|</title>
  11.     <link rel="stylesheet" href="http://www.holmeshigh.com/alpha/test/includes/newsstyle.css" type="text/css" media="screen" />
  12.     <? include("http://www.holmeshigh.com/alpha/test/includes/header.inc") ?>
  13.     <? include("http://www.holmeshigh.com/alpha/test/includes/leftnav.inc") ?>
  14.                 </td>
  15.                 <td id="content">
  16.                     <span class="title">The Holmes Campus Bookstore</span>
  17.                     <br />
  18.                     <span class="subtitle">More Than Just a Bookstore</span>
  19.                     <p class="credit">
  20.                         By Sean Feeney, HHS Website Staff Reporter (August 8th, 2002)
  21.                     </p>
  22.                     <p class="articletext">
  23.                         <img alt="Stuffed Animals" class="rightalignpicpad" border="0" align="right" src="http://www.holmeshigh.com/alpha/test/images/newsarticles/bookstore/dawgpound.jpg" width="320px" height="240px" />
  24.                         Located on the second floor of the connector between the Jr. High and
  25.                         Administration buildings, the HHS bookstore sells just about everything you
  26.                         could ever need to lead a successful high school career. But this reporter found
  27.                         that not everything is as it seems in a recent interview with Patty Holland, the HHS
  28.                         Bookstore administrator.
  29.                     </p>
  30.                     <p class="articletext">
  31.                         What secrets does the bookstore hide? Aside from selling pens, paper, stuffed animals
  32.                         and even uniforms, the bookstore handles a number of tasks as per guidelines handed down
  33.                         by the Covington Board of Education. Accounting seems to be the main operation performed
  34.                         by the bookstore, they track all funds owned by and are in charge of all fundraising activities
  35.                         for all school-related organizations, from the student councils dances to band candy bar sales.
  36.                     </p>
  37.                     <p class="articletext">
  38.                         <img alt="Book Scanning" class="leftalignpicpad" border="0" align="left" src="http://www.holmeshigh.com/alpha/test/images/newsarticles/bookstore/bookscan.jpg" width="320px" height="240px" />
  39.                         Textbooks: you check them out every year, but do you know why they scan your ID cards barcode? The HHS
  40.                         bookstore's computer system keeps track of where each text book is by registering who checked it out last.
  41.                         They house this massive collection of [mostly outdated] textbooks in the basement of the connector, which is
  42.                         typically where you pick up your new book each semester.
  43.                     </p>
  44.                     <p class="articletext">
  45.                         Last but by no means the least, is incoming and outgoing mail. The loading dock is located not even ten feet
  46.                         <img alt="Loading Dock" class="rightalignpicpad" border="0" align="right" src="http://www.holmeshigh.com/alpha/test/images/newsarticles/bookstore/receiving.jpg" width="320px" height="240px" />
  47.                         feet from the back door of the bookstore and was packed to full capacity at the time of my visit. The bookstore
  48.                         receives all incoming packages to Holmes, opens them, and tears out the original packing slip in order to stamp
  49.                         received and copy it; the paper trail never ends. The same goes for outgoing USPS and UPS packages, a mail card
  50.                         must be completed and signed to be approved and from there the bookstore takes care of the shipping. Mail is received
  51.                         by the bookstore on a daily basis and delivered to the appropriate office.
  52.                     </p>
  53.                     <p class="articletext">
  54.                         <img alt="Cash Register" class="leftalignpicpad" border="0" align="left" src="http://www.holmeshigh.com/alpha/test/images/newsarticles/bookstore/register.jpg" width="320px" height="240px" />
  55.                         What does one need to do to start a fundraiser? According to the Holmes Campus Activities Funds Administrative
  56.                         Procedures, a fund raising application form and purchase requisition should be completed and authorized by the Student
  57.                         Activities Office before starting a fundraiser. The limit is two fundraisers per year. See the athletic office for these forms.
  58.                     </p>
  59.                     <p class="articletext">
  60.                         For more information contact Patty Holland in the bookstore at
  61.                         <a title="E-mail Patty Holland" href="mailto:pholland2@covington.k12.ky.us">pholland2@covington.k12.ky.us</a>.
  62.                     </p>
  63.                 </td>
  64.                 <? include("http://www.holmeshigh.com/alpha/test/includes/rightnav.inc") ?>
  65.     <? include("http://www.holmeshigh.com/alpha/test/includes/footer.inc") ?>

Reply With Quote
  #4  
Old July 1st, 2004, 12:40 AM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: PHP Include Bug?

If the include files are on the same server as the page code you posted, do not use fully qualified urls. What php does is interprets the include files as being on a remote server and opens the files in a seperate process. This may be causing your problem. Try one of the following things to see how the server reacts.

#1 change the .inc extensions to .php, but note that php will run those scripts in a seperate process, thus using more server resources.

or

#2

use reletive urls in the include statement for example

includes/header.inc instead of http://www.holmeshigh.com/alpha/test/includes/header.inc

although the files may reside on the same server, using a fully qualified url make php think that the script is on another server and a new procees is started to handle those scripts. Hope that helps.

Reply With Quote
  #5  
Old July 2nd, 2004, 02:26 PM
SeanFromIT SeanFromIT is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Covington, KY, US
Posts: 10 SeanFromIT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to SeanFromIT Send a message via Yahoo to SeanFromIT
RE: PHP Include Bug?

That could be it! The problem didn't start until I changed everything to exact URLs. I can't use relative URLs tho - the includes are for header/footer/nav across the entire site. I'll use server paths instead. Thanks!

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > PHP Include Bug?


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 6 hosted by Hostway