cannot upload files via http

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



All,

I've installed PHP Version 4.3.9 as an Apache module, Apache/2.0.52, and RHEL 4.

I have a script that uploads files fine when open_basedir is commented out but fails whenever open_basedir is set to "./"

With open_basedir = "./", I specify the upload_tmp_dir = /tmp and also have included /tmp on my php_admin_value open_basedir directive in the httpd.conf just in case. With all these set, the file never gets created. However, if I create a file, named foo.txt at the shell prompt and then try to upload the same file foo.txt file via http, it overwrites it. So, it only fails when it tries to create a new file over http.

Here is my upload script:


if (is_uploaded_file($file_array['tmp_name']))
{
move_uploaded_file($file_array['tmp_name'], "$full_path") or die ("Couldn't copy");
print "file uploaded!<br><br>";
}

Any clues?

TIA,
Carlos
--
Carlos A. Benavente
Business and Technology Applications Analyst
Computer Science Department
NC State University
benavente@xxxxxxxxxxxx

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux