Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Nov 2004
    Posts
    91
    Thanks
    1
    Thanked 0 Times in 0 Posts

    How do I reconfigure PHP with ssl?

    This is my configure command that I see from phpinfo()

    '/SourceCache/apache_mod_php/apache_mod_php-18.8/php/configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--with-apxs' '--with-ldap=/usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-mbregex' '--enable-dbx' '--enable-sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-path=/etc' '--sysconfdir=/private/etc' '--with-mysql=/usr' '--with-mysql-sock=/var/mysql/mysql.sock' '--without-pear'

    Please correct me if I'm wrong, but in order for me to be able to use fsockopen, do I need to reconfigure php with ssl?

    If so, could someone please post or write some easy to understand instructions on how to do this?

    Thank you so much!!!

    Smeshy

  • #2
    Regular Coder
    Join Date
    Jul 2007
    Location
    UK
    Posts
    223
    Thanks
    0
    Thanked 14 Times in 14 Posts
    ssl is a protocol and is used by web servers not php. You will have to enable ssl in apache in order to use it (I'm afraid I've never used it so don't know how, sorry).

    fsockopen does not require ssl, as far as I know.

  • #3
    New Coder
    Join Date
    Nov 2004
    Posts
    91
    Thanks
    1
    Thanked 0 Times in 0 Posts
    In that case, I do not have fsockopen enabled on my server. Does anyone know how I could go about getting this function enabled in php?

    Thank You!

    Smeshy

  • #4
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    If you are having a problem that results in an error, posting the actual error and the code that triggered the error is the quickest way of getting some direction in a Forum that will pinpoint and resolve your problem.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #5
    Regular Coder
    Join Date
    Jul 2007
    Location
    UK
    Posts
    223
    Thanks
    0
    Thanked 14 Times in 14 Posts
    I hate to point out the obvious but have you read the fsockopen page in the manual.

    Also, just a guess but could your hosting provider have disabled this function?

  • #6
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    If you are trying to do an fsockopen() using an ssl wrapper, you do need openssl support in PHP -
    The ssl:// and tls:// transports (available only when openssl support is compiled into PHP) are extensions of the tcp:// transport which include SSL encryption. Since PHP 4.3.0 OpenSSL support must be statically compiled into PHP, since PHP 5.0.0 it may be compiled as a module or statically.

    ssl:// will attempt to negotiate an SSL V2, or SSL V3 connection depending on the capabilities and preferences of the remote host. sslv2:// and sslv3:// will select the SSL V2 or SSL V3 protocol explicitly.

    Note: Because ssl:// is the underlying transport for the https:// and ftps:// wrappers, any context options which apply to ssl:// also apply to https:// and ftps://.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • Users who have thanked CFMaBiSmAd for this post:

    smeshy123 (08-30-2007)

  • #7
    New Coder
    Join Date
    Nov 2004
    Posts
    91
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Warning: fsockopen() [function.fsockopen]: no SSL support in this build in /Library/WebServer/alumni.redandblack.com/docs/phpmailer/class.smtp.php on line 106

    Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.gmail.com:465 in /Library/WebServer/alumni.redandblack.com/docs/phpmailer/class.smtp.php on line 106
    Message was not sent
    Mailer Error: SMTP Error: Could not connect to SMTP host.

    Those are the errors I am getting. The thing I need to do seems pretty obvious, I need to built php with SSL support. I am running on a local os x server. I do not know how to build php with SSL support, I was hoping that someone out there could post a link to good directions, or explain to me how I could go about doing that. I've searched all over and have been unable to find them.

    Thanks,

    Smeshy

  • #8
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    The www.php.net web page contains links to operating system specific sites. Here is the Mac OS X - http://www.entropy.ch/software/macosx/php/ one.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •