RF Generation.  The Classic and Modern Gaming Databases.RF Generation.  The Classic and Modern Gaming Databases.

New on the Blogs
Hot Community Blog Entries
Nielsen's Favorites on Channel 4
RF Generation Message Board Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2025, 07:36:26 AM
Home Help Search Calendar Member Map Arcade Login Register
News: RF Generation: Where we're rolling around at the speed of sound.

RF Generation Message Board | Other | Idle Chatter | hey 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: hey  (Read 2514 times)
SFS
I eated the purple berries
Neo Geo AES
**
Russian Federation
Posts: 640


 Stats
hey
« on: August 29, 2006, 09:09:07 PM »

I'm reposing this for a guy on another foums.

Well I am having some problems. I moved to a new server and they are running PHP5. I don't a single damn thing about PHP5 and I barely was able to stay afloat with PHP4. So I was wondering if anyone could help me with this: Quote:

$scfp fsockopen("38.96.148.32"9980, &$errno, &$errstr30); 
if(!
$scfp) { 
$scsuccs=1
echo
''.$scdef.' is Offline'

if(
$scsuccs!=1){ 
fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n"); 
while(!
feof($scfp)) { 
$p


So after the script runs this is what I get Quote:
Warning: fsockopen() [function.fsockopen]: unable to connect to 38.96.148.32:9980 (Connection timed out) in stats.php on line 25



Any ideas? Anyone? Please?
Any help would, er.. help.
« Last Edit: August 29, 2006, 11:01:42 PM by TraderJake » Logged

"It rains acid, one day the earth will cry from a stone
And you'll be lookin' at the world livin' inside of a dome
Comperized humanity living inside of a clone
This is the place where the unknown is living and real
Worm went to planet X and the seventh seal"

Immortal Technique
The Metamorphosing Leon
Laying on the green leaf, left and abandoned...
Donor
*****
United States
Posts: 9496


WWW Stats
« Reply #1 on: August 29, 2006, 10:47:57 PM »

Wow.
Logged

When shall his new form be revealed?
TraderJake
Retired Lord of the Forum
Director
*****
United States
Posts: 5238


WWW Stats
« Reply #2 on: August 29, 2006, 10:52:25 PM »

No Clue, this site runs on PHP 4, and it looks as though he is using a socket connection, which is something we do not use. The warning is saying that the function is timing out, which sounds like a connection error. I am sure you've seen Warnings on this site periodically when the site can't connect to the mySQL server. If it was a fatal error it wouldn't have done much of anything other than spit out a parse error.

Of course, PHP.net is down right now. Which makes this harder to research. I'll get back to you.
 
« Last Edit: August 29, 2006, 11:00:38 PM by TraderJake » Logged

Hello World.
Hydrobond
+5 Insightful
PlayStation
****
United States
Posts: 2728


WWW Stats
« Reply #3 on: August 30, 2006, 05:58:44 AM »

My first thought is to make sure the server he is trying to connect to at 38.96.148.32 has port 9980 open.

Also, a simple google search shows the syntax as $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);

notice there are no '&' in the arguments $errno and $errstr.  I don't know if that makes a difference, as I know absolutely nothing about Perl, but it would in C so I thought I would mention it. 
« Last Edit: August 30, 2006, 03:56:04 PM by Hydrobond » Logged

I never proofread before hitting the submit button, this is why every single one of my posts has been edited in the first minute after being submitted.
The Metamorphosing Leon
Laying on the green leaf, left and abandoned...
Donor
*****
United States
Posts: 9496


WWW Stats
« Reply #4 on: August 30, 2006, 01:24:43 PM »

Just wow.
Logged

When shall his new form be revealed?
Hydrobond
+5 Insightful
PlayStation
****
United States
Posts: 2728


WWW Stats
« Reply #5 on: August 30, 2006, 03:57:44 PM »

Can you tell us what he is trying to do?

I'm kinda curious as to why he would be trying to establish a connection (socket) on that port if he is running a web server.
« Last Edit: August 30, 2006, 07:56:12 PM by Hydrobond » Logged

I never proofread before hitting the submit button, this is why every single one of my posts has been edited in the first minute after being submitted.
bum-man
RFG Friend
*****
United States
Posts: 1521


 Stats
« Reply #6 on: August 30, 2006, 07:46:17 PM »

My first thought is to make sure the server he is trying to connect to at 38.96.148.32 has port 9980 open.

Also, a simple google search shows the syntax as $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);

notice there are no '&' in the arguments $errno and $errstr.  I don't know if that makes a difference, as I know absolutely nothing about Perl, but it would in C so I thought I would mention it. 
I think that PHP5 does not require the & to signify that the variable is being passed by reference (rather than by value), so the code should work the same either way.
Logged

[img width=468 height=60]http://www.rfgeneration.com/PHP/banners.php?banner=collectionstats;user=bum-man[/img]
I need more room for all my $#!%
bum-man
RFG Friend
*****
United States
Posts: 1521


 Stats
« Reply #7 on: August 31, 2006, 12:18:35 AM »

That PHP seemed to work OK for me on a host with PHP 5.1.2, well it tried to connect but got an unauthorized error because I just made up a password.  Based on his error and mine my guess is this is not an issue of PHP4 vs PHP5.  There is a possibility that the new host the guy is using doesn't support outbound socket connections.

FYI, For those wondering this script is used to connect to a internet radio station site (ShoutCast server) and get the recent play list.
Logged

[img width=468 height=60]http://www.rfgeneration.com/PHP/banners.php?banner=collectionstats;user=bum-man[/img]
I need more room for all my $#!%
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Simple Audio Video Embedder

RF Generation Theme derived from YabbGrey By Nesianstyles | Buttons by A.M.A
Valid XHTML 1.0! Valid CSS!
Page created in 0.135 seconds with 23 queries.
Site content Copyright © rfgeneration.com unless otherwise noted. Oh, and keep it on channel three.