A server error occurred while uploading the file
A server error occurred while uploading the file
Saludes , me error al subir un archvo
remito log de mi Php
// Log de Php Version 7.4.26--
[23-Sep-2022 01:39:16 UTC] PHP 6. DataTables\Editor\Upload->_actionExec($upload = ['name' => 'jz0ooxw92gft (2).png', 'type' => 'image/png', 'tmp_name' => 'C:\wamp64\tmp\php51DE.tmp', 'error' => 0, 'size' => 30493], $id = '2') C:\wamp64\www\Clinica\dashboard\php\lib\Editor\Upload.php:448
[23-Sep-2022 01:39:16 UTC] PHP 7. rename($old_name = 'C:\wamp64\tmp\php51DE.tmp', $new_name = 'C:/wamp64/www/uploads/2.png') C:\wamp64\www\Clinica\dashboard\php\lib\Editor\Upload.php:499
// Log de Apache
No tengo en este dia
// El bloque del archivo Upload.php donde el Log refleja
private function _actionExec ( $upload, $id )
{
if ( ! is_string( $this->_action ) ) {
// Custom function
$action = $this->_action;
return $action( $upload, $id );
}
// Default action - move the file to the location specified by the
// action string
$to = $this->_path( $upload['name'], $id );
$res = rename( $upload['tmp_name'], $to );
if ( $res === false ) {
$this->_error = "An error occurred while moving the uploaded file.";
return false;
}
if ($this->_mode) {
chmod($to, $this->_mode);
}
return $id !== null ?
$id :
$to;
}
Sin mas que agregar me despido agradeciendo de antemano su apoyo
Replies
This error is usually caused by a permissions error. Check that your http server user has permissions to write to the
$to
path. Usually there will be an error in the http server's logs when this happens.Allan