El tema está en que si la foto es mayor de 2000 px por alguna de sus dimensiones (alto o ancho), se produce un error y sale el siguiente mensaje en la propia página:
Código HTML:
Fatal error: Out of memory (allocated 33292288) (tried to allocate 13056 bytes) in /homepages/41/d222577377/htdocs/vegit/include/class_upload.php on line 178
Este es el código que se encarga de la subida:
Código PHP:
// UPLOAD FILES
if($task == "doupload") {
$file_result = Array();
// RUN FILE UPLOAD FUNCTION FOR EACH SUBMITTED FILE
$update_album = 0;
$new_album_cover = "";
for($f=1;$f<6;$f++) {
$fileid = "file".$f;
if($_FILES[$fileid]['name'] != "") {
$file_result[$fileid] = $album->album_media_upload($fileid, $album_id, $space_left);
if($file_result[$fileid]['is_error'] == 0) {
$file_result[$fileid]['message'] = stripslashes($_FILES[$fileid]['name'])." $user_album_upload[1]";
$new_album_cover = $file_result[$fileid]['media_id'];
$update_album = 1;
}
}
}
Código PHP:
// CHECK IF DIMENSIONS ARE LARGER THAN ADMIN SPECIFIED SETTINGS
// AND SET DESIRED WIDTH AND HEIGHT
if($this->file_width > $file_maxwidth | $this->file_height > $file_maxheight) {
if($this->file_height > $file_maxheight) {
$width = ($this->file_width)*$file_maxheight/($this->file_height);
$height = $file_maxheight;
}
if($this->file_width > $file_maxwidth) {
$height = ($this->file_height)*$file_maxwidth/($this->file_width);
$width = $file_maxwidth;
}
} else {
$width = $this->file_width;
$height = $this->file_height;
}
Muchas gracias
