If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Problem uploading image

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-15-04, 01:51
bogdani bogdani is offline
Registered User
 
Join Date: Jan 2004
Posts: 1
Red face Problem uploading image

Hello,

My php script works fine on my local server, on a linux remote server but on a freebsd server doesn't work - it generates the following error:

Warning: fread(): supplied argument is not a valid stream resource in /usr/home/admin/sites/my/_admin/do_upload.php on line 4


Line 4 in code is: $data2 = addslashes(fread(fopen($form_data2, "a"), filesize($form_data2)));

The scripts uploads an image into database (the field for picture is LONGBLOB).

Thanks for your help!!
Reply With Quote
  #2 (permalink)  
Old 01-15-04, 22:41
donsimon donsimon is offline
Registered User
 
Join Date: Jan 2004
Posts: 24
This isn't a MySQL error, it's probably because you don't have something setup with php on the box correctly.

Some of the settings in the php.ini might not be set correctly like:
upload_tmp_dir
upload_max_filesize

I would download one of the free image uploaders and just see if you can even get it to work first, but I bet something is just configured wrong.

Donny
__________________
http://www.phpscripts.com/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On