PHP and port 80

Discussion in 'HTML / PHP / JavaScript / CSS' started by Bruce, Mar 5, 2004.

  1. Bruce

    Bruce DiscountASP.NET Staff

    have you tried pull stuff from other site? Could it be that the site you are trying to pull information is downed?

    we do not block off port 80 going out from our server.


    quote:Originally posted by georgiahikes

    Hi,

    I am using an application called hamweather written in php, and it seems to only be working intermittently. The failure occurrs when a php script attempts to retrieve data via http (port 80) from the national weather service. The error indicates that the script was unable to open a socket to the destination server on port 80.

    I've noticed that the script tends to work during off hours, mostly late at night. This leads me to believe that this is a condition that is caused by or that is related to a state on the server.

    An exerpt from the debug of the page follows:

    In fetch_forecast: max_age = 30
    prefix=/pub/data/observations/metar/decoded/KPDK|/weather/current/KPDK
    URL: weather.noaa.gov/pub/data/observations/metar/decoded/KPDK.TXT
    Checking to see if cache_file_1('./cache/metar-kpdk.html') exists and age less than 30
    cache_file: ./cache/metar-kpdk.html doesnt exist
    ... Cache File 1 doesnt exist or is expired
    Fetching data from url /pub/data/observations/metar/decoded/KPDK.TXT
    Opening socket to weather.noaa.gov:80...timeout=10
    Error opening socket The operation completed successfully. (0)
    HTTP fetched
    ...Failure

    Likewise, you can see the entire debug output at
    http://www.georgiahikes.com/weather/weather.php?config=&forecast=zandh&pands=atlanta,+GA&debug=on

    Any thoughts?
    Thanks,
    -Brian
    georgiahikes.com




    </blockquote id="quote"></font id="quote">
     
  2. Hi,

    I am using an application called hamweather written in php, and it seems to only be working intermittently. The failure occurrs when a php script attempts to retrieve data via http (port 80) from the national weather service. The error indicates that the script was unable to open a socket to the destination server on port 80.

    I've noticed that the script tends to work during off hours, mostly late at night. This leads me to believe that this is a condition that is caused by or that is related to a state on the server.

    An exerpt from the debug of the page follows:

    In fetch_forecast: max_age = 30
    prefix=/pub/data/observations/metar/decoded/KPDK|/weather/current/KPDK
    URL: weather.noaa.gov/pub/data/observations/metar/decoded/KPDK.TXT
    Checking to see if cache_file_1('./cache/metar-kpdk.html') exists and age less than 30
    cache_file: ./cache/metar-kpdk.html doesnt exist
    ... Cache File 1 doesnt exist or is expired
    Fetching data from url /pub/data/observations/metar/decoded/KPDK.TXT
    Opening socket to weather.noaa.gov:80...timeout=10
    Error opening socket The operation completed successfully. (0)
    HTTP fetched
    ...Failure

    Likewise, you can see the entire debug output at
    http://www.georgiahikes.com/weather/weather.php?config=&forecast=zandh&pands=atlanta,+GA&debug=on

    Any thoughts?
    Thanks,
    -Brian
    georgiahikes.com
     
  3. quote:Originally posted by bruce

    have you tried pull stuff from other site? Could it be that the site you are trying to pull information is downed?

    we do not block off port 80 going out from our server.


    </blockquote id="quote"></font id="quote">
    Thanks Bruce for the prompt response.
    Yeah I thought that was the issue too, but I'm able to check the remote site and verify that it is up and working as it should be

    http://weather.noaa.gov/pub/data/observations/metar/decoded/KPDK.TXT
    (the url that the app hits for data)

    Any other thoughts? Could another user possibly be locking that port somehow - Since it seems to be an intermittant issue? Is there any way to check this, or possibly move the site to another server?

    -Brian
     
  4. Nevermind, I got it working with cgi. Apparently a couple of the php modules that the app needs are not installed. Thanks for your help.

    -Brian
     

Share This Page