When trying to upload a file, I receive the following errors:
**Warning** : move_uploaded_file(xarth.jpg): failed to open stream: Permission denied in **/opt/lampp/htdocs/social_media/profile.php** on line **34**
**Warning** : move_uploaded_file(): Unable to move '/tmp/phpPKTrhf' to 'xarth.jpg' in **/opt/lampp/htdocs/social_media/profile.php** on line **34**
After reading posts about file/folder permissions, I changed the php.ini file to:
However, even after restarting Apache and MySQL servers, the error persists. phpinfo shows the updated file path.
echo sys_get_temp_dir(); returns /tmp, so I am a bit confused as it seems that three folders are involved.
[EDIT] PHP is running as user daemon, which is the owner with read & write access to lampp/temp. I still cannot find the /tmp folder, even after searching the lampp directory. Well, there were tmp folders but for docs and phpmyadmin.
Any help would be appreciated,