Page 1 of 2
I'm new to PHP can someone help out with this error message?
Posted: Thu Aug 03, 2006 5:12 pm
by yaqub
Hi all-
I'm new tp PHP and trying to make mail form. Can someone please let me know step by step how to re-config the php.ini when I get this error message::::::
Warning: mail() [function.mail]: 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:\Program Files\Apache Group\Apache2\htdocs\newland\message_sent.php on line 6
I have downloaded QK SMTP Server but I don't know how to change the php.ini file or how to find the file on my system.
Please like I said give me a step by step instruction for how to reconfig that file.
I really appreciate any help given.
Posted: Thu Aug 03, 2006 5:29 pm
by feyd
It may be easier to use a library such as Swiftmailer, or phpmailer. Both are a simple search away.
Posted: Thu Aug 03, 2006 5:31 pm
by volka
I agree with feyd.
But anyway:
Is this smtp server up and running?
Try
http://www.qksoft.com/qk-smtp-server/online-help.html
Yeah the server is up and running
Posted: Thu Aug 03, 2006 9:30 pm
by yaqub
Yes it's up and running, but I need to specify in the php.ini file to use that server. I saw another post on another board saying that same thing, but they didn't say how to let the php.ini file know what server to use.
Can someone walk me through that?????
Thanks
Posted: Thu Aug 03, 2006 9:39 pm
by daedalus__
If you find the php.ini file I'm sure you could figure it out yourself.
If it's a Windows box you might try the windows or system directory, also, there is one in the PHP directory.
Gee how nice of people's help
Posted: Fri Aug 04, 2006 1:28 am
by yaqub
"If you find it I'm sure you figure it out yourself"???????????????????
What a revelation that was. And what a help that was. If I could figure it out I wouldn't bother asking for some help, what part of that didn't you understand??
Thanks for nothing
Posted: Fri Aug 04, 2006 1:34 am
by Luke

Not going to get much help with that attitude.
Thanks to the first 2 replies
Posted: Fri Aug 04, 2006 2:52 am
by yaqub
Thanks to the first 2 guys who replied. That's not what I was looking for. As for the second 2 did either of you really think that was helping me out????? If you did then I'm sorry it didn't help me out. Just by saying if you can find the file you could probably figure it out ain't help at all.
Not sure if you were just born with the knowledge of PHP or gee maybe you learned it and wow maybe someone along the way helped you out. That's what I was hoping for, but if all I get is what I've gotten so far well then......................
Once again this was directed at the 2 posts who really didn't even seem like they even bothered to offer assistance. The latter of the 2 should offer help or not post. Smart comments ain't gonna help me figure out why I can't send my mail. But thanks
So to get back to the subject____________
Posted: Fri Aug 04, 2006 2:54 am
by yaqub
I don't know how to configure the php.ini file. Can someone walk me through it step by step please.
Thanks in advance to those who want to help.
Posted: Fri Aug 04, 2006 3:12 am
by volka
Warning: mail() [function.mail]: 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:\Program Files\Apache Group\Apache2\htdocs\newland\message_sent.php on line 6
right now php expects the smtp server to run on the same machine, port 25. When I installed QK Server port 25 was the default setting (as expected).
On what server is php installed and on what server is QK running?
I'm using............
Posted: Fri Aug 04, 2006 3:26 am
by yaqub
Hi thanks for the reply and really offering to help man I really appreciate it.
Now............... I'm running Apache and that's what PHP is running on. As for anything else I have QK SMTP running and it's on the same machine I'm just running this trial mail form on my machine until I upload it to the host server. So this is very important to understand as once I upload the form I'm sure I will have to re-re-configure this again to reflect that server.
Can you please tell me like go to this spot on your computer(as Apache basically installs to the same spot if just default is selected) so I can find the php.ini file and then tell what general area to look at in the file as well what to change.
Thanks
Posted: Fri Aug 04, 2006 3:31 am
by volka
tells you which php.ini is used. Changes on that file probably require a restart of the apache.
But
Warning: mail() [function.mail]: 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:\Program Files\Apache Group\Apache2\htdocs\newland\message_sent.php on line 6
it's already configured to contact a smtp server at the same machine on port 25.
How do I get to that file and change the setting to reflect
Posted: Fri Aug 04, 2006 3:38 am
by yaqub
How do I get to that file and change the settings to reflect that I'm specifing QK SMTP Mail Server? By the way should I just use one of the other mail servers that were mentioned earlier in the post?
Thanks
Posted: Fri Aug 04, 2006 3:48 am
by volka
There is no setting to indicate a special server.
For php/win32 it's just a socket it can connect to and use smtp commands to send an email - regardless of the smtp server program.
Ok then what am I doing wrong?
Posted: Fri Aug 04, 2006 3:51 am
by yaqub
What am I doing wrong then? The error message says that it can't find a server doesn't it? I think it says that.