Old 20th February 2006, 21:47   #1
ville-valo91
Member
 
Join Date: Jan 2005
Posts: 53
php scripts cant find my stats

i have tried various php scripts on my host addyour.net
and all of them couldnt retrive information i know that my stream is getting out i am using my netgear router with dyn dns to mask my ip and keep it update and before you say no i can switch to no-ip my router wont alow it
ive inserted a picture to show you wat i mean thsi is jsut for 1 script but theyre all the same also here is the config snippet
code:
<?php $scdef = "x-sythe-x"; $scip = "http://x-sythe-x.blogdns.com"; $scport = "8000"; $scpass = "for me to know"; ?>

any help woudl be apreciated oh adn by the way my php host is a linux server any oyther info you need just say
ville-valo91 is offline   Reply With Quote
Old 20th February 2006, 22:44   #2
fc*uk
Moderator
 
fc*uk's Avatar
 
Join Date: Dec 2005
Location: Atlantic Beach
Posts: 8,140
are you sure your host really supports php?

I know this sounds simple, but it looks like you have set everything up properly ... so the only thing that comes to mind is php is not supported by your host.
fc*uk is offline   Reply With Quote
Old 21st February 2006, 15:38   #3
ville-valo91
Member
 
Join Date: Jan 2005
Posts: 53
well yes because my mauin host dosent so i went looknig for one if you went in the addyour.net link i gave well not link but refrence you would of seen it is a free php host


new info it seem that djspinnercee's tool will alow me to get the stats on their server but when ever i try run that same script on my own or my hosts computer it always says im offline so it has ogtto be something to do iwth my ip and port that i could open ?

Last edited by ville-valo91; 21st February 2006 at 16:13.
ville-valo91 is offline   Reply With Quote
Old 22nd February 2006, 00:32   #4
fc*uk
Moderator
 
fc*uk's Avatar
 
Join Date: Dec 2005
Location: Atlantic Beach
Posts: 8,140
yep. you have to give the php scripts your IP and port. If you do not know your IP, then try this: http://www.whatismyip.com/
fc*uk is offline   Reply With Quote
Old 22nd February 2006, 05:04   #5
activatematt
Junior Member
 
Join Date: Feb 2006
Posts: 6
Hmm, so your hosting doesent supprot PHP, but your server can?, Does the script have a error like fspoken*() or something like that?, it might have it with the GMTT script.
activatematt is offline   Reply With Quote
Old 22nd February 2006, 17:38   #6
ville-valo91
Member
 
Join Date: Jan 2005
Posts: 53
right let me explain this in full right my host is completley diffrent to my php host my website host dosent support php my php host does rigth yes i have put my username and password was put in and my ip well x-sythe-x.blogdns.com this has been found to be the problem the dynamic dns server or maybe jsut my router i have ports 8000 forwaded and auto update from rouyter to dyndns because my router netgear wirless router has that option
ville-valo91 is offline   Reply With Quote
Old 22nd February 2006, 19:10   #7
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,555
When you find a host that works -- you have to consider location [where the script is running]:

If the PHP script is running behind your router, and the DNAS is also behind the same router, you may not be able to use the public IP [in the PHP script], and it's a better idea to use the LAN IP of the DNAS anyway -- if they're both on the same PC/box, you can also use 127.0.0.1 as the IP.
djSpinnerCee is offline   Reply With Quote
Old 23rd February 2006, 15:17   #8
ville-valo91
Member
 
Join Date: Jan 2005
Posts: 53
right i am hosting the php files on a working php host and i know its owrking because i use other scripts it is all set up right everything its jsut i dont think that the php scripts are able to parse my onlnie or offline info
ville-valo91 is offline   Reply With Quote
Old 23rd February 2006, 16:06   #9
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,555
The NOTICEs and WARNINGs PHP gives will be very helpful now.

They can be "silenced" in the code -- When you're debugging, you want to see everything -- make sure that you have a statement like:

/* keep warnings from our output */
//error_reporting(E_ERROR);
error_reporting(E_ALL); // If you wanna see all...

...early enough in your PHP so that any fsockopen() or fopen() messages will be displayed.

There are many options that can be getting in your way, so realize that a stock out-of-the-box PHP install may limit the functionality of your PHP scripts for "safety" reasons, and a hosted PHP may limit PHP features to protect the host from poorly written or malicious code.

Last edited by djSpinnerCee; 23rd February 2006 at 16:43.
djSpinnerCee is offline   Reply With Quote
Old 23rd February 2006, 16:10   #10
ville-valo91
Member
 
Join Date: Jan 2005
Posts: 53
right oki i will try it on another host i have if thatt doesnt work ill post the whole zip well you were most certainly right its my php host thank you loads djspinner you are a saviour
ville-valo91 is offline   Reply With Quote
Old 23rd February 2006, 22:30   #11
ville-valo91
Member
 
Join Date: Jan 2005
Posts: 53
one last thing im gering this on one of my scrits

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in \\192.168.1.16\webfiles\files\2006-2\656601\status\radio_stats.php on line 16
this is line 16: $scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30);

what do i need to do
ville-valo91 is offline   Reply With Quote
Old 24th February 2006, 00:25   #12
ville-valo91
Member
 
Join Date: Jan 2005
Posts: 53
okay new thing is is possible to hide a fsockopen error

http://g.1asphost.com/xsythex/wmp.html the one i will have most of the time on there when the dnas is not running
ville-valo91 is offline   Reply With Quote
Old 24th February 2006, 01:46   #13
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,555
Warning: fsockopen(): unable to connect to 82.31.7.75:8000 in \\192.168.1.16\webfiles\files\2006-2\656601\status\lol.php on line 25

Why?

Are 192.168.1.16:8000 and 82.31.7.75:8000 the "same" effective box? -- If the script server and the DNAS are on the same LAN or same PC, use LAN IPs only -- don't depend on the router to port forward back in correctly.
djSpinnerCee is offline   Reply With Quote
Old 24th February 2006, 07:02   #14
ville-valo91
Member
 
Join Date: Jan 2005
Posts: 53
no hats gone im using a difrent scrit but whenever the dnas is offine i get Warning: fsockopen(): unable to connect to 82.31.7.75:8000 in \\192.168.1.16\webfiles\files\2006-2\656601\status\lol.php on line 25
this is only when the dnas has been killed and btw its not hosted from my computer
ville-valo91 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

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