Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3486010
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:58:36+00:00 2026-05-18T10:58:36+00:00

Hi there :) I have a problem with a function of PHP. I can’t

  • 0

Hi there 🙂
I have a problem with a function of PHP. I can’t understand why it cannot work, and that’s a problem for my project.

The context :
I have Joomla and want it to send email via the option “SMTP server”. It’s not working and the return is “Can’t connect to smtp host”.
I had searched in google for that problem and all the solutions I found didn’t work for me. So I decided to go into the code to see what happened. The problem occurs when the code call to the method “fsockopen()”, a built-in PHP method. This method say that the connection to the host timed out.
Where it becomes funny : I can connect and send email with this host, with exact same parameters with a mail client (Evolution), on the same machine (so it’s not a problem of opened port or something else).

The method is :

fsockopen($host, $port, $errno, $errstr, $tval);  

The used parameters and error returned :

$host : ssl://smtp.laposte.net. 
$port : 25
$errno : 110
$errstr : Connection timed out
$tval : 10

Some technical information :
PHP Version : 5.2.14
Sockets Support : enabled
OS : Ubuntu 10.10 under a virtual machine (VMWare)
Port : port 25 (smtp) is open on the virtual machine AND on the host of the virtual machine.

If someone had an idea how this function work and why it cannot connect, it will help me A LOT,
Thanks in advance,
Damien

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:58:37+00:00Added an answer on May 18, 2026 at 10:58 am

    I see you are using ssl… do you have OpenSSL enabled in php.ini?

    If OpenSSL support is installed, you may prefix the hostname with either ssl:// or tls:// to use an SSL or TLS client connection over TCP/IP to connect to the remote host.

    http://php.net/manual/en/function.fsockopen.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.