Error in sa-mp-status.php
#1

hi i have sa-mp-status.php and i am getting this error.
Код:
Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/gtasais/public_html/sa-mp-status.php on line 40

Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/gtasais/public_html/sa-mp-status.php on line 42

Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/gtasais/public_html/sa-mp-status.php on line 44
And here is my sa-mp-status.php in Pastebin
http://pastebin.com/f7d421d0c
Any idear wuy this is happining?
Reply
#2

Somone?
Reply
#3

Your server is offline or isn't port forwarded.

You need to add
Код:
	$conInfo=stream_get_meta_data($fp);
	if($conInfo['timed_out']){
		exit("Server Offline");
	}
before $is_passworded.

The '$length' parameter in fread has to be bigger than zero.
Since your server is offline it doesn't receive a size for $strlen so it's set to zero.
Reply
#4

That can't be. I have boath port open and he is not Offline.
Reply
#5


For me your server IS offline.

When i remove
Код:
$conInfo=stream_get_meta_data($fp);
if($conInfo['timed_out']){
	exit("Server Offline");
}
from my server status script and I turn my server off, I get the same error
Код:
Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/admin/forum/serverstatus.php on line 40

Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/admin/forum/serverstatus.php on line 42

Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/admin/forum/serverstatus.php on line 44
So as I previously stated:
Quote:
Originally Posted by Delused
Your server is offline or isn't port forwarded.

You need to add
Код:
	$conInfo=stream_get_meta_data($fp);
	if($conInfo['timed_out']){
		exit("Server Offline");
	}
before $is_passworded.

The '$length' parameter in fread has to be bigger than zero.
Since your server is offline it doesn't receive a size for $strlen so it's set to zero.
Reply
#6

ok it was somthang wrong with my port 7778. can you test for me 212.30.223.9:7786 ?
Reply
#7

Quote:
Originally Posted by djdanni
ok it was somthang wrong with my port 7778. can you test for me 212.30.223.9:7786 ?
it up for me
Reply
#8

This is Strance. Can it be that port 7778 is broken or can port's broke?
Reply
#9

Ports can't break.
However if something is already using that port it wont work.
Reply
#10

How can that be? It woork for 2 day's ago
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)