WAMP question localhost set to 8080

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

WAMP question localhost set to 8080

Postby violet » Mon May 28, 2007 11:57 am

I'm running IIS & WAMP on my PC. The tutorial on installing WAMP says to change my port to 8080 (so I type http://localhost:8080 on my browser when I'm using PHP) to get both IIS & WAMP to work (which I've managed to do).

The problem is that I think (do correct me if I'm wrong) SMTP port 25 'belongs' to IIS because PHP mail refuses to work with this setting... There is nothing in the WAMP homepage about changing the SMTP port to some other value, though.

Help, anyone? Thank you.
User avatar
violet
Forum Newbie
 
Posts: 24
Joined: Wed May 23, 2007 12:13 pm
Location: Manila, Philippines

Postby Kieran Huggins » Mon May 28, 2007 12:10 pm

I'd be willing to bet it's probably because you don't have an outgoing SMTP server defined (or defined properly) - the IIS mail server would still need to connect to another SMTP server to send the mail somewhere, and most ISPs block this traffic for spam reasons.

Try setting your ISP's SMTP server in php.ini

find:
Syntax: [ Download ] [ Hide ]
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

and change to:
Syntax: [ Download ] [ Hide ]
[mail function]
; For Win32 only.
SMTP = smtp.yourISP.com
smtp_port = 25

and see if that works..

alternatively, you can use ini_set() to set these at runtime:
Syntax: [ Download ] [ Hide ]
ini_set('sendmail_from','you@domain.com');

ini_set('SMTP','smtp.yourISP.com');

ini_set('smtp_port','25');

mail('test@domain.com', 'test subject', 'this is a test message!');

Worked for me when I just tried it, but your mileage may vary.
User avatar
Kieran Huggins
DevNet Master
 
Posts: 3635
Joined: Wed Dec 06, 2006 5:14 pm
Location: Toronto, Canada

Postby violet » Mon May 28, 2007 12:26 pm

My SMTP was set to localhost: 8080 (which I thought was the correct setting, oops!).. I set it to my ISP smtp & it worked.

Thank you, Kieran Huggins :)
User avatar
violet
Forum Newbie
 
Posts: 24
Joined: Wed May 23, 2007 12:13 pm
Location: Manila, Philippines


Return to Installation and Configuration

Who is online

Users browsing this forum: No registered users and 4 guests