1

Bonjour à tous !

J'essaie de générer un catalogue de 450 pages. Lorsque je limite mon SQL à 50 pages par exemple, le fichié est généré, mais lorsque je supprime la limite, il ne génère pas.
J'ai vérifié les champs de ma table, les valeur NULL sont correct, les images sont corrects, tout y est normalement... mais pourquoi il ne peut pas générer mon catalogue ?
Notez que je ne reçois aucun message d'erreur et lorsque j'affiche la page du catalogue, (celle que le script appel), il est généré (PHP MYSQL).

Pouvez-vous m'aider svp ?
Cordialement
Jaber

2

qu'y a t il dans les logs de mysql ? tu vois ta requête ? quel sont les lignes qui suivent ?
avatar
Webmaster du site Ti-FRv3 (et aussi de DevLynx)
Si moins de monde enculait le système, alors celui ci aurait plus de mal à nous sortir de si grosses merdes !
"L'erreur humaine est humaine"©Nil (2006) // topics/6238-moved-jamais-jaurais-pense-faire-ca

3

n'est ce pas simplement un timeout sur l’exécution des scripts php ? par défaut c'est 30 secondes
et la le mec il le pécho par le bras et il lui dit '

4

Bonjour et merci de vous intéresser à mon problème.
Je crois que RobinHood a raison... un timeout. Firebug s'arrête à 2m1s :
Y a t-il un moyen de l'augmenter par .htaccess chez OVH ? Je suis en mutualisé :s

5

Je ne connais pas du tout HTML2PDF, mais j'ai l'impression que même en augmentant la durée maximale d'exécution de PHP tu n'arriveras pas à générer un catalogue de 450 pages. En regardant les questions d'autres internautes dans ce forum, on dirait que c'est bien au-dessus de ce qu'HTML2PDF est capable de traiter dans un temps raisonnable ?
avatar
All right. Keep doing whatever it is you think you're doing.
------------------------------------------
Besoin d'aide sur le site ? Essayez par ici :)

6

e Zeph ! J'ai tenté de mettre en début de code set_time_limit(0);C'est fort possibl mais FireBug me signale tout de meme "503 Service Unavailable" bien que le catalogue se crée.
Si je passe par cron malgré cette erreur et cette génération (réussie), il refuse.set_time_limit(0);Je crois bien que ne résout pas le problème correctement.

7

vince (./2) :
qu'y a t il dans les logs de mysql ? tu vois ta requête ? quel sont les lignes qui suivent ?

