|
Myalbum-p-2.86a_GIJOE et .jpeg ou.jpg |
|
Aspirant
Inscrit: 18/05/2006 11:39
|
Bonjour, J'utile Xoops 2.0.13.2 en "local" avec EasyPhp 1.8 sous Windows Xp.
Mon problème, c'est qu'il m'est impossible d'uploader des images au formay .jpg ou .jpeg. Au moment de soumettre je bloque sur une page blanche avec cette adresse: http://*************/xoops/modules/myalbum/submit.php?caller=
J'ai la bonne taille et le bon poids préréglé, j'utilise GD seul ou avec GD2 , c'est idem.
J'ai aussi testé avec la version 2.84 et même la 2.90(bêta).
Toujours pareil, seul le format .gif passe impec.
C'est quoi ce binz ? (help
Posté le : 22/06/2006 01:14
|
|
|
Re: Myalbum-p-2.86a_GIJOE et .jpeg ou.jpg |
|
Xoops accro
Inscrit: 04/02/2003 01:54
De Le Mans
|
Bonjour,
Active le mode debug php (admin system, préférences, paramètres généraux, mode de mise au point) pour connaître l'origine de l'erreur.
Posté le : 22/06/2006 01:35
|
|
|
Re: Myalbum-p-2.86a_GIJOE et .jpeg ou.jpg |
|
Aspirant
Inscrit: 18/05/2006 11:39
|
ah....euh...désolé, je débute, alors je n'y avait pas pensé. Voilà pour l'erreur: Fatal error: Call to undefined function: imagecreatefromjpeg() in d:\program files 2\easyphp1-8\www\xoops\modules\myalbum\include\functions.php on line 292 et la ligne en question: case 2 : // JPEG $src_img = imagecreatefromjpeg( $src_path ) ; break ; Dans ce paragraphe:
// Modifying Original Photo by GD
function myalbum_modify_photo_by_gd( $src_path , $dst_path )
{
global $myalbum_width , $myalbum_height ;
if( ! is_readable( $src_path ) ) return 0 ;
list( $width , $height , $type ) = getimagesize( $src_path ) ;
switch( $type ) {
case 1 :
// GIF
@rename( $src_path, $dst_path ) ;
return 2 ;
case 2 :
// JPEG
$src_img = imagecreatefromjpeg( $src_path ) ;
break ;
case 3 :
// PNG
$src_img = imagecreatefrompng( $src_path ) ;
break ;
default :
@rename( $src_path, $dst_path ) ;
return 2 ;
}
if( $width > $myalbum_width || $height > $myalbum_height ) {
if( $width / $myalbum_width > $height / $myalbum_height ) {
$new_w = $myalbum_width ;
$scale = $width / $new_w ;
$new_h = intval( round( $height / $scale ) ) ;
} else {
$new_h = $myalbum_height ;
$scale = $height / $new_h ;
$new_w = intval( round( $width / $scale ) ) ;
}
$dst_img = imagecreatetruecolor( $new_w , $new_h ) ;
imagecopyresampled( $dst_img , $src_img , 0 , 0 , 0 , 0 , $new_w , $new_h , $width , $height ) ;
}
if( isset( $_POST['rotate'] ) && function_exists( 'imagerotate' ) ) switch( $_POST['rotate'] ) {
case 'rot270' :
if( ! isset( $dst_img ) || ! is_resource( $dst_img ) ) $dst_img = $src_img ;
// patch for 4.3.1 bug
$dst_img = imagerotate( $dst_img , 270 , 0 ) ;
$dst_img = imagerotate( $dst_img , 180 , 0 ) ;
break ;
case 'rot180' :
if( ! isset( $dst_img ) || ! is_resource( $dst_img ) ) $dst_img = $src_img ;
$dst_img = imagerotate( $dst_img , 180 , 0 ) ;
break ;
case 'rot90' :
if( ! isset( $dst_img ) || ! is_resource( $dst_img ) ) $dst_img = $src_img ;
$dst_img = imagerotate( $dst_img , 270 , 0 ) ;
break ;
default :
case 'rot0' :
break ;
}
if( isset( $dst_img ) && is_resource( $dst_img ) ) switch( $type ) {
case 2 :
// JPEG
imagejpeg( $dst_img , $dst_path ) ;
imagedestroy( $dst_img ) ;
break ;
case 3 :
// PNG
imagepng( $dst_img , $dst_path ) ;
imagedestroy( $dst_img ) ;
break ;
}
imagedestroy( $src_img ) ;
if( ! is_readable( $dst_path ) ) {
// didn't exec convert, rename it.
@rename( $src_path , $dst_path ) ;
return 2 ;
} else {
@unlink( $src_path ) ;
return 1 ;
}
}
Voilà, faut que j'installe un autre "truc" pour que ça marche ???
Posté le : 22/06/2006 02:03
|
|
|
Re: Myalbum-p-2.86a_GIJOE et .jpeg ou.jpg |
|
Semi pro
Inscrit: 06/01/2004 09:37
De Non loin de Paris
|
Est tu bien sur que GD2 est activé ? Si tu vient de l'activer, il te faut relancer apache.
A+
Posté le : 22/06/2006 09:31
|
|
|
Re: Myalbum-p-2.86a_GIJOE et .jpeg ou.jpg |
|
Aspirant
Inscrit: 18/05/2006 11:39
|
oui et déja fait
Posté le : 22/06/2006 09:47
|
|
|
Re: Myalbum-p-2.86a_GIJOE et .jpeg ou.jpg |
|
Semi pro
Inscrit: 06/01/2004 09:37
De Non loin de Paris
|
Salut, Peut tu donner ce que renvoie cette fonction :
function gd_info() {
$array = Array(
"GD Version" => "",
"FreeType Support" => 0,
"FreeType Support" => 0,
"FreeType Linkage" => "",
"T1Lib Support" => 0,
"GIF Read Support" => 0,
"GIF Create Support" => 0,
"JPG Support" => 0,
"PNG Support" => 0,
"WBMP Support" => 0,
"XBM Support" => 0
);
$gif_support = 0;
ob_start();
eval("phpinfo();");
$info = ob_get_contents();
ob_end_clean();
foreach(explode("n", $info) as $line) {
if(strpos($line, "GD Version")!==false)
$array["GD Version"] = trim(str_replace("GD Version", "", strip_tags($line)));
if(strpos($line, "FreeType Support")!==false)
$array["FreeType Support"] = trim(str_replace("FreeType Support", "", strip_tags($line)));
if(strpos($line, "FreeType Linkage")!==false)
$array["FreeType Linkage"] = trim(str_replace("FreeType Linkage", "", strip_tags($line)));
if(strpos($line, "T1Lib Support")!==false)
$array["T1Lib Support"] = trim(str_replace("T1Lib Support", "", strip_tags($line)));
if(strpos($line, "GIF Read Support")!==false)
$array["GIF Read Support"] = trim(str_replace("GIF Read Support", "", strip_tags($line)));
if(strpos($line, "GIF Create Support")!==false)
$array["GIF Create Support"] = trim(str_replace("GIF Create Support", "", strip_tags($line)));
if(strpos($line, "GIF Support")!==false)
$gif_support = trim(str_replace("GIF Support", "", strip_tags($line)));
if(strpos($line, "JPG Support")!==false)
$array["JPG Support"] = trim(str_replace("JPG Support", "", strip_tags($line)));
if(strpos($line, "PNG Support")!==false)
$array["PNG Support"] = trim(str_replace("PNG Support", "", strip_tags($line)));
if(strpos($line, "WBMP Support")!==false)
$array["WBMP Support"] = trim(str_replace("WBMP Support", "", strip_tags($line)));
if(strpos($line, "XBM Support")!==false)
$array["XBM Support"] = trim(str_replace("XBM Support", "", strip_tags($line)));
}
if($gif_support==="enabled") {
$array["GIF Read Support"] = 1;
$array["GIF Create Support"] = 1;
}
if($array["FreeType Support"]==="enabled"){
$array["FreeType Support"] = 1; }
if($array["T1Lib Support"]==="enabled")
$array["T1Lib Support"] = 1;
if($array["GIF Read Support"]==="enabled"){
$array["GIF Read Support"] = 1; }
if($array["GIF Create Support"]==="enabled")
$array["GIF Create Support"] = 1;
if($array["JPG Support"]==="enabled")
$array["JPG Support"] = 1;
if($array["PNG Support"]==="enabled")
$array["PNG Support"] = 1;
if($array["WBMP Support"]==="enabled")
$array["WBMP Support"] = 1;
if($array["XBM Support"]==="enabled")
$array["XBM Support"] = 1;
return $array;
}
Avec un :
echo '<pre>';print_r(function gd_info());echo '</pre>';
Posté le : 22/06/2006 10:54
|
|
|
Re: Myalbum-p-2.86a_GIJOE et .jpeg ou.jpg |
|
Aspirant
Inscrit: 18/05/2006 11:39
|
Houlà !!!! Primo: merci de ton aide Zoullou, c'est super sympa. Deuxio: tu surestimes mes capacités en informatique ....je n'ai pas compris ce que tu me demmandais. Tu veux que je fasse quoi, et comment ?
Posté le : 22/06/2006 15:55
|
|
|
Re: Myalbum-p-2.86a_GIJOE et .jpeg ou.jpg |
|
Aspirant
Inscrit: 18/05/2006 11:39
|
:up: Help... (help
Posté le : 25/06/2006 18:27
|
|
Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.
|