rayman0487 Posted June 30, 2013 Share Posted June 30, 2013 Hey all. I have an issue that I cannot figure out today and it's driving me crazy. I have an API and a front-end application running on my Windows PC and my LAMP on AWS and I'm trying to upload a file from the front end to the API for the API to handle saving the file. On my window's machine it works fine, but on AWS it is not working, it is "changing" my array structure. For example see the simple debug output below: WINDOWS: Sending: Array ( [request] => UploadFile [CustomerID] => 1 [Category] => 1 [0] => @D:\Programs\xampp\CSTemp\1\1\home.txt ) API STARTING... 1 files submitted File Array: Array ( [0] => Array ( [name] => home.txt [type] => application/octet-stream [tmp_name] => D:\Programs\xampp\tmp\phpC4B2.tmp [error] => 0 [size] => 0 ) ) LINUX Sending: Array ( [request] => UploadFile [CustomerID] => 1 [Category] => 1 [0] => @/var/www/tmp/1/1/home.txt ) API STARTING... 1 files submitted File Array: Array ( [Category] => Array ( [name] => home.txt [type] => application/octet-stream [tmp_name] => /tmp/php1DBdoV [error] => 0 [size] => 0 ) ) As you can see, Linux is storing the file in $_FILES['Category'] and not just $_FILES which Windows is doing. I know the source code is exactly the same because I'm working from a SVN repository that automatically checks out the source code on AWS when I commit from my computer. Does anyone have any insight into this? I can provide additional code if needed, but the code appears to be working other than this issues.. Thanks for you help. -R Quote Link to comment Share on other sites More sharing options...
rayman0487 Posted July 6, 2013 Author Share Posted July 6, 2013 Anybody?? Much appreciated. Quote Link to comment Share on other sites More sharing options...
jcbones Posted July 6, 2013 Share Posted July 6, 2013 Can you post just the form? Quote Link to comment Share on other sites More sharing options...
rayman0487 Posted July 6, 2013 Author Share Posted July 6, 2013 As in, not include $_FILES? If so, yes that works just fine. That is why I'm stumped why it's having this result. Quote Link to comment Share on other sites More sharing options...
jcbones Posted July 6, 2013 Share Posted July 6, 2013 No, as in copy/paste it here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.