Derek
|
| Posted: 04/24/2002, 3:01 AM |
|
I am trying to incorporate phpupload into my application and I keep getting the error
Warning: Unlink failed (Is a directory) in /home/myname/mysite-www/phpMyProject/UploadResult.php on line 51
Warning: Rename failed (No such file or directory) in /home/myname/mysite-www/phpMyProject/UploadResult.php on line 52
Fatal error: Call to a member function on a non-object in /home/myname/mysite-www/phpMyProject/UploadResult.php on line 57
I have looked at similar questions posted and tried everything I can find but nothing seems to work. Please help, I'm so very tired.
Humbly yours
|
|
|
 |
helper
|
| Posted: 04/24/2002, 3:17 AM |
|
please print $tmpfile variable to see its value. Right after line
$tmpfile = "users/".$company_id."/".$myfile_name;
put the code
echo "tmp file is " .$tmpfile;
Looks like incorrect path is used
|
|
|
 |
Derek
|
| Posted: 04/24/2002, 3:44 AM |
|
After
$tmpfile = "users/" . $username . "/" . $myfile_name;
I put in the line:
echo "tmp file is" . $tmpfile;
And was unable to get any answers. I still saw the same errors and nothing echoed. Please explain this simply and let me know what I should see.
Thank you in advance
|
|
|
 |
Nicole
|
| Posted: 04/24/2002, 4:15 AM |
|
Derek,
you get error on line 51, that is:
if (!file_exists($tmpfile)) {
But you put echo code before it, see:
$tmpfile = "users/".$username."/".$myfile_name;
echo "echo path ". $tmpfile;
if (!file_exists($tmpfile)) {
so, you should get the path printed. Please retry.
Also check was folder users/username/myfile_name created on machine?
|
|
|
 |
Derek
|
| Posted: 04/24/2002, 4:37 AM |
|
I have found that the directory is only partially being completed.
I am not getting the final $myfile_name subdirectory. What might cause this? How can this be corrected?
Thank you in advance.
|
|
|
 |
Nicole
|
| Posted: 04/24/2002, 5:07 AM |
|
Derek,
please check on footer section of AdminRecord page->AdminRecord form. File name should be "myfile", otherwise you should change var name on upload results page.
|
|
|
 |