NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Slight Poll Problem

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 04-05-2005, 08:39 AM THREAD STARTER               #1 (permalink)
D@Z
NamePros Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 165
D@Z is on a distinguished road
 



Slight Poll Problem


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

Quote:
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;
????: NamePros.com http://www.namepros.com/programming/80409-slight-poll-problem.html
PHP Code:
$contents fread($ipfilesize($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!
D@Z is offline  
Old 04-05-2005, 09:46 AM   #2 (permalink)
Senior Member
Join Date: Apr 2005
Posts: 1,023
bhyraj is an unknown quantity at this point
 



wait I see url to page see for error
bhyraj is offline  
Old 04-05-2005, 09:50 AM THREAD STARTER               #3 (permalink)
D@Z
NamePros Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 165
D@Z is on a distinguished road
 



the error is on http://dazportfolio.com/poll/poll.php
D@Z is offline  
Old 04-05-2005, 10:18 AM   #4 (permalink)
NamePros Regular
Join Date: Feb 2004
Location: Student @ UConn
Posts: 411
gamex has a spectacular aura aboutgamex has a spectacular aura about
 



Seems to be working...
__________________
Joe
gamex is offline  
Old 04-05-2005, 10:25 AM   #5 (permalink)
Senior Member
Join Date: Apr 2005
Posts: 1,023
bhyraj is an unknown quantity at this point
 



this error is not in my mind sorry
bhyraj is offline  
Old 04-05-2005, 10:28 AM THREAD STARTER               #6 (permalink)
D@Z
NamePros Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 165
D@Z is on a distinguished road
 



the error doesnt show once you have voted but before, it has the error.
D@Z is offline  
Old 04-05-2005, 11:08 AM   #7 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
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.
adam_uk is offline  
Old 04-05-2005, 03:25 PM THREAD STARTER               #8 (permalink)
D@Z
NamePros Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 165
D@Z is on a distinguished road
 



ah it doesnt matter, thanks anyway folks for trying to help. much appretiated.
D@Z is offline  
Old 04-06-2005, 06:13 AM   #9 (permalink)
Account Closed
 
Mystic's Avatar
Join Date: Feb 2005
Location: England
Posts: 1,169
Mystic is just really niceMystic is just really niceMystic is just really niceMystic is just really nice
 



no probs, you know what the problem was?
Mystic is offline  
Old 04-06-2005, 06:08 PM   #10 (permalink)
Account Closed
 
axilant's Avatar
Join Date: May 2004
Location: /etc/passwd
Posts: 2,178
axilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to behold
 

Member of the Month
July 2005

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
axilant is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why We Didn't Have A Drug Problem dgridley The Break Room 0 03-13-2005 08:26 AM
Java Problem Emilman Programming 5 01-27-2004 01:21 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:21 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger