Hey there guys;
I have been going hard at this problem for a while now, but at the end of
the day, I always get the same error. Unfortunately I have a deadline that I
have to meet :(
k, here is the error (I am sure you have all seen this one before):
Warning: Unable to create '/home/httpd/www/g0thic/cawood_files/email.html':
No such file or directory in /home/httpd/www/g0thic/cawood/edit_f.php on
line 31
now, I have done some extensive checking, and this is the same script /html
file used to upload the file, the interesting part is that the file is in
the /tmp/ directory before and after upload. I am running the script to list
the contents of the /tmp directory BEFORE AND AFTER attempting the copy
routine:
copy($f_loc,$destination.''.$f_loc_name);
Contents of $destination = /home/httpd/www/g0thic/cawood_files/
the entire copy string looks like this (of course this is after the
variables have been populated):
/tmp/phpE85ySu,/home/httpd/www/g0thic/cawood_files/email.html
Ok, you will probably ask what the perms of ./cawood_files/ is, I have
chmod'd them to 777, the perms of /tmp are also @ 777.
I know the destination is created correctly, because this is the string I am
using:
$destination = "$DOCUMENT_ROOT/cawood_files/";
and ./cawood_files/ is a valid directory, I used the Apache $DOCUMENT_ROOT
variable to provide consistency if I ever changed the location of the
/cawood_files directory.
Below are just a few extras:
//BEGIN UPLOAD FILE SEQUENCE
global $fldf_loc;
global $destination;
//LISTING DIR BEFORE COPY
$handle=opendir('/tmp/');
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file != "xml-edifact" && $file !=
".qmail-qread" && $file != ".font-unix" && $file != ".esd" && $file !=
".qmail-qstat") {
echo "$file<BR>";
}
}
closedir($handle);
//COPY FILE
copy($f_loc,$destination.''.$f_loc_name);
//LISTING DIR AFTER COPY (using different variables just to make sure)
$extra_handle=opendir('/tmp/');
while ($extra_file = readdir($handle)) {
if ($extra_file != "." && $extra_file != ".." && $extra_file !=
"xml-edifact" && $extra_file != ".qmail-qread" && $extra_file !=
".font-unix" && $extra_file != ".esd" && $extra_file != ".qmail-qstat") {
echo "$extra_file<BR>";
}
}
closedir($handle);
//ECHO COPY PARAMETERS
echo "<BR>$f_loc,$destination$f_loc_name<BR>";
Any ideas?
Cheers,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]