le log de php est vide, appache me met ca :
[Thu Nov 19 22:50:46 2009] [error] [client 127.0.0.1] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\htdocs\index.php on line 78, referer: localhost…
[Thu Nov 19 22:50:48 2009] [notice] Parent: child process exited with status 255 – Restarting.
[Thu Nov 19 22:50:48 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured – resuming normal operations
[Thu Nov 19 22:50:48 2009] [notice] Server built: Dec 10 2008 00:10:06
[Thu Nov 19 22:50:48 2009] [notice] Parent: Created child process 860
[Thu Nov 19 22:50:48 2009] [notice] Child 860: Child process is running
[Thu Nov 19 22:50:48 2009] [notice] Child 860: Acquired the start mutex.
[Thu Nov 19 22:50:48 2009] [notice] Child 860: Starting 64 worker threads.
[Thu Nov 19 22:50:48 2009] [notice] Child 860: Starting thread to listen on port 80.
[Thu Nov 19 22:50:49 2009] [error] [client 127.0.0.1] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\htdocs\index.php on line 78, referer: localhost…
[Thu Nov 19 22:50:49 2009] [notice] Parent: child process exited with status 255 – Restarting.
[Thu Nov 19 22:50:49 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured – resuming normal operations
[Thu Nov 19 22:50:49 2009] [notice] Server built: Dec 10 2008 00:10:06
[Thu Nov 19 22:50:49 2009] [notice] Parent: Created child process 1852
[Thu Nov 19 22:50:49 2009] [notice] Child 1852: Child process is running
[Thu Nov 19 22:50:49 2009] [notice] Child 1852: Acquired the start mutex.
[Thu Nov 19 22:50:49 2009] [notice] Child 1852: Starting 64 worker threads.
[Thu Nov 19 22:50:49 2009] [notice] Child 1852: Starting thread to listen on port 80.
donc apparament ce serai pas du au mysql_connect() mais a un mysql fetch array plus loin… ^^ je regarde ca et je vous dit quoi
EDIT : alors, voici le code ligne 78 :
<?php
$prod=mysql_query("SELECT * FROM Produit ORDER BY val_promo DESC LIMIT 0,5");
$ok=true;
while($prod1=mysql_fetch_array($prod))
{
echo"<div ";
if ($ok){echo"id=\"glisse1\" "; $ok=false;}
echo"class=\"glisse\"><h1>".$prod1["ref_prod"]."</h1><p>".$prod1["desc_prod"]."</p><a href=\"".RACINE."Afficher/produit.php?".$prod1["ref_prod"]."\"><img src=\"".$prod1["image"]."\" alt=\"voir ce produit\"/></a></div>";
}
?>
sur un serveur sur le net, ce même code fonctionne, mais c’est pour les cours et le prof vas tester en local.
donc la je pense que le while fait une boucle infinie. mais pourquoi ?! :s
EDIT 2 : ce n’est pas une boucle infinie, j’ai rajouter un compteur de passage dans la boucle en rajoutant compteur<6 en condition d’entrée de boucle, mais ca ne marche toujours pas
pour mysqli_* , je connais pas, ca change quoi au juste ??
Edité le 19/11/2009 à 23:10