I have a site on my service to migrate to another server. It has an administration panel where do I upload files. Flv,. Mp3 and. Jpg where can be seen in the body of the site with jwplayer.
When I try to upload these files on the server it appears the following error:
Warning: move_uploaded_file (/ usr / local / apache / htdocs \ videos \ 8.flv) [function.move-uploaded-file]: failed to open stream: Permission denied in / home/recmu540/public_html/carregar_arquivo_upload.php on line 24
Warning: move_uploaded_file () [function.move-uploaded-file]: Unable to move '/ tmp/phpPrLyU8' to '/ usr / local / apache / htdocs \ videos \ 8.flv in / home/recmu540/public_html/carregar_arquivo_upload. php on line 24
I contacted the hosting server and they say I need to change the address "/ usr / local / apache / htdocs" and put the correct path to folder with permission.
The point is that the files do not have that path. Below I put the code of this file that is giving error
PHP Code:
<?php if (!empty($_FILES)){// && file_exists($arquivo)
On Linux servers you have to have permissions to read, execute and write to files and folders. The error you're getting is stating that you do not have the permission to write into the "/ usr / local / apache / htdocs / videos" folder. Have a look at file permissions on php.net for more information
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks