Dynadot โ€” .com Transfer

Slight Poll Problem

SpaceshipSpaceship
Watch

D@Z

Established Member
Impact
0
I just installed a free poll script on my site and it's got a strange error. It says;

Warning: fread(): Length parameter must be greater than 0. in /home2/dazport/public_html/poll/poll.php on line 50

I checked line 50 on poll/poll.php and it has;
PHP:
$contents = fread($ip, filesize($ipfile));

The URL to the page so you can see for yourself is http://www.dazportfolio.com/poll.php

If anyone knows the problem and could tell me, it would be a great help.

Thanks a lot!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
wait I see url to page see for error
 
0
•••
0
•••
Seems to be working...
 
0
•••
this error is not in my mind sorry
 
0
•••
the error doesnt show once you have voted but before, it has the error.
 
0
•••
i belive that error occurs when a file is returned to be 0 bytes long.

try these
1. chmod the file your reading to 777
2. check the path exists (logging in via ssh and trying to open it that will will help)
3. edit the file manually and put some text in there to see if i changes
4.
 
0
•••
ah it doesnt matter, thanks anyway folks for trying to help. much appretiated. :)
 
0
•••
no probs, you know what the problem was?
 
0
•••
means the doesnt have nothing.

replce $contents = fread($ip, filesize($ipfile)); with:

if(filesize($ipfile)>0)
{
$contents = fread($ip, filesize($ipfile));
}

this will prevent this error :)
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back