file not uploaded to the wanted location

See all posts See thread Reply

Re: file not uploaded to the wanted location new!
by colin, 18 years ago
Sometimes, PHP (Apache) can be installed in a chroot environment. Safe mode can also be used.

You're right about the open_base_dir although in any good setup, open_base_dir will actually include /tmp. If it is an open_base_dir issue, then there is a bit of code in the class that can be uncommented to use move_uploaded_file()Reply
Re: file not uploaded to the wanted location new!
by Tom, 18 years ago
I uncommented the move_uploaded_file code and still got exactly the same result.

Here's a link to PHPinfo(): http://www.alphaselect.ca/locations/phpi.php

If you have any more suggestions that would be awesome.

Thanks,

TomReply
Re: file not uploaded to the wanted location new!
by colin, 18 years ago
Try to comment the following lines:
$this->log .= '- ' . _("no image processing wanted") . '
'; if (!$this->no_upload_check) { $result = is_uploaded_file($this->file_src_pathname); } else { $result = TRUE; } if ($result) { $result = file_exists($this->file_src_pathname); if ($result) { $result = copy($this->file_src_pathname, $this->file_dst_pathname); if (!$result) { $this->processed = false; $this->error = _("Error copying file on the server. Copy failed"); } } else { $this->processed = false; $this->error = _("Error copying file on the server. Missing source file"); } } else { $this->processed = false; $this->error = _("Error copying file on the server. Incorrect source file"); }

and uncomment the following:
//$result = move_uploaded_file($this->file_src_pathname, $this->file_dst_pathname);
//if (!$result) {
//    $this->processed = false;
//    $this->error = _("Error copying file on the server");
//}

Then try uploading a file which is not an image (or an image, but with no image processing), and tell me if it works.Reply