LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-16-2018, 02:55 AM   #1
chrisrih
LQ Newbie
 
Registered: Mar 2018
Posts: 2

Rep: Reputation: Disabled
Question Multiple files upload problem to Centos using PHP


Hello to Everyone!

I'm trying to upload multiple files via php to a folder of a DataBase application. I am using Centos 6.9.
So my problem is the following..
When i'm trying to upload a single file the process succeeds! In further details the file goes to a temporary folder and when i press the "confirm" button, the file goes to the "/upload/" folder of my application, as expected!
When on the other hand, i'm trying to upload multiple files, then the files upload to the temporary folder as before, but after pressing the confirm button (of the application), the files does not goes to the "/upload/" folder.

I have to notice that the php code is OK, because the whole process is working perfectly when i'm using Xampp (for Apache and MySQL Server) and Windows!

Thanks for any help...!!

P.S.
The configuration of my php.ini file is

File Uploads ;
;;;;;;;;;;;;;;;;

file_uploads = On

upload_tmp_dir = /var/www/html/neda/tempfolder

upload_max_filesize = 20M

max_file_uploads = 10
 
Old 03-17-2018, 07:56 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Could you check what $_FILES array contain? print_r($_FILES);
 
Old 03-20-2018, 02:25 AM   #3
chrisrih
LQ Newbie
 
Registered: Mar 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
I'm not sure what do you mean...
 
Old 03-20-2018, 05:52 AM   #4
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi chrisrih,

What keefaz has suggested supposed that you are the owner of (writer or at least you have access to) the PHP code.
He wants you to insert a "watcher" of the files list before the upload is attempted.

To me, this seems suited for the PHP Programming forum.
There the first need will be for you to share the PHP source code, or at least the part dealing with the upload.
 
Old 03-20-2018, 03:37 PM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by chrisrih View Post
I'm not sure what do you mean...
Add this line in php file that contains upload receiving code, just before the code that copies files from temp to upload directory
PHP Code:
echo '<pre>';print_r($_FILES);echo '</pre>'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple files upload to FTP fails _mz Linux - Server 3 08-30-2016 07:28 AM
Unable to upload files through PHP gokultm Red Hat 5 01-12-2012 04:46 AM
[SOLVED] ftp upload multiple files at once ted_chou12 Linux - Software 4 11-17-2011 11:34 PM
Cannot upload files with php milescook Fedora 6 09-30-2006 01:04 AM
Php Upload Files rabee77 Linux - Software 1 01-16-2005 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration