Description of what error was at number 5 here http://php.net/manual/ru/features.file-upload.errors.php in

$_FILES['pic']['error'] 

I think that once was possible in ancient versions of php?

  • one
    YES. IT'S IMPORTANT FOR ME!!! I WANT TO KNOW! And you probably never asked such a question? - root_x Povierennyy
  • four
    If he had at least some little bit important practicality in practice, yes. However, knowing what was there in the constants in fifth place, and what is in forty-fifth, does not add any meaning to the development. It's like that in a certain building there was a strict schedule in the toilet: Tuesday from 2 to 4, and now - Friday from 3 to 5 and you ooooooochen need to know why there were Tuesdays. Personally, it is important for me to know what is currently the current schedule. So the question is historical, not practical and hence meaningless - Aleksey Shimansky
  • 3
    SO - to solve practical problems and filling with practical methods, rather than a digression into history .... How useless information helped / helps you gain practical experience and put it into practice - without a clue. - Alexey Shimansky
  • five
    This question should be closed, because it is an excursion into history, and not a specific applied everyday and ACTUAL task that will be encountered in life and will be needed during development. This knowledge does not apply in practice and is not a practical problem, and therefore useless for other visitors. - Alexey Shimansky
  • four
    @VadimOvchinnikov you seriously believe that someone else is keeping afloat serious sites with a version below 4.3, and do not use versions without significant security holes? Seriously? Right? Let's stats: in the internet sites over 1 billion 200 million. Of these, 82.4% for PHP. Of this percentage, only 0.8% is occupied by PHP4, and of this percentage, 98% are occupied by sites with PHP> = 4.3. If you are in mathematics, you will consider this insignificant spittle in the ocean. Of these, it is necessary to take into account that most of them are abroad. I hope you do not say that someone else and Netscape Navigator uses? So all this is a long story. - Alexey Shimansky

2 answers 2

Once upon a time, in a far-away galaxy, code number 5 existed .

 #define UPLOAD_ERROR_E 5 /* Uploaded file size 0 bytes */ 

Added on November 24, 2001, and indicated the error code in case a zero-length file was loaded. In addition, an E_WARNING generated. Severe PHP beginning of the millennium, mda.

After half a year, people thought better of it , and cut this garbage out. Zero size files can now be downloaded and the application’s PHP code can already be viewed in the size parameter and decide for itself whether he likes such a file or not.

Interestingly, in PHP code, a constant with such a value never existed. For PHP code, these constants appeared after this story and initially did not have code 5. This commit entered PHP 4.3.0 . Just in case, the value of 5 was omitted when adding and subsequent constants .

    Constants from the storm. 5 is missing.

     define ('UPLOAD_ERR_OK', 0); define ('UPLOAD_ERR_INI_SIZE', 1); define ('UPLOAD_ERR_FORM_SIZE', 2); define ('UPLOAD_ERR_PARTIAL', 3); define ('UPLOAD_ERR_NO_FILE', 4); define ('UPLOAD_ERR_NO_TMP_DIR', 6); define ('UPLOAD_ERR_CANT_WRITE', 7); define ('UPLOAD_ERR_EXTENSION', 8); 

    Managed to google

     5 | UPLOAD_ERROR_E | As expliained by @Progman, removed in rev. 81792