p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: failed to connect


Message #1 by "kumudha" <kumudha@e...> on Wed, 3 Jan 2001 09:36:44 +0800
hi,

When i try to use email  i get an error:



Warning: Failed to Connect in C:\INetPub\WWWRoot\quiz\mail.php on line 2

----------------------------------------------------------------------------

-----

<?php

 mail("rasmus@l...", "My Subject", "Line 1\nLine 2\nLine 3");

?>



why i am unable to connect.



kumudha



--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to beginning_php as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-beginning_php-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #2 by "Ali (Maziar) Amirnezhad" <ali@b...> on Wed, 3 Jan 2001 16:05:28 +0330 (IRT)
Hi,



I had this problem before when I try to use PHP with APACHIE on Windows,

but when I use PHP on Linux I never got this message!



I will be gald too know how can I use MAIL Function on Windows!

Regards,

--Ali Amirnezhad

  ali@b...

  http://bamdad.org/~ali/







On Wed, 3 Jan 2001, kumudha wrote:



>hi,

>When i try to use email  i get an error:

>

>Warning: Failed to Connect in C:\INetPub\WWWRoot\quiz\mail.php on line 2

>----------------------------------------------------------------------------

>-----

><?php

> mail("rasmus@l...", "My Subject", "Line 1\nLine 2\nLine 3");

>?>

>

>why i am unable to connect.

>

>kumudha

>



--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to beginning_php as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-beginning_php-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #3 by "Rick" <rsal@h...> on Thu, 4 Jan 2001 01:55:54 -0000
Hi,



You're getting the "Failed to Connect" Error because you have some values

that are not set in your php.ini file. This doesn't happen in Linux

because that info is taken care of during Linux's build process.



You need to go into your php.ini file and look for two values: 

SMTP = and sendmail from =. Set those as follows:

SMTP = host.yourcompany.com

sendmail from = you@y...

You could also use localhost as your values, but Windows internal mail

server is slow. You could also use your ISP's mail server, if need be.

There will be another values called sendmail_path, just leave it commented

out(i.e. #sendmail_path=).



Hope this helps.

Best Regards,

Rick



--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to beginning_php as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-beginning_php-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #4 by "kumudha" <kumudha@e...> on Thu, 4 Jan 2001 18:06:56 +0800
why should we specify header after setcookie()

> Will setcookie not work without header,or will it work without header.



> kumudha



--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to beginning_php as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-beginning_php-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index