Jump to content


Photo

image upload script stopped working


  • Please log in to reply
4 replies to this topic

#1 RichE

RichE
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 13 October 2006 - 02:54 AM

Hello, I have a weird problem. I have a script that uploads and image to a specified directory as well as a few other things, but a month ago it stopped working! No changes have been made to the file, but it doesn't work anymore! It may work once and a while, but most of the time it will not upload.

The upload script is in a /upload directory and is uploading to /images/reviews
Here is my code (filep is my upload form box name):
$folder = "../images/reviews/";
move_uploaded_file($_FILES["filep"]["tmp_name"] , "$folder".$_FILES["filep"]["name"]);
chmod("$folder".$_FILES["filep"]["name"],0644);
echo "<p align=center>File ".$_FILES["filep"]["name"]." uploaded.<br />";

I did try copy instead of move_uploaded_file, but it still did not work. This time I added error outputs, but nothing happened.:
$folder = "../images/reviews/";
copy ($_FILES['filep']['tmp_name'] , "$folder".$_FILES['filep']['name']) or die ("Could not copy");
chmod("$folder".$_FILES["filep"]["name"],0644);
echo "<p align=center>File ".$_FILES["filep"]["name"]." uploaded.<br />";

Can anyone see something wrong? It should work because it worked for MONTHS before it stopped working!

Thank you for your time.

#2 RichE

RichE
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 13 October 2006 - 09:40 PM

Even if someone can confirm that the code is OK that would be great. I just need some feedback, ANY feedback.

Thanks

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 14 October 2006 - 04:03 AM

It's the form show us the form.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 RichE

RichE
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 15 October 2006 - 01:31 PM

Here is the form.
<form action=reviewupload.php method=post enctype="multipart/form-data">
<table border="0" cellspacing="0" align=center cellpadding="3" bordercolor="#cccccc">
<tr>
<td>Title:</td>
<td><input type="text" name="Title" size=30 maxlength="200"></td>
</tr>
<tr>
<td>Release Date:</td>
<td><input type="text" name="Release_Date" size=30 maxlength="35"></td>
</tr>
<tr>
<td>Rating:</td>
<td><input type="text" name="Rating" size=30 maxlength="10"></td>
</tr>
<tr>
<td>Runtime:</td>
<td><input type="text" name="Runtime" size=30 maxlength="3"></td>
</tr>
<tr>
<td>Director:</td>
<td><input type="text" name="Director" size=30></td>
</tr>
<tr>
<td>Writer:</td>
<td><input type="text" name="Writer" size=30></td>
</tr>
<tr>
<td>Studio:</td>
<td><input type="text" name="Studio" size=30 maxlength="100"></td>
</tr>
<tr>
<td>Staring:</td>
<td><input type="text" name="Staring" size=30></td>
</tr>
<tr>
<td>Reviewer:</td>
<td><input type="text" name="Reviewer" size=30 maxlength="10"></td>
</tr>
<tr>
<td>Picture:</td>
<td><input type="file" name="filep" size=30></td>
</tr>
<tr>
<td>Description:</td>
<td><textarea cols="30" rows="7" name="Description"></textarea>
</td>
</tr>
<tr>
<td>Final Comments:</td>
<td><textarea cols="30" rows="7" name="Final_Comments"></textarea>
</td>
</tr>
<tr>
<td>Rating:</td>
<td><input type="text" name="Rating" size=30 maxlength="3"></td>
</tr>
<tr>
<td colspan=2><p align=center>
<input type=submit name=action value="Load">
</td>
</tr>
</table>
</form>

Thanks!

#5 RichE

RichE
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 17 October 2006 - 05:14 PM

No one can spot anything wrong?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users