08-27-2007, 09:32 PM
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!!!
08-27-2007, 11:58 PM
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.
08-29-2007, 06:24 PM
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?
08-29-2007, 06:31 PM
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.
08-29-2007, 06:31 PM
I hate to point out the obvious but have you read the fsockopen page in the manual (http://uk3.php.net/manual/en/function.fsockopen.php).
Also, just a guess but could your hosting provider have disabled this function?
08-29-2007, 06:43 PM
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://.
08-29-2007, 08:49 PM
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.
08-29-2007, 09:55 PM
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.