• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Issue About Move uploaded file not working online server in php

venitkin

New Pleskian
in the XAMPP localhost i am able to upload images
But windows hositng-plesk online server i am not able upload images/Photos
Error is
Warning
: move_uploaded_file(img/vp12.jpeg): Failed to open stream: Permission denied in G:\PleskVhosts\paidclass.com\sairamweb\My_Profile.php on line 121

Warning: move_uploaded_file(): Unable to move "C:\Windows\Temp\phpD1A.tmp" to "img/vp12.jpeg" in G:\PleskVhosts\paidclass.com\sairamweb\My_Profile.php on line 121
File Not Moved because


Please help me !
 
Possible reasons for move_uploaded_file not working on your online server in PHP could include permissions, file size limitations, or incorrect file paths. Check directory permissions, file size limits, and ensure correct file paths are used.
 
in the XAMPP localhost i am able to upload images
But windows hositng-plesk online server i am not able upload images/Photos
Error is
Warning
: move_uploaded_file(img/vp12.jpeg): Failed to open stream: Permission denied in G:\PleskVhosts\paidclass.com\sairamweb\My_Profile.php on line 121

Warning: move_uploaded_file(): Unable to move "C:\Windows\Temp\phpD1A.tmp" to "img/vp12.jpeg" in G:\PleskVhosts\paidclass.com\sairamweb\My_Profile.php on line 121
File Not Moved because


Please help me !
Hello I have the same issue too! Please try use error handling by adding lines below

if (move_uploaded_file($_FILES["uploaded-img"]["tmp_name"],"files/path/" . $newFilename)) {
echo "File successfully uploaded and moved.";
} else {
echo "Error moving file: " . $_FILES['uploaded-img']['error'];
}

Not sure why must add this to make it works, I hope someone can explain to me too.
 
Back
Top