hi there
i just got an email from a company that i wrote a custom file upload script for 3 years ago, that the uploads didnt work anymore (they have, at least until june - i have no idea how much they used it)... here is the code:
<?php
//...
if (!copy($newpic, $path . "deco/start/" . $newFilename)) {
print "<div class=\"error\">" . $path . "deco/start/" . $newFilename . " could not be saved!</div>";
}
else {
@unlink($newpic);
print "<div class=\"error\">" . $newPic . " could not be deleted!</div>";
}
//...
?>
here is the output:
Warning: copy(): open_basedir restriction in effect. File(/tmp/php0QqtRq) is not within the allowed path(s): (/home/oo002vfr) in /home/oo002vfr/www/home/admin/index.php on line 41
../deco/start/1100885795_sid.jpg could not be saved!
here is a part of the phpInfo php-core section:
Directive - Local Value - Master Value
max_execution_time - 30 - 30
max_input_time - 60 - 60
open_basedir - /home/oo002vfr - no value
post_max_size - 8M - 8M
register_globals - On - On
safe_mode - Off - Off
safe_mode_exec_dir - no value - no value
safe_mode_gid - Off - Off
safe_mode_include_dir no value no value
upload_max_filesize - 20M - 20M
upload_tmp_dir - /home/oo002vfr/www/uploads - no value
it doesnt seem like i can change the open_basedir value with ini_set() - even if i could: what should it be at to prevent this error?
i cannot access the php.ini, since they are on a shared server, i can email the company who runs it though.
any ideas are welcome. rock on.
sid