Questions tagged [move-uploaded-file]

30 questions
0
votes
1 answer

PHP: Yii: move_uploaded_file(/IMG-8746.jpg): failed to open stream: Permission denied

Don't know how to fix this error, eventough I read several articles and watched a few videos. I already made my @web directory read- and writeable with chmod 777 -R. I am able to upload files in different locations out of the @web folder.…
0
votes
1 answer

move_uploaded_file() php function not working for multiple uploads

I am trying to upload 3 separate images to upload on the server using. the code doesn't throw any error but only 1st image gets uploaded. The other two images are not uploaded on the server but Its name gets inserted into the database. here is my…
0
votes
1 answer

Failed to move file to using PHPMailer

I am trying to create a form with PHPMailer that allows me to send files. Sometimes it goes well but most of the time I get the following error: 'Failed to move file to C:\Inetpub\vhosts\mywebsite.nl\tmp\4a47EC1.tmp.jpg '. This is the…
splintermark77
  • 93
  • 1
  • 1
  • 4
0
votes
1 answer

Make directory and upload multiple file into created directory PHP

I have been digging for an answer for many days. how do i upload multiple file to the newly created directory. If you look into file_upload.php you will find two $upload_dir variable. So, let's call first $upload_dir as direct folder and Second,…
0
votes
1 answer

Can I pass a variable into an if(isset($_FILES['whatever'])) logical process?

I am new to PHP and am trying to create a page which will change/update/refresh depending on which form buttons are selected. This part works. The purpose of the site is to allow multiple file uploads of two types of data: PHOTO and MUSIC, along…
Fuzz
  • 3
  • 2
0
votes
1 answer

Upload File Issue - Refactor code to not construct the path from tainted, user-controlled data

I'm using a normal code to upload a file but when I use the function move_uploaded_file it shows me the error in the image. Point #1 says: This value can be controlled by the user. Point #2 says: Taint value is propagated Point #3 says: taint…
mayales
  • 1
  • 1
  • 2
0
votes
1 answer

Permission denied issue while using move_uploaded_file()

I am getting below error: PHP Warning: move_uploaded_file(PATH_TO_FILE): failed to open stream: Permission denied in PHP_FILE Note: I have already executed sudo chown -R apache *PATH_TO_FOLDER*. OS: Fedora 33 (Workstation Edition), PHP ver.…
Matej
  • 1
  • 3
0
votes
1 answer

Can't upload a file (no error, zero size)

I have any troubles with file upload, with JPG files. But not with all, I don't find any reason... :-( And of course, I tried to search first, but no results... I have an image, printscreen from website, opened and saved in Photoshop as JPG with no…
pavel
  • 26,538
  • 10
  • 45
  • 61
-1
votes
2 answers

Problem with uploading photos via php (move_uploaded_file)

I read a lot of threads here about move_uploaded_file() here, but I cannot find the answer. Im trying code from this website - https://www.simplilearn.com/tutorials/php-tutorial/image-upload-in-php but it doesnt work. I have 3…
Kubik Sukenik
  • 49
  • 1
  • 7
-1
votes
1 answer

PHP move_uploaded_file fail to upload file

I have the below PHP code to upload files $uploadedFile = ''; if(!empty($_FILES["file"]["name"])){ // File path config $fileName = $_FILES["file"]["name"]; $targetFilePath = 'uploads/'.$fileName; …
-1
votes
1 answer

Move_uploaded_file() not showing temp_name and others field in php 8.1

After Upgrading to php 8.1 my move_uploaded_file function is not working. Tmp_name is empty and showing Error 6. I am using PHPExcel. When I uploading it manually my data is fetching correctly but with using moveuploadedfunction the file is not…
Aashir Azeem
  • 173
  • 6
-1
votes
2 answers

php move_uploaded_file with absolute path

I have my project link as follows : http://localhost/prolist_admin/ and I use the move_uploaded_file as follows move_uploaded_file($temp_name, "../assets/img/static/$projectLogo"); The above code moves my file to the right folder, with the…
youngP
  • 7
  • 4
-1
votes
1 answer

Page auto refreshinng after fetch, when using "move_uploaded-file()" method in PHP

I send files via fetch and uploading them in PHP with move_uploaded_file() method.The problem is when i use move_uploaded_file() method page automatically refresh and even when i upload multiple files just first one uploading and refresh page…
novruzrhmv
  • 639
  • 5
  • 13
-2
votes
1 answer

Like selected file name in PHP

I have a file image with the name : 35210001.jpg And I want to move the file to another folder. What is the solution to handle the "LIKE" in PHP like Query in MySQL because the filename indicator obtained from the request to move is only…
bengbeng
  • 29
  • 3
-2
votes
1 answer

move_uploaded_file(uploads/): failed to open stream: Is a directory

I have this problem with a script to upload files on the server, the file is called view.php. The server is not localhost, but I have all the permissions thanks to sudo. I already gave all the permissions (777) to the file and also to the directory…
Oliverstonq
  • 35
  • 1
  • 7
1
2