Voici ma page cron.php#!/usr/local/bin/php <?php set_time_limit(0); ob_start(); include(dirname(__FILE__).'/cron_catalogue.php'); $content = ob_get_clean(); require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php'); try { $html2pdf = new HTML2PDF('P', 'A4', 'fr', 'UTF-8'); $html2pdf->pdf->SetDisplayMode('fullpage'); $html2pdf->writeHTML($content, isset($_GET['vuehtml'])); $html2pdf->pdf->Output('www/produits/catalogue/catalogue_du_'.date("d_m_Y-H_i").'_cron.pdf','F'); } catch(HTML2PDF_exception $e) {echo $e; exit;} ?>
et ma page d'exécution cron_catalogue.php :<?php set_time_limit(0); require_once("../config.php"); require_once("../langue.php"); ?> <style> .EspaceEntete {width:100%; height:100px;} .prod_titre_pdf {text-align:left; font-size:20px; padding:0 0 10px 0;} .prod_resumer_pdf {text-align:left; font-size:13px; padding:0 0 10px 0; color:#999;} .prod_philosophie_pdf {text-align:left; color:#3a6f86; border-radius:3px; border:1px solid #CCCCCC; padding:2px 5px;} .prod_description_pdf {text-align:left; padding:0 0 10px 0;} .prod_image_prod_pdf {width:250px; height:375px; padding:0 0 10px 0;} .prod_Contenance_pdf {color:#3a6f86; display:inline-block; border-radius:3px; border:1px solid #CCCCCC; padding:2px 5px; margin:0;} .prod_autre_titre_pdf {text-align:left; color:#3a6f86; padding:0 0 10px 0;} .prod_routi_titre_pdf {text-align:left; color:#3a6f86; padding:0 0 0 0;} .prod_type_p_pdf {border:1px solid #CCCCCC; padding:2px 5px; background:#e9e9e9; margin:0 5px 5px 0; border-radius:3px; float:left; color:#666;} .prod_prob_p_pdf {border:1px solid #CCCCCC; padding:2px 5px; background:#e9e9e9; margin:0 5px 5px 0; border-radius:3px; float:left; color:#666;} .prod_benefi_pdf {text-align:left; padding:0 0 10px 0;} .prod_indica_pdf {text-align:left; padding:0 0 10px 0;} .prod_routin_pdf {text-align:left; padding:0 0 7px 0;} .prod_utilis_pdf {text-align:left; padding:0 0 10px 0;} .prod_ingred_pdf {text-align:left; padding:0 0 10px 0;} .prod_footer_pdf {color:#999; font-size:13px;} </style> <!-- ---------------------------------------------------------------------------------------------- --> <?php $Stat = $pdo->query("SELECT * FROM ".$TB_PRODUITS." WHERE ".$PAYS."='1' AND Afficher='1' ORDER BY Marque ASC"); while($data = $Stat->fetch(PDO::FETCH_ASSOC)){ ?> <page> <?php if ($data["SousMenuId"] == "bains_d_huiles") {$TypeTitre = "";} elseif ($data["SousMenuId"] == "brosses_a_dents") {$TypeTitre = "";} elseif ($data["SousMenuId"] == "clarifiant_unifiant") {$TypeTitre = mb_strtoupper($PRODUIT_TYPE_PEAU, 'UTF-8');} elseif ($data["SousMenuId"] == "defrisants") {$TypeTitre = mb_strtoupper($PRODUIT_TYPE_CHEVEUX, 'UTF-8');} elseif ($data["SousMenuId"] == "dentifrices") {$TypeTitre = "";} elseif ($data["SousMenuId"] == "deodorants_pour_femmes") {$TypeTitre = "";} elseif ($data["SousMenuId"] == "deodorants_pour_hommes") {$TypeTitre = "";} /* ------------------------------------------------------------------------------------------------------------------------ */ if ($data["SousMenuId"] == "bains_d_huiles") {$ProbTitre = "";} elseif ($data["SousMenuId"] == "brosses_a_dents") {$ProbTitre = "";} elseif ($data["SousMenuId"] == "clarifiant_unifiant") {$ProbTitre = mb_strtoupper($PRODUIT_TYPE_PEAU, 'UTF-8');} elseif ($data["SousMenuId"] == "defrisants") {$ProbTitre = mb_strtoupper($PRODUIT_TYPE_CHEVEUX, 'UTF-8');} elseif ($data["SousMenuId"] == "dentifrices") {$ProbTitre = "";} elseif ($data["SousMenuId"] == "deodorants_pour_femmes") {$ProbTitre = "";} elseif ($data["SousMenuId"] == "deodorants_pour_hommes") {$ProbTitre = "";} ?> <!-- ---------------------------------------------------------------------------------------------- --> <page_footer> <table style="width: 100%;"><tr> <td style="text-align: left; width: 33%;" class="prod_footer_pdf">www.sivop.com</td> <td style="text-align: center; width: 34%;" class="prod_footer_pdf">Page [[page_cu]]/[[page_nb]]</td> <td style="text-align: right; width: 33%;" class="prod_footer_pdf"><?php echo $PRODUIT_GENERER; ?>&nbsp;<?php echo date($FORMAT_DATE); ?></td> </tr></table> </page_footer> <!-- ---------------------------------------------------------------------------------------------- --> <page_header> <table style="width: 100%;"><tr> <td style="text-align: left; width: 20%"><img src="../images/logo.png" width="146" height="72" /></td> <td style="text-align: left; width: 10%">&nbsp;</td> <td style="text-align: left; width: 70%"> <!-- LIBELLE --> <div class="prod_titre_pdf"><?php echo mb_strtoupper(nl2br($data["Libelle"]), 'UTF-8'); ?></div> <!-- RESUMER --> <div class="prod_resumer_pdf"><?php echo nl2br($data["Resumer"]); ?></div> <!-- PHYLOSOPHIE --> <table><tr><td><div class="prod_philosophie_pdf"><?php echo mb_strtoupper($data["Philosophie"], 'UTF-8'); ?></div></td></tr></table></td> </tr></table> </page_header> <!-- ---------------------------------------------------------------------------------------------- --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td height="100">&nbsp;</td> </tr> </tbody> </table> <!-- ---------------------------------------------------------------------------------------------- --> <!-- IMAGE --> <table style="width:480px;"><tr><td valign="top"> <table style="width:250px;"><tr><td><div class="prod_image_prod_pdf"> <?php $Local_no = '<img src="../images/no_image.png" width="250" "/>'; $Local_ok = '../images/produits/'; $Img_Extn = $data["Code"].'.png'; $Verif_ok = $Local_ok.$Img_Extn; $Img_Vali = '<img src="../images/produits/'.$Img_Extn.'" width="250"/>'; if(file_exists($Verif_ok)) {echo $Img_Vali;}else{echo $Local_no;} ?> </div></td></tr></table> <table style="width:250px;"><tr><td><div class="prod_Contenance_pdf"><?php echo $data["Contenance"]; ?></div></td></tr></table> </td> <td valign="top">&nbsp;</td> <td valign="top"> <!-- DESCRIPTIONS --> <div class="prod_description_pdf"><?php echo nl2br($data["Description"]); ?></div> <?php if(!empty($data["Benefice"])) { ?> <!-- BENEFICES --> <div class="prod_autre_titre_pdf"><?php echo mb_strtoupper($PRODUIT_BENEFICE, 'UTF-8'); ?></div><div class="prod_benefi_pdf"><?php echo nl2br($data["Benefice"]); ?></div> <?php ;} ?> <?php if(!empty($data["Indcations"])) { ?> <!-- INDICATIONS --> <div class="prod_autre_titre_pdf"><?php echo mb_strtoupper("Indcations", 'UTF-8'); ?></div><div class="prod_indica_pdf"><?php echo nl2br($data["Indications"]); ?></div> <?php ;} ?> <?php if(!empty($data["Type"])) { ?> <!-- TYPES --> <div class="prod_autre_titre_pdf"><?php echo $TypeTitre; ?></div> <table><tr> <?php $Type = $data["Type"]; $mot = explode("|", $Type); if(!empty($mot[0])){echo '<td><div class="prod_type_p_pdf">'.mb_strtoupper($mot[0], 'UTF-8').'</div></td>';}; if(!empty($mot[1])){echo '<td><div class="prod_type_p_pdf">'.mb_strtoupper($mot[1], 'UTF-8').'</div></td>';}; if(!empty($mot[2])){echo '<td><div class="prod_type_p_pdf">'.mb_strtoupper($mot[2], 'UTF-8').'</div></td>';}; if(!empty($mot[3])){echo '<td><div class="prod_type_p_pdf">'.mb_strtoupper($mot[3], 'UTF-8').'</div></td>';}; if(!empty($mot[4])){echo '<td><div class="prod_type_p_pdf">'.mb_strtoupper($mot[4], 'UTF-8').'</div></td>';}; ?> </tr></table> <?php ;} ?> <?php if(!empty($data["Probleme"])) { ?> <!-- PROBLEMES --> <div class="prod_autre_titre_pdf"><?php echo $ProbTitre; ?></div> <table><tr> <?php $Type = $data["Probleme"]; $mot = explode("|", $Type); if(!empty($mot[0])){echo '<td><div class="prod_prob_p_pdf">'.mb_strtoupper($mot[0], 'UTF-8').'</div></td>';}; if(!empty($mot[1])){echo '<td><div class="prod_prob_p_pdf">'.mb_strtoupper($mot[1], 'UTF-8').'</div></td>';}; if(!empty($mot[2])){echo '<td><div class="prod_prob_p_pdf">'.mb_strtoupper($mot[2], 'UTF-8').'</div></td>';}; if(!empty($mot[3])){echo '<td><div class="prod_prob_p_pdf">'.mb_strtoupper($mot[3], 'UTF-8').'</div></td>';}; if(!empty($mot[4])){echo '<td><div class="prod_prob_p_pdf">'.mb_strtoupper($mot[4], 'UTF-8').'</div></td>';}; ?> </tr></table> <?php ;} ?> </td> </tr> </table> <!-- ---------------------------------------------------------------------------------------------- --> <?php if(!empty($data["Ingredients"])) { ?> <!-- INGREDIENTS --> <div class="prod_autre_titre_pdf"><?php echo mb_strtoupper($PRODUIT_INGREDIENT, 'UTF-8'); ?></div><div class="prod_ingred_pdf"><?php echo nl2br($data["Ingredients"]); ?></div> <?php ;} ?> <!-- UTILISATION --> <div class="prod_autre_titre_pdf"><?php echo mb_strtoupper($PRODUIT_MODE_UTILISATION, 'UTF-8'); ?></div><div class="prod_utilis_pdf"><?php echo nl2br($data["Utilisation"]); ?></div> <?php if($data["MenuId"]=="parfums"){ ?> <div class="prod_autre_titre_pdf"><?php echo mb_strtoupper($PRODUIT_OLFACTIVE); ?></div> <?php echo $data["Olfaction"]; ?> <div class="prod_autre_titre_pdf"><?php echo mb_strtoupper($PRODUIT_PYRAMIDE); ?></div> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="150" align="left"><strong><?php echo $PRODUIT_NOTE_TETE; ?> :</strong></td> <td align="left"><?php echo $data["NoteTete"]; ?></td> </tr> <tr> <td width="150" align="left"><strong><?php echo $PRODUIT_NOTE_COEUR; ?> :</strong></td> <td align="left"><?php echo $data["NoteCoeur"]; ?></td> </tr> <tr> <td width="150" align="left"><strong><?php echo $PRODUIT_NOTE_FOND; ?> :</strong></td> <td align="left"><?php echo $data["NoteFond"]; ?></td> </tr> </table> <?php }; ?> <!-- ---------------------------------------------------------------------------------------------- --> </page> <?php ;} ?>