upload file error pls help gettin warning permission denied
Posted: Sat Sep 13, 2008 9:33 am
Hi everybody
I am new to PHP. Actually I am trying to upload a file on my local machine on the server through PHP
my code works fine in my local enviornment
but when I upload my work on the server(linux) it gives me following errors
Warning (2): move_uploaded_file(.\_files\collection_images\130908102208.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied [APP/controllers/collections_controller.php, line 274]
move_uploaded_file - [internal], line ??
CollectionsController::admin_save() - APP/controllers/collections_controller.php, line 274
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 268
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 240
[main] - APP/webroot/index.php, line 83
Warning (2): move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php2si8lz' to '.\_files\collection_images\130908102208.jpg' [APP/controllers/collections_controller.php, line 274]
move_uploaded_file - [internal], line ??
CollectionsController::admin_save() - APP/controllers/collections_controller.php, line 274
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 268
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 240
[main] - APP/webroot/index.php, line 83
Warning (2): chmod() [function.chmod]: No such file or directory [APP/controllers/collections_controller.php, line 275]
pls get this reviewed for me and reply.
Thanks in advance,
Sourabh
I am new to PHP. Actually I am trying to upload a file on my local machine on the server through PHP
my code works fine in my local enviornment
but when I upload my work on the server(linux) it gives me following errors
Warning (2): move_uploaded_file(.\_files\collection_images\130908102208.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied [APP/controllers/collections_controller.php, line 274]
move_uploaded_file - [internal], line ??
CollectionsController::admin_save() - APP/controllers/collections_controller.php, line 274
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 268
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 240
[main] - APP/webroot/index.php, line 83
Warning (2): move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php2si8lz' to '.\_files\collection_images\130908102208.jpg' [APP/controllers/collections_controller.php, line 274]
move_uploaded_file - [internal], line ??
CollectionsController::admin_save() - APP/controllers/collections_controller.php, line 274
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 268
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 240
[main] - APP/webroot/index.php, line 83
Warning (2): chmod() [function.chmod]: No such file or directory [APP/controllers/collections_controller.php, line 275]
pls get this reviewed for me and reply.
Thanks in advance,
Sourabh