class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
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
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()
Here's a link to PHPinfo(): http://www.alphaselect.ca/locations/phpi.php
If you have any more suggestions that would be awesome.
Thanks,
Tom
$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.