hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : fsock

Forum Jump


Reply Post New Thread In Hosting Security and Technology Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Web Hosting Master
Join Date: Jan 2007
Posts: 688


Cannot send mail via php mail send

Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 in /home/user/public_html/smtpmail/class.smtp.php on line 105

How do I correct this? I'm using Cpanel with php 4.4.8, apache 2.2, mod suphp

Sponsored Links
Web Hosting Master
Join Date: Jan 2007
Posts: 688
I'm also getting error code -12263 on another domain

Apache error logs shows

[Fri Mar 14 20:16:45 2008] [error] [client] Invalid method in request \x16\x03\x01

<insert something witty>
Join Date: Apr 2000
Location: California
Posts: 3,051
Make sure you allow connections on port 25, that local SMTP is allowed and it's running. Also, make sure you have this enabled for PHP (check php.ini or phpinfo()'s output to see).

The "Invalid method in request" error is likely unrelated to the SMTP issue, are you reporting two different issues for two different sites?

Sponsored Links
Web Hosting Master
Join Date: Jan 2007
Posts: 688
[Fri Mar 14 23:13:30 2008] [error] [client] Invalid method in request \x16\x03\x01

Thats for another domain

Web Hosting Master
Join Date: Oct 2004
Location: Kerala, India
Posts: 4,743
If you have installed any firewall program such as apf/csf make sure the smtp related settings are done properly.

David |
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android

Junior Guru Wannabe
Join Date: Oct 2006
Posts: 34
Apf configuration is at /etc/apf/conf.apf

Look for IG_TCP_CPORTS in the file and make sure port 25 is listed in it.

check if exim is running or not with
service exim status

UltraUnix Internet Services
Quality service since 2000!
Reliability . Simplicity . Affordability

WHT Addict
Join Date: Mar 2008
Location: kolkata, India
Posts: 102
After restart apf you can try the following:

kill all exim process running on top
kill all imap process running on top
start EXIM

So you think your server is secure?
Try our security Service
With SysFirm


Related posts from
Title Type Date Posted

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Web Hosting News:
WHT Membership
WHT Membership



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?