MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 8th, 2004, 06:52 PM
Pozz Pozz is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 3 Pozz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
BLOBs

I've been after a bit of help regarding BLOBs and I found a great article on here explaining how to load files from a client to a server and store the files in a databse using BLOBs, this is exactly what I need.

I'm having a slight problem though, when it comes to executing the script that uploads the file from the client I'm receiving an error messahe which reads:
Warning: fread(): supplied argument is not a valid stream resource in c:\program files\easyphp1-7\www\upload.php on line 17

the line of code that's causing this error is as follows:
$fileContent = fread($fileHandle, $fileUpload_size);

To understand more I'll show you the surrounding code:
$fileHandle = fopen($fileUpload, "r");

$fileContent = fread($fileHandle, $fileUpload_size);

$fileUpload is a global variable that contains a path to the file I wish to upload.

The problem seems to be that it doesn't like the parameters used in the fread() function but thease are exactly how they were specified in the article from this site.

I've tried changing the fopen paramaters, the fread parameters, the php.ini file but no luck. Can someone please help as I'm going round the bend here.

Thanks in advance for any help.

Pozz

Reply With Quote
  #2  
Old December 9th, 2004, 03:42 AM
oyejorge oyejorge is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 25 oyejorge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 13 sec
Reputation Power: 0
The only problem I could think of would be with the $fileHandle parameter, but it sounds like you've already looked into that.
Have you gotten fread() to work in other scenarios?

Also, this seems to be more of a PHP question, you might try posting it in the other forum

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > BLOBs


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway