473,395 Members | 1,969 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.

"SSL: Fatal Protocol Error" with fsockopen()

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 for detecting and suppressing the warning yourself."

I have been unable to determine how to go about suppressing these warnings.
Any help would be greatly appreciated.
Feb 23 '07 #1
4 5455
keychain wrote:
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 for detecting and suppressing the warning yourself."

I have been unable to determine how to go about suppressing these
warnings. Any help would be greatly appreciated.
You can supress warnings by putting an @ directly in front of the
function name, like this:

$handle = @fsockopen("ssl://server.example.com", 443);

--
Kim André Akerĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Feb 23 '07 #2
"Kim André Akerĝ" <ki******@NOSPAMbetadome.comwrote in message
news:54*************@mid.individual.net...
keychain wrote:
>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 for detecting and suppressing the warning yourself."

I have been unable to determine how to go about suppressing these
warnings. Any help would be greatly appreciated.

You can supress warnings by putting an @ directly in front of the
function name, like this:

$handle = @fsockopen("ssl://server.example.com", 443);

--
Kim André Akerĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Kim, that's a great tip--thanks!

You can optionally use

error_reporting(0);

but this suppresses all warnings, which is obviously less desirable.
Feb 23 '07 #3
Rik
keychain <so******@somewhere.comwrote:
"Kim André Akerĝ" <ki******@NOSPAMbetadome.comwrote
>>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 for detecting and suppressing the warning yourself."

I have been unable to determine how to go about suppressing these
warnings. Any help would be greatly appreciated.

You can supress warnings by putting an @ directly in front of the
function name, like this:

$handle = @fsockopen("ssl://server.example.com", 443);

Kim, that's a great tip--thanks!

You can optionally use

error_reporting(0);

but this suppresses all warnings, which is obviously less desirable.
Supressing warnings is not the way to go. What if something else fails
then the thing you expected to fail? Just set display_errors to false in
your configuration (php.ini/http.conf/.htaccess/php-script itself) and log
them to a file. Certainly advisable for live projects. Just parse the
error log once in a while to check wether something odd is going on, or
check it when something is indeed off or it grows with an alarming pace.

And BTW, error_reporting can be set back offcourse:
$temp = error_reporting(0);
fsockopen();
error_reporting($temp);
--
Rik Wasmus
Feb 23 '07 #4
"Rik" <lu************@hotmail.comwrote in message
news:op.tn7ycqprqnv3q9@misant...
keychain <so******@somewhere.comwrote:
>"Kim André Akerĝ" <ki******@NOSPAMbetadome.comwrote
>>>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 for detecting and suppressing the warning yourself."

I have been unable to determine how to go about suppressing these
warnings. Any help would be greatly appreciated.

You can supress warnings by putting an @ directly in front of the
function name, like this:

$handle = @fsockopen("ssl://server.example.com", 443);

Kim, that's a great tip--thanks!

You can optionally use

error_reporting(0);

but this suppresses all warnings, which is obviously less desirable.

Supressing warnings is not the way to go. What if something else fails
then the thing you expected to fail? Just set display_errors to false in
your configuration (php.ini/http.conf/.htaccess/php-script itself) and log
them to a file. Certainly advisable for live projects. Just parse the
error log once in a while to check wether something odd is going on, or
check it when something is indeed off or it grows with an alarming pace.

And BTW, error_reporting can be set back offcourse:
$temp = error_reporting(0);
fsockopen();
error_reporting($temp);
--
Rik Wasmus
Rik, thanks for your reply.

It turns out that using @ before the fsockopen() function doesn't suppress
the aforementioned SSL warrning. I therefore need to use one of the
techniques you described, which for my purposes will probably be the latter.
Feb 23 '07 #5

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

Similar topics

2
by: inonzuk | last post by:
why strange you ask? here goes: I have been working with Php and Mysql for a week without any problems. Today I tried executing a php page that connects to mysql and creates a new database, I...
0
by: vincent wehren | last post by:
Hi, Trying to grasp Py_NewInterpreter()in a simple app embedding Python, I was wondering why the following gives me an error: int main() { PyThreadState *tstate; Py_Initialize();
5
by: Grant Nosbush | last post by:
I have searched the newsgroups and the web trying to solve this problem and just can't get it. Maybe someone will be able to help. I am getting the following error when I try to view a test page...
1
by: Dave Smithz | last post by:
Hi, My PHP application for a client uses the publicly available "PHPMailer - PHP email class" which is very good. However, my client recently complained about the following error when sending...
1
by: PS | last post by:
Hi I have project in old C++ (not .NET). I have prepared .dll in C++.NET for this old project. Project compile without any errors but after execution I got error "Fatal execution engine error"....
2
by: Praveen Chandra | last post by:
Hi, I am trying to build a static library, while building the library i am getting the following error: fatal error C1189: #error : "No sstream/strstream implementation" Following is the...
0
by: Raheemulla Khan | last post by:
i have created wsdl file by running the following url http://localhost:8080/axis4/services/MyService?wsdl next i run "c:\java org.apache.axis.wsdl.WSDL2Java MyService.wsdl" it is giving...
3
by: sachinv1821 | last post by:
hi , i am Getting this Error fatal error C1189: #error : "eh.h is only for C++!" my Problem is i am Having C++ librabry and Appropriate .h file i want to Access Them is .c File Files..... to Be...
3
by: mohsinews | last post by:
Hey, Hope you are all doing good. I am a new bee here. I have recently transfer a website from one hosting server to another and got the error message "Fatal error: Unable to read 4761 bytes...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.