PHP function error when passing long path as parameter

I am struggling with a problem with some php functions like stat (), file size (), move_uploaded_file () and fopen ().

Running my PHP 5.3.28 code on IIS6 (unfortunately), I get an error using the above functions when I pass the path "../../../../ceceditalia/userfiles_orig/files/doc/Area_Riservata/ CISP / 26.GOUSSELOT_New_environmental_friendly_hot_rolled_steel_suitable_for_two_sides_enamelling_intended_for_the_manufacturing_of_tanks_and_silos_FRANCIA.pdf "

I have already double checked the file permissions and the only way I have found to get these functions to work on this file is by decreasing the path length (196 characters). I also moved the file to the same directory as the php file (to work without the rest of the path) and run the script by appending one char at a time to the filename. It only worked until I reached 196 characters.

After all my research, I didn't find any limitation on php related file paths, and the default MAX_PATH for Windows is 260, not 196.

Can anyone help me?

+3


source to share





All Articles