• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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