I have been having trouble using a
file upload script on my server - came to the conclusion that this was because PHP was
being run on Apache Module so reconfigured PHP to run as
FastCGI.
Unfortunately now when I try
to upload a file via uploadify I get the
error
Warning:
move_uploaded_file()[function.move-uploaded-file] open_base_dir restrictions in effect.
File(/var/www/vhosts/domain.com/uploads/filename.txt) is not within the allowed
path(s):(/var/www/vhosts/domain.com/httpdocs:/tmp) in
.....
It then
refers me to line 32 of my script which
reads:
move_uploaded_file($tempFile,$targetFile);
$tempFile
is as follows:
$tempFile =
str_replace("
","",$_FILES['Filedata']['tmp_name']);
I
have tried altering my vhost.conf file in numerous ways bit without success - it
currently stands as
/var/www/vhosts/domain.com/httpdocs>
sapi_apache2.c>
php_admin_flag engine off
php_admin_flag
safe_mode on
php_admin_value open_basedir none
mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode
off
php_admin_value open_basedir none
I
seem to be going round in circles - it seems that the tmp directory is not being
found
No comments:
Post a Comment