I downloaded a PHP File-manager called 'FileThingie' in which you can upload files to your directories. It works fine, but when I try to upload a new file whose path is very large (many characters) PHP gives me an error.
The error that PHP displays is:
Warning: move_uploaded_file(../../archivos/admin_arch/2019/365 GRADOS EMPRESA NUMERO 1/01. ENERO/OPERACIONES/GRANDES DESARROLLOS/MI EMPRESA GENERICA SA DE CV/GENERALES/Prueba/CUMA_VH1_SED_SEM33_1.pdf) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Project\Sistema\admin_arch\index.php on line 822
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Windows\Temp\phpE1F.tmp' to '../../archivos/admin_arch/2019/365 GRADOS EMPRESA NUMERO 1/01. ENERO/OPERACIONES/GRANDES DESARROLLOS/MI EMPRESA GENERICA SA DE CV/GENERALES/Prueba/CUMA_VH1_SED_SEM33_1.pdf' in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Project\Sistema\admin_arch\index.php on line 822
Code:
if (@move_uploaded_file($c['tmp_name'], $ruta_archivo_final )) {
@chmod(ft_get_dir() . "/{$c['name']}", 0777);
$msglist++;
ft_set_message("Archivo subido correctamente. Nombre: " . $nomenclatura_temp);
ft_invoke_hook('upload', ft_get_dir(), $c['name']);
}
}
As I told you, it works fine if the pathname is not that big (there seems to be a limit), so I do not think there is an issue with permissions.
Thanks in advance!