Php_error.log >>je ne comprend pas
Fermé
Bonsoir,
je travaille avec WAMPSERVER, j'ai un petit problème.
dans mon php_error.log j'ai:
[08-Apr-2008 21:09:20] PHP Warning: Variable passed to each() is not an array or object in C:\wamp\www\AP2\page web\formmail.php on line 8
[08-Apr-2008 21:09:21] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\AP2\page web\formmail.php on line 13
que dois je faire au juste ?
je travaille avec WAMPSERVER, j'ai un petit problème.
dans mon php_error.log j'ai:
[08-Apr-2008 21:09:20] PHP Warning: Variable passed to each() is not an array or object in C:\wamp\www\AP2\page web\formmail.php on line 8
[08-Apr-2008 21:09:21] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\AP2\page web\formmail.php on line 13
que dois je faire au juste ?
1 réponse
voici le code du fichier formmail.php pour que vous puissiez m'aidez à rédoudre le problème:
<?php
$TO = "XXXXX.XXXX@wanadoo.fr";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS))
{
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://<http://localhost/AP2/page%20web/merci.php>");
?>
<?php
$TO = "XXXXX.XXXX@wanadoo.fr";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS))
{
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://<http://localhost/AP2/page%20web/merci.php>");
?>