Welcome to WebmasterWorld Guest from 220.127.116.11
If you have any questions (as to the french stuff), pls just sticky me and I will gladly respond.
- - - - - - - - - - - -
The error message reads:
Warning: Failed to Connect in c:\program_files\easyphp\www\our_site\valide_i.php on line 77
(It is acting as if it were a server error but its not. We are using localhost. The application isn't deployed yet).
<modnote>trimmed to relevant code only, as per charter
// envoie d'un email avec le nom d'usager et le courriel
$sujet= "Demande d'information\n";
$messager="Bonjour,<br>Votre nom d'usager est : $user<br> Votre mot de passe est : $password\n";
echo "$a<br>"."$sujet<br>"." $messager<br>"."$header<br>";
$mess="Un courriel vous<br>sera envoyé";
//mail($adressedest,$lobjet,$lemessage,"From: $expediteur\nReply-To: $expediteur\nX-Mailer: PHP/" );
// initialisation du message
$mess="Donnée invalide, recommencer ou contacter nous";
//redirection vers la page du formulaire login
- - - - - - - - - - - - - - - - -
Thanks to anybody that can pull us out of here.
[edited by: jatar_k at 11:49 pm (utc) on July 3, 2003]
[edit reason] generalized email addresses [/edit]
The Windows implementation of mail() differs in many ways from the Unix implementation. First, it doesn't use a local binary for composing messages but only operates on direct sockets which means a MTA is needed listening on a network socket (which can either on the localhost or a remote machine). Second, the custom headers like From:, Cc:, Bcc: and Date: are not interpreted by the MTA in the first place, but are parsed by PHP. PHP < 4.3 only supported the Cc: header element (and was case-sensitive). PHP >= 4.3 supports all the mentioned header elements and is no longer case-sensitive.
2 important php.ini settings for windows
Used under Windows only: DNS name or IP address of the SMTP server PHP should use for mail sent with the mail() function.
Used under Windows only: Number of the port to connect to the server specified with the SMTP setting when sending mail with mail(); defaults to 25. Only available since PHP 4.3.0.
1- Eaden, yes we are running it locally on a windows machine. Once it is deployed, it will be on one of our Linux servers.
2- Jatar_K - I didn't know you were in the Montreal area... wow.
Line 77 is this one: mail($a,$sujet,$messager,$header);
Jatar: the last paragraph from PHP Net makes a lot of sense. But does it still apply to us even if we are just running everything locally? Nothing is online yet. If it were, I would understand the error message, but its not.
But it would make sense Jatar
I figure, as eaden also mentioned, that it has no idea where or how to connect to the smtp server and that is what the problem is.
You can probably set it to the actual SMTP server that it will use (as long as it can connect to it) and that will make it easier when you do put it live.