473,395 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

fsockopen via ssl

I'm having issues attempting to create an ssl connection using
fsockopen. my code contains the following line .

fsockopen("ssl://siteaddr",993,$errno,$errmsg,20);

error message reported:
Error: unable to connect to ssl://server.name.tld:993

When i tail the logs on the remote machine i see no connection attempts
from the web server. it appears to die before attempting to make a
connection attempt.

phpinfo indicates:

php version : 4.3.3 (win32)
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7b 10 Apr 2003

Googling reveals , the following threads regarding the use of this dll
php4ts.dll , instead of the php_openssl.dll. When i restart apache with
the php4ts.dll loaded, i receive errors stating its not a php binary.

http://p2p.wrox.com/topic.asp?TOPIC_ID=8873
http://www.php.net/manual/en/wrappers.php (last comment on this page).

any help would be appreciated.
Thanks
--
_______ - ----------------------------------------------/-//- -
|: | (_) o jesse @ jesseward . com
|. |____ __
| | :|(__) www . jesseward . com
|_______| .| - -------------------------- -- - - -
|_____|
Jul 17 '05 #1
5 3407

"Jesse" <je*****@SPAMjesseward.com> wrote in message
news:10***************@nws01ykf.rim.net...
I'm having issues attempting to create an ssl connection using
fsockopen. my code contains the following line .

fsockopen("ssl://siteaddr",993,$errno,$errmsg,20);

error message reported:
Error: unable to connect to ssl://server.name.tld:993

When i tail the logs on the remote machine i see no connection attempts
from the web server. it appears to die before attempting to make a
connection attempt.

<snip>

Starting from the beginning - is there a listening port 993 open on
server.name.tld? Can you connect with anything else (even good old Telnet)?

Garp
Jul 17 '05 #2
Jesse <je*****@spamjesseward.com> wrote:
fsockopen("ssl://siteaddr",993,$errno,$errmsg,20);

error message reported:
Error: unable to connect to ssl://server.name.tld:993

phpinfo indicates:

php version : 4.3.3 (win32)
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7b 10 Apr 2003


Can you say _OLD_. There have been quite a couple of vunerablilities in
openssl since.

<q src='http://www.php.net/manual/en/transports.php'>
The ssl:// and tls:// transports (available only when openssl support is
compiled into PHP) are extensions of the tcp:// transport which includes
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.
</q>

Since you are using a dll it's not compiled into php (hence no static),
so according to the reference you are getting the correct behavior :)

--

Daniel Tryba

Jul 17 '05 #3
Garp wrote:
Starting from the beginning - is there a listening port 993 open on
server.name.tld? Can you connect with anything else (even good old Telnet)?

Garp


connection to the remote server is fine via stunnel or openssl on port
993, server is actively taking connections.

Thanks,

--
_______ - ----------------------------------------------/-//- -
|: | (_) o jesse @ jesseward . com
|. |____ __
| | :|(__) www . jesseward . com
|_______| .| - -------------------------- -- - - -
|_____|
Jul 17 '05 #4
Daniel Tryba wrote:
Can you say _OLD_. There have been quite a couple of vunerablilities in
openssl since.
old really isnt an issue, as this is an app run behind a corporate
firewall. With limited outbound, and *no* inbound access from the
outside world.
<q src='http://www.php.net/manual/en/transports.php'>
The ssl:// and tls:// transports (available only when openssl support is
compiled into PHP) are extensions of the tcp:// transport which includes
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.
</q>


now the question is , how can i find a pre-built win32 binary with ssl
compiled in?

Thanks,
--
_______ - ----------------------------------------------/-//- -
|: | (_) o jesse @ jesseward . com
|. |____ __
| | :|(__) www . jesseward . com
|_______| .| - -------------------------- -- - - -
|_____|
Jul 17 '05 #5
Jesse <je*****@SPAMjesseward.com> wrote in message news:<10***************@nws01ykf.rim.net>...
<snip>
now the question is , how can i find a pre-built win32 binary with ssl
compiled in?


Source: <http://www.php.net/manual/en/wrappers.php>

To get the https wrapper working on Windows,
you need to replace your php4ts.dll with the
one provided at
http://ftp.proventum.net/pub/php/win32/misc/openssl/.
This is instead of using the php_openssl.dll,
so be sure to comment this extension in your php.ini.
^^^^^^^^^^^^^^^^^^

HTH

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris | last post by:
Hi All, I've been puzzling over this, but can't find a satisfactory answer anywhere. I'm not sure if the problem is in my code, or if it's something to do with the PHP/Apache set-up (probably...
2
by: Loopy | last post by:
I'm trying to write a script that will connect to an external site so that I can get access referer information in a database on another one of my sites. I got errors, so I tried to write a script...
9
by: fipaj1992 | last post by:
Hi! I have very big problem with fsockopen() function. It is very important... That's code: <?php $test = fsockopen ('chrome.pl', '8080'); ?>
6
by: murd | last post by:
Hi, I am trying to complete a post using fsockopen but I'm getting the following error: "Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? I am...
1
by: Syl | last post by:
Hi group - I have a database table with 4 columns that hold a url. I am selecting each url and I need to check to see if it is valid. I assumed I could use the fsockopen command. I've had to...
8
by: Yoko | last post by:
So I am using php version 4.3.9 and lets say i have a file on the server called tester.php so i am using fsockopen to point to that file but it gives me a error below. $fh =...
4
by: keychain | last post by:
I'm experience the infamous "SSL: Fatal Protocol Error" bug with Apache 2.x According the fopen() documentation: "If you are using fsockopen() to create an ssl:// socket, you are responsible...
6
by: henryrhenryr | last post by:
Hi I'm really hoping for some ideas! I have been setting up phpmailer on my server and it was working nicely on my local server so I uploaded to my live server and tested. The mystery is that...
0
by: smokenlinks | last post by:
I am working on a script and i get this error Warning: fsockopen() : unable to connect to https://www.alertpay.com:443 (Unable to find the socket transport "https" - did you forget to enable it...
5
by: aswathip | last post by:
I am new to sockets and fsockopen(). I am trying to send SMS using a gateway. But the fsockopen always shows the following error. Warning: fsockopen() : unable to connect to alertbox.in:80 (A...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.