On Mon, Mar 30, 2009 at 1:11 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk>wrote:

> On Mon, 2009-03-30 at 11:44 -0500, Terion Miller wrote:
> > I have this script that is no longer working to upload files, it goes
> thru
> > the motions and says the file is uploaded but then there is NO file in
> the
> > ArtWork folder....
> >
> > any ideas?
> >     if ($_FILES) {
> >         for ($x=0; $x < 15; $x++) {
> >             if (is_uploaded_file ($_FILES['Artwork']['tmp_name'][$x])) {
> >                 $ImageExt = strtolower(end(explode('.',
> > $_FILES['Artwork']['name'][$x])));
> >                 $ImageName = $_FILES['Artwork']['name'][$x];
> >                 $ImageSize = $_FILES['Artwork']['size'][$x];
> >                 list($width, $height, $type, $attr) =
> > getimagesize($_FILES['Artwork']['tmp_name'][$x]);
> >
> >                 $sql = "INSERT INTO images (ImageDate, ArtID, AdminID,
> > ImageName, ImageType, ImageType2, ImageSize, ImageHeight, ";
> >                 $sql .= "ImageWidth, ImageAttr, Notes) VALUES (NOW(),
> > '$ArtID', '$AdminID', '$ImageName', '$ImageExt',";
> >                 $sql .= " '$type', '$ImageSize', '$height', '$width',
> > '$attr', '$Notes2')";
> >                 mysql_query ($sql);
> >                 $ImageID = mysql_insert_id();
> >
> >                 $uploadfile = "../../Artwork/". $ArtID ."_". $ImageID
> .".".
> > $ImageExt;
> >                 move_uploaded_file($_FILES['Artwork']['tmp_name'][$x],
> > $uploadfile);
> >                 chmod($uploadfile, 0666);
> >             }
> >         }
> >     }
> >
> > Thanks
> > Terion
> >
> > Happy Freecycling
> > Free the List !!
> > www.freecycle.org
> > Over Moderation of Freecycle List Prevents Post Timeliness.
> > Report Moderator Abuse Here:
> > http://www.freecycle.org/faq/faq/contact-info
> > Or Email Your Complaint to:
> > f...@freecycle.org or i...@freecycle.org
> > ------------------------------------------------
> > Twitter?
> > http://twitter.com/terionmiller
> > ------------------------------------------------
> > Facebook:
> > <a href="http://www.facebook.com/people/Terion-Miller/1542024891";
> > title="Terion Miller's Facebook profile" target=_TOP><img src="
> > http://badge.facebook.com/badge/1542024891.237.919247960.png"; border=0
> > alt="Terion Miller's Facebook profile"></a>
>
> Well, there are many reasons this could fail, but you need to diagnose
> what is the actual problem. First, is it no longer working at all, or
> after a certain number of files are uploaded? I see you are trying to
> upload up to 15 files this way, are you sure that the combined file size
> is not greater than what your PHP setup can handle for a single post?
>
> Are the database inserts being performed correctly? If not, then PHP may
> be having problems seeing the uploaded files. Are there any error
> messages from this piece of code? Does the location to where you are
> attempting to move the files exist, and if so, does it have the correct
> permissions? Is there enough space on the drive/partition you are trying
> to move the files to?
>
> Lastly, the snippet of code you gave does not show where $ArtID was
> defined. Can you print out the query to see what it is actually doing?
>
>
> Ash
> www.ashleysheridan.co.uk
>
> Sorry guys I often forget to make sure I have clicked reply to ALL..and end
up replying to just one of you:
Thanks for the suggestions, the db inserts are working, all the info goes
in, the only thing not working is there is no file in the Artwork file
directory where the image is supposed to get moved.
I will make sure the permissions are correct on the directory perhaps the
hosting changed them? I thought the chmod command in the script would insure
that the directory is writable.- Show quoted text -





On Mon, Mar 30, 2009 at 12:09 PM, Bastien Koert <phps...@gmail.com> wrote:

>
>
> 2009/3/30 Terion Miller <webdev.ter...@gmail.com>
>
>> I have this script that is no longer working to upload files, it goes thru
>> the motions and says the file is uploaded but then there is NO file in the
>> ArtWork folder....
>>
>> any ideas?
>>    if ($_FILES) {
>>        for ($x=0; $x < 15; $x++) {
>>            if (is_uploaded_file ($_FILES['Artwork']['tmp_name'][$x])) {
>>                $ImageExt = strtolower(end(explode('.',
>> $_FILES['Artwork']['name'][$x])));
>>                $ImageName = $_FILES['Artwork']['name'][$x];
>>                $ImageSize = $_FILES['Artwork']['size'][$x];
>>                list($width, $height, $type, $attr) =
>> getimagesize($_FILES['Artwork']['tmp_name'][$x]);
>>
>>                $sql = "INSERT INTO images (ImageDate, ArtID, AdminID,
>> ImageName, ImageType, ImageType2, ImageSize, ImageHeight, ";
>>                $sql .= "ImageWidth, ImageAttr, Notes) VALUES (NOW(),
>> '$ArtID', '$AdminID', '$ImageName', '$ImageExt',";
>>                $sql .= " '$type', '$ImageSize', '$height', '$width',
>> '$attr', '$Notes2')";
>>                mysql_query ($sql);
>>                $ImageID = mysql_insert_id();
>>
>>                $uploadfile = "../../Artwork/". $ArtID ."_". $ImageID .".".
>> $ImageExt;
>>                move_uploaded_file($_FILES['Artwork']['tmp_name'][$x],
>> $uploadfile);
>>                chmod($uploadfile, 0666);
>>            }
>>        }
>>    }
>>
>> Thanks
>> Terion
>>
>> Happy Freecycling
>> Free the List !!
>> www.freecycle.org
>> Over Moderation of Freecycle List Prevents Post Timeliness.
>> Report Moderator Abuse Here:
>> http://www.freecycle.org/faq/faq/contact-info
>> Or Email Your Complaint to:
>> f...@freecycle.org or i...@freecycle.org
>> ------------------------------------------------
>> Twitter?
>> http://twitter.com/terionmiller
>> ------------------------------------------------
>> Facebook:
>> <a href="http://www.facebook.com/people/Terion-Miller/1542024891";
>> title="Terion Miller's Facebook profile" target=_TOP><img src="
>> http://badge.facebook.com/badge/1542024891.237.919247960.png"; border=0
>> alt="Terion Miller's Facebook profile"></a>
>>
>
> Perchance did the permissions change on the folder or has the ini changed
> to limit the uploaded data? Is the folder full to disk capacity of the OS?
>
> --
>
> Bastien
>
> Cat, the other other white meat
>

 Reply

Forward

Bastien is not available to chat





Your message has been sent.



Terion Miller to Bastien
show details 12:45 PM (0 minutes ago)
Reply

And could it be the Aurigma Image uploader, it is supposed to be using the
iuembed.js which is there
and I am looking at it .... I've actually been having tons of problems with
image uploads, any suggestions on easier methods to use?- Show quoted text -

Reply via email to