Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004

    Red face Unanswered: Problem uploading image


    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!!

  2. #2
    Join Date
    Jan 2004
    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:

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts