Good evening. I have already asked about uploading a photo, and Indifferent helped me a lot, saying that because it shows:

Array ( [name] => tamada.gif [type] => [tmp_name] => [error] => 6 [size] => 0 ) 

It means that there is no temporary folder on the hosting. On the test server, everything is fine:

 Array ( [name] => tamada.gif [type] => image/gif [tmp_name] => /tmp\php42E.tmp [error] => 0 [size] => 14702 ) 

Indeed, the code processes only the [name] variable, which is present, and does not work any further. I thought the hosting would decide this question, but they ask me where the tmp temporary folder should be located, so I myself have no idea. Where should the temporary folder be located on the hosting and how to create it? I tried to create in the root folder, in the www folder, the problem was not solved. What else could be the reasons for the absence of variables: [type], [tmp_name], [size]? Thank. Really looking for answers.

  • Good evening! That is, it is already morning here, you are probably from the States? Regarding your problem: (1) Are you sure that the backslash on the way will be handled correctly by your server? (2) it is better to create a temporary folder outside www, otherwise it may accidentally become available to the whole world (3) and why is it impossible to create it? do you have ftp access? - VladD
  • No other reasons. Only the absence of a temporary folder [proof] ( ). Do you get dedicated or virtual hosting? So you rent the whole server or not? @vladD in from GMT + 2 to GMT + 8 is now evening, and this is Half of Russia and a bit of Europe :) - ReinRaus
  • I have an evening, I am from Bashkiria). VladD 1. What bekslesh, here, chtoli: / tmp\php42E.tmp? So this name is automatically created on my computer. 2. I also told them that I needed to create outside of www, on my virtual server the same way, they said: β€œIt’s not quite clear how the script will look for a folder outside the domain zone?” 3. In www and in the root folder I can create, it does not work outside, it is issued: "you do not have rights". ReinRaus, no, highlighted. - Regina
  • one
    @Reguin, think about changing the host :) In addition to the lack of help for your problem, he also suggests placing the temporary files download folder within the domain, which is just a terrible vulnerability, although setting up htaccess will save everything β€” it's better not to do so. - ReinRaus
  • ReinRaus, yes, I also thought about it, but mine paid for 3 months in advance) - Regina

1 answer 1

Good evening, as an option, can you forget to prescribe the attribute enctype="multipart/form-data" ?

Supplement β„–1 Here is a similar situation here

  • No, I have not forgotten. On the test, everything works fine. - Regina
  • Completed the answer - Node_pro
  • Thank you so much! I rummaged in the internet, did not find). Rather, she found something more or less understandable, there were such guesses). What is your structure on hosting? - Regina
  • Not much for that, everything is easier for me somehow. On the brink - merya there were no such problems =) - Node_pro
  • Not that hosting, I thought they knew me more, it turned out the other way around))) - Regina