Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-07-2005, 03:45 PM   #1 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
Interesting error

So I'm using the Madquery library to pull information about my Counter-Strike server and display it on my clans website. I haven't touched anything on the website as far as HTML and PHP go, but all of a sudden I'm getting this error


PHP Code:
Warningfread(): Length parameter must be greater than 0. in /home/av1/domains/avclan.net/public_html/includes/madquery.php 
It doesn't give me a line number or anything, and it's a huge library. Any ideas as to why this would be happening now, and as to how I might find out how to fix it?
__________________
Current Project
Redline is offline   Reply With Quote
Old 02-07-2005, 04:02 PM   #2 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
This is also not a constant error either, 1/10 loads (maybe less) the error doesn't show up
__________________
Current Project
Redline is offline   Reply With Quote
Old 02-07-2005, 04:04 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,486
sde is on a distinguished road
i've got that before, and i'm trying to remember what it was.

the line number is probably there, just not printing to the screen because of some html or something. view source to see if you can see a line number in there.

most likely, you just need to put an '@' sign in front of an fread function so you will supress the error. ( i think )
__________________
Mike
sde is offline   Reply With Quote
Old 02-07-2005, 04:06 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,486
sde is on a distinguished road
Quote:
b>Warning</b>: fread(): Length parameter must be greater than 0. in <b>/home/av1/domains/avclan.net/public_html/includes/madquery.php</b> on line <b>333</b>
.
__________________
Mike
sde is offline   Reply With Quote
Old 02-08-2005, 12:46 AM   #5 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
Nice, the @ fixed it. What exactly is it doing?
__________________
Current Project
Redline is offline   Reply With Quote
Old 02-08-2005, 05:25 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,486
sde is on a distinguished road
that script creates a socket connection with the server. i may be wrong, but i believe you may get that error when your server is empty. it tries to send the request and read the response, but sometimes there is no response.

why it happens only sometimes, i don't know. i had to do that to patch up the ocs status too.

i thought your copy came from me which means it would have been fixed .. did you get a new copy of madquery from somewhere else?
__________________
Mike
sde is offline   Reply With Quote
Old 02-08-2005, 11:25 AM   #7 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
Umm, possibly? I don't know lol, that was a looong time ago it seems
__________________
Current Project
Redline is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is this error? john_tran Standard C, C++ 4 10-20-2004 08:30 PM
{perl} HTTP Error Code Response gty All Other Coding Languages 2 09-08-2004 11:09 AM
C++ compile error Amaranthine Standard C, C++ 5 05-05-2004 08:23 PM
Error Ilya020 Standard C, C++ 7 07-10-2003 07:02 AM


All times are GMT -8. The time now is 04:05 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting