Old 2nd March 2007, 03:03   #1
JohnnyGnote
Junior Member
 
JohnnyGnote's Avatar
 
Join Date: Mar 2006
Location: Durango CO
Posts: 24
Problem With Onine Offline scripts

Howdy People,

I've was running an online offline script, everything was fine and the online image was working great. My servers went offline just recently so I decided to check on the offline part of the script and this is what I get.

***********************************************************
Warning: fsockopen() [function.fsockopen]: unable to connect to coloradofreeradio.kicks-ass.net:8003 in /home/www/coloradofreeradio.com/OnlineOffline/status.php on line 16
***********************************************************
Along with another similar error.

I thought it may be the script so I changed scripts and the same thing happened.

I'm using DynDNS to keep my IP address updated for my servers so I don't have to go in and change everything every time I shut down my router.

My SCXML is running fine I have it in an iframe. Any ideas or thoughts about this would be appreciated,

Thanks

JohnnyGnote is offline   Reply With Quote
Old 2nd March 2007, 03:34   #2
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,511
It's just a warning, sent because the server could not be found -- your script should continue and handle this possiblity, so you just want to have PHP not display warnings (destroying the script output):

/* keep warnings from our output */
error_reporting(E_ERROR);


Use this early in the script -- (line 1 would be a good place) -- this tells PHP to only interrupt the script output for FATAL errors (errors that halt script execution anyway).

Obviously, you should use this with all production code (those warnings expose the underlying host filesystem in a bad way) -- and comment it out while debugging.
djSpinnerCee is offline   Reply With Quote
Old 2nd March 2007, 06:45   #3
JohnnyGnote
Junior Member
 
JohnnyGnote's Avatar
 
Join Date: Mar 2006
Location: Durango CO
Posts: 24
Excellent, Thanks DJS, I'll look in to it tommorrow, and add the lines to the script. much appreciation.

JG

JohnnyGnote is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump