Parse error: syntax error,unexpected $end
Résolu/Fermé
A voir également:
- Parse error: syntax error,unexpected $end
- Cmos checksum error ✓ - Forum Carte-mère/mémoire
- Fan error lenovo - Forum Refroidissement
- Cpu over temperature error - Forum Matériel & Système
- Error 10 pioneer ✓ - Forum Autoradio
- Error 0x80070643 - Accueil - Windows
4 réponses
jordane45
Messages postés
38446
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
28 février 2025
4 737
2 sept. 2019 à 07:25
2 sept. 2019 à 07:25
Bonjour
Merci de coller ton code correctement
https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code
Merci de coller ton code correctement
https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code
<?php /* Blogator-script | http://www.blogator-script.com | ***@*** Copyright 2005, 2006 Samuel TOLLEC pour SAMTEK This file is part of Blogator-script. Blogator-script is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Blogator-script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Blogator-script; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ session_start(); include('pass_cfg.php'); if (isset($_SESSION['mdp_crypt']) && $_SESSION['mdp_crypt'] == $adm_pass) { ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Installation de Blogator-script</title> <link rel="stylesheet" href="./_blogadata/css/main.css" type="text/css" media="all" /> </head> <body marginwidth="10" marginheight="10" topmargin="10" bottommargin="10" leftmargin="10" rightmargin="10"> <h2 style="text-align: center; font-weight: bold; color: black; font-style: italic">Paramètrage de Blog<span style="color: red">ator</span>-script</h2> <? $adr_abs = $_SERVER['SCRIPT_FILENAME']; $adr_abs = str_replace('//','/',$adr_abs); $adr_abs = str_replace('/install.php','',$adr_abs); $adr_url = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; $adr_url = str_replace('/install.php','',$adr_url); $php_vers =phpversion(); list($p1,$p2) = explode('.', $php_vers); if (($p1 >= 4 && $p2 >= 3) || $p1 >= 5) { $ph = "<span style=\"color: green\">: version de PHP suffisament récente pour Blogator-script</span>"; } elseif ($p1 == 4 && $p2 < 3) { $ph = "<span style=\"color: orange\">: version de PHP insuffisament récente pour Blogator-script<br />(peut cependant partiellement marcher)</span>"; } else { $ph = "<span style=\"color: red\">: version de PHP trop ancienne pour Blogator-script</span>"; } $gd = gd_info(); $keys = array_keys($gd); $g[0] = "<li>".$keys[0]." : <b>".$gd[$keys[0]]."</b></li>"; $on = " : <img src=\"./_blogadata/graph/check_on.gif\" border=\"0\" width=\"13\" height=\"13\" alt=\"on\" /></li>"; $off = " : <img src=\"./_blogadata/graph/check_off.gif\" border=\"0\" width=\"13\" height=\"13\" alt=\"off\" /></li>"; if ($gd[$keys[4]] == 1) { $g[1] = "<li>".$keys[4].$on; } else { $g[1] = "<li>".$keys[4].$off; } if ($gd[$keys[6]] == 1) { $g[2] = "<li>".$keys[6].$on; } else { $g[2] = "<li>".$keys[6].$off; } if ($gd[$keys[7]] == 1) { $g[3] = "<li>".$keys[7].$on; } else { $g[3] = "<li>".$keys[7].$off; } $lib_gd = ''; for ($i=0;$i<=3;$i++) { $lib_gd .= $g[$i]; } $max_filesize = ini_get('upload_max_filesize'); $post_max = ini_get('post_max_size'); $memory_limit = ini_get('memory_limit'); if ($memory_limit == FALSE) { $memory_limit = 'N/A'; } $max_exec = ini_get('max_execution_time'); $max_input = ini_get('max_input_time'); $php_cnf = " <li>upload_max_filesize : <b>Actuel $max_filesize</b> - Défaut 2M - Conseillé 10M</li> <li>post_max_size : <b>Actuel $post_max</b> - Défaut 8M - Conseillé 18M</li> <li>memory_limit : <b>Actuel $memory_limit</b> - Défaut 8M - Conseillé 16M</li> <li>max_execution_time : <b>Actuel $max_exec</b> - Défaut 30 - Conseillé 60</li> <li>max_input_time : <b>Actuel $max_input</b> - Défaut -1 - Conseillé 90</li> "; ?> <p style="font-size: 15px">Cette page vous permet d'installer en une seule étape Blogator Script (dans la plupart des cas). N'omettez aucun champ sauf facultatif; des paramètres par défaut sont présents pour vous orienter (attention ceux-ci correspondent à un serveur dédié assez puissant). Reportez-vous à la notice du script pour des informations plus précises...</p> <form name="install" action="install2.php" method="post"> <table border="0" cellspacing="0" align="center" bgcolor="#F5F5F5" style="border: thin solid black"> <tr> <td colspan="2"><div style="text-align: center"><b>Test de la compatibilité :</b></div></td> </tr> <tr> <td align="right">Version de PHP</td> <td><? echo "<b>$php_vers</b> $ph"; ?></td> </tr> <tr> <td align="right">Librairie GD</td> <td><br /><? echo $lib_gd; ?> <font size="1">('GD Version' doit être >= à 2.0.1 et toutes les cases doivent être cochées)</font></td> </tr> <tr> <td align="right">Valeurs du php.ini</td> <td><br /><? echo $php_cnf; ?></td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Configuration générale :</b></div></td> </tr> <tr> <td align="right">Nom de la plateforme</td> <td><input type="text" name="nom_script" size="15" maxlength="35" /></td> </tr> <tr> <td align="right">Adresse absolue<br />du script</td> <td><input type="text" name="adr_abs" size="25" maxlength="60" value="<? echo $adr_abs; ?>" /> <br /><font size="1">(ne pas modifier sauf si cela ne correspond pas à l'emplacement de cette page)</font></td> </tr> <tr> <td align="right">Adresse URL<br />du script</td> <td><input type="text" name="adr_url" size="25" maxlength="60" value="http://<? echo $adr_url; ?>" /> <br /><font size="1">(ne pas modifier sauf si cela ne correspond pas à l'emplacement de cette page)</font></td> </tr> <tr> <td align="right">Email Admin.</td> <td><input type="text" name="email" size="20" maxlength="50" /></td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Accès à la Base de données MySQL :</b></div></td> </tr> <tr> <td align="right">Nom du serveur</td> <td><input type="text" name="nom_serv" size="15" maxlength="30" value="localhost" /></td> </tr> <tr> <td align="right">Nom de la base</td> <td><input type="text" name="nom_bd" size="20" maxlength="30" /></td> </tr> <tr><br /> <td align="right">Nom utilisateur</td> <td><input type="text" name="nom_uti" size="20" maxlength="30" /></td> </tr> <tr> <td align="right">Mot de passe</td> <td><input type="password" name="mot_pass" size="15" maxlength="30" /></td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Blogs accessibles via sous-domaines (facultatif) :</b><br /><img src="./_blogadata/graph/avertissement.gif" border="0" width="15" height="15" alt="" /> Option expert - voir documentation</div></td> </tr> <tr> <td align="right">Activer</td> <td><input type="checkbox" name="mode_sd" value="oui" onclick="if (this.checked == true) { document.install.adr_abs_sd.disabled = false; document.install.adr_url_sd.disabled = false; } else { document.install.adr_abs_sd.disabled = true; document.install.adr_url_sd.disabled = true; }"> <font size="1">(les blogs sont créés dans le sous-domaine spécifié)</font></td> <tr> <td align="right">Adresse absolue<br />du sous-domaine</td> <td><input type="text" name="adr_abs_sd" size="15" maxlength="60" disabled /> ex: /home/mon_site/blogs</td> </tr> <tr> <td align="right">Adresse URL<br />du sous-domaine</td> <td><input type="text" name="adr_url_sd" size="15" maxlength="60" disabled /> ex: http://blogs.mon_site.com</td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center" /><b>Résolutions maximales des photos membre :</b></div></td> </tr> <tr> <td align="right">Taille réelle max.</td> <td><input type="text" name="resomax_ph_mb" size="4" maxlength="4" value="800" style="text-align: right" /> pixels (comprise entre 200 et 1600)</td> </tr> <tr> <td align="right">Taille de la miniature</td> <td><input type="text" name="resomax_ph_mb_min" size="4" maxlength="4" value="150" style="text-align: right" /> pixels (comprise entre 100 et 300)</td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Résolution maximale de la photo blog :</b></div></td> </tr> <tr> <td align="right">Taille réelle max.</td> <td><input type="text" name="resomax_ph_blg" size="4" maxlength="3" value="250" style="text-align: right" /> pixels (comprise entre 100 et 350)</td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Résolutions maximales des photos article :</b></div></td> </tr> <tr> <td align="right">Taille réelle max.</td> <td><input type="text" name="resomax_ph" size="4" maxlength="4" value="1200" style="text-align: right" /> pixels (comprise entre 200 et 1600)</td> </tr> <tr> <td align="right">Taille de la miniature</td> <td><input type="text" name="resomax_ph_min" size="4" maxlength="3" value="400" style="text-align: right" /> pixels (comprise entre 100 et 600)</td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Paramètrage des photos :</b></div></td> </tr> <tr> <td align="right" valign="top">Facteur de compression</td> <td><input type="text" name="tx_compression" size="2" maxlength="2" value="70" style="text-align: right" /> (compris entre 20 et 90) <br />90 => meilleure qualité, mais plus grande taille <br />20 => qualité minimale, mais taille réduite</td> </tr> <tr> <td align="right">Taille max. des photos :</td> <td><select name="taillemax_ph"> <option value="512"> 0.5</option> <option value="1024"> 1</option> <option value="1536" selected> 1.5</option> <option value="2048"> 2</option> <option value="3074"> 3</option> </select> Mo <font size="1">(voir manuel section Configuration de PHP)</font></td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Paramètrage des fichiers multimédia :</b></div></td> </tr> <tr> <td align="right">Quota par membre</td> <td><input type="text" name="quota_mm" size="4" maxlength="3" value="50" style="text-align: right" /> Mo (compris entre 5 et 500)</td> </tr> <tr> <td align="right">Taille max. d'un fichier</td> <td><select name="taillemax_mm"> <option value="2048"> 2</option> <option value="5120"> 5</option> <option value="10240" selected> 10</option> <option value="15360"> 15</option> <option value="20480"> 20</option> </select> Mo <font size="1">(voir manuel section Configuration de PHP)</font></td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Paramètrage des articles :</b></td> </tr> <tr> <td align="right">Nb de photo(s) / article</td> <td><input type="text" name="nb_ph_art" size="2" maxlength="2" value="5" style="text-align: right" /> (compris entre 1 et 10) <font size="1">(voir manuel section Configuration de PHP)</font></td> </tr> <tr> <td align="right">Nb d'articles / page</td> <td><input type="text" name="nb_art_p" size="2" maxlength="2" value="5" style="text-align: right" /> (compris entre 2 et 10)</td> </tr> <tr> <td colspan="2"><hr width="100%" /><div style="text-align: center"><b>Paramètrage divers :</b></td> </tr> <tr> <td align="right">Nombre max. de liens</td> <td><input type="text" name="nb_liens" size="2" maxlength="2" value="30" style="text-align: right" /> (compris entre 5 et 50)</td> </tr> <tr> <td align="right">Nb de commentaires<br />non lus affichés</td> <td><input type="text" name="nb_com_aff" size="2" maxlength="3" value="50" style="text-align: right" /> (compris entre 30 et 150)</td> </tr> <tr> <td align="right">Durée du cookie</td> <td><input type="text" name="duree_cookie" size="2" maxlength="2" value="8" style="text-align: right" /> heures (compris entre 4 et 24)</td> </tr> <tr> <td colspan="2"><hr width="100%" /></td> </tr> <tr align="center"> <td colspan="2"> <input type="submit" value="Installer" class="bouton1" onmouseover="this.style.color='#00F200'" onmouseout="this.style.color='#696969'" /> <input type="reset" value="Initialiser" class="bouton1" onmouseover="this.style.color='red'" onmouseout="this.style.color='#696969'" /><br /> </td> </tr> </table> </form> </body> </html> <? } else { header("location: ./bs_auth.php"); } ?>
jordane45
Messages postés
38446
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
28 février 2025
4 737
2 sept. 2019 à 08:43
2 sept. 2019 à 08:43
tu y es presque.... il manque juste le choix du langage dans les balises de code tel qu'expliqué dans le lien que je t'ai donné...
Quoi qu'il en soit, pour ton souci, il faut :
- Vérifier l'encodage du fichier (assure toi qu'il est bien en utf8 sans bom ) => voir chapitre 1 de ce lien : https://forums.commentcamarche.net/forum/affich-37584944-php-html-caracteres-accentues-et-l-utf8
(y compris pour les fichiers inclus )
- Vérifier qu'il n'y a pas des balises mal fermées éventuellement
Quoi qu'il en soit, pour ton souci, il faut :
- Vérifier l'encodage du fichier (assure toi qu'il est bien en utf8 sans bom ) => voir chapitre 1 de ce lien : https://forums.commentcamarche.net/forum/affich-37584944-php-html-caracteres-accentues-et-l-utf8
(y compris pour les fichiers inclus )
- Vérifier qu'il n'y a pas des balises mal fermées éventuellement
j'ai verifié l'ut8 sans bom avec notepad++ et je n'ai pas trouvé de balises mal fermées
jordane45
Messages postés
38446
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
28 février 2025
4 737
2 sept. 2019 à 09:19
2 sept. 2019 à 09:19
Il y a bien un éventuel souci .... l'utilisation des balises php raccourcies qu'il faut absolument éviter.
(sachant que pour les utiliser, il faut configurer ton serveur pour accepter le short_open_tag )
Donc.. remplace les
par :
(sachant que pour les utiliser, il faut configurer ton serveur pour accepter le short_open_tag )
Donc.. remplace les
<?
par :
<?php