14
« on: March 31, 2012, 09:40:27 PM »
I don't know PHP so I'm going to ask you guys to help me figure this stuff out. :(
The error is:
Warning: move_uploaded_file(/home/a6353100/public_html/src/1333247592447.tmp) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/a6353100/public_html/imgboard.php on line 352
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpqKMU7u' to '/home/a6353100/public_html/src/1333247592447.tmp' in /home/a6353100/public_html/imgboard.php on line 352
Line 352 is:
move_uploaded_file($upfile, $dest);
and the entire code that handles uploading files (This is for an imageboard) is:
if($upfile&&file_exists($upfile)){
$dest = $path.$tim.'.tmp';
move_uploaded_file($upfile, $dest);
//if an error in up, it changes to down (what?)
//copy($upfile, $dest);
$upfile_name = CleanStr($upfile_name);
if(!is_file($dest)) error(S_UPFAIL,$dest);
$size = getimagesize($dest);
if(!is_array($size)) error(S_NOREC,$dest);
$md5 = md5_of_file($dest);
foreach($badfile as $value){if(ereg("^$value",$md5)){
error(S_SAMEPIC,$dest); //Refuse this image
}}
chmod($dest,0666);
$W = $size[0];
$H = $size[1];
$fsize = filesize($dest);
if($fsize>MAX_KB * 1024) error(S_TOOBIG,$dest);
switch ($size[2]) {
case 1 : $ext=".gif";break;
case 2 : $ext=".jpg";break;
case 3 : $ext=".png";break;
case 4 : $ext=".swf";break;
case 5 : $ext=".psd";break;
case 6 : $ext=".bmp";break;
case 13 : $ext=".swf";break;
default : $ext=".xxx";break;
}
It seems to be complaining about not being able transfer to a directory that's not there but I don't see where it's trying to go to.