;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
fissunix a dit:Si c'est le temps d'exécution du script dont tu parles, ça peut se modifier dans le fichier php.ini:Bloc de code:;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
A+
Da21 a dit:J'ai bien modifier max_execution_time = 30 à 60 dans php.ini mais il me met toujours l'erreur suivante
Fatal error: Maximum execution time of 30 seconds exceeded in /home/www/page.php
il ne va pas jusqu'au 60 secondes
doije modifier autre chose?
Il créer des histogrammes à la volet a l'aide de la bibliothèque JPGRAPH.[MGZ]Slug a dit:Il fait quoi ton script pour demander autant de temps d'execution ?
@+
Guillaume
set_time_limit(1800);
ini_set('max_execution_time', 1800);
ini_set('max_input_time', 1800);
if(!$_FILES['photo1']['tmp_name']=='') {
// Check image size
$img = $_FILES['photo1']['tmp_name'];
$size = getimagesize($img);
$width = $size['0'];
$height = $size['1'];
$ratio = $width / $height;
$resolution = $width * $height;
$size = filesize($img);
$size2 = $size/1024;
$size3 = round($size2/1000, 3);
$min_width = "2000";
$min_size = "1500";
if($width > $min_width && $size2 > $min_size) {
// Filename => XXXXX_antica1.jpg
$photo1 = $name . '_antica1.jpg';
$photo1 = str_replace(' ', '', $photo1);
// Destination => fileupload/XXXX_antica1.jpg
$destination1 = "../../antica2006/" . str_replace(' ', '', $photo1);
$result = move_uploaded_file($_FILES['photo1']['tmp_name'], $destination1);
$thumb_width = '200';
$thumb_height = $thumb_width / $ratio;
$thumbnail1 = $name . '_antica1.jpg';
$thumbnail1 = str_replace(' ', '', $thumbnail1);
$dest = "../../antica2006_thumbs/" . str_replace(' ', '', $thumbnail1);
$thumb1 = ImageCreateFromJPEG($destination1);
$thumb2 = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($thumb2, $thumb1, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height);
ImageJpeg($thumb2, $dest);
chmod("$dest", 0777);
}
else {
$photo_num = 1;
if($width < $min_width) {
$error_width = '1';
}
if($size2 < $min_size) {
$error_size = '1';
}
include('photo_error.php');
exit;
}
}