473,854 Members | 1,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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 5491
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******@NOSPAM betadome.com
(remove NOSPAM to contact me directly)
Feb 23 '07 #2
"Kim André Akerĝ" <ki******@NOSPA Mbetadome.comwr ote in message
news:54******** *****@mid.indiv idual.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******@NOSPAM betadome.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******@somew here.comwrote:
"Kim André Akerĝ" <ki******@NOSPA Mbetadome.comwr ote
>>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.comwro te in message
news:op.tn7ycqp rqnv3q9@misant. ..
keychain <so******@somew here.comwrote:
>"Kim André Akerĝ" <ki******@NOSPA Mbetadome.comwr ote
>>>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
responsibl e 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_reportin g(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
2383
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 got this error: "Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\test\_debug_tmp.php on line 3". I did some reading on the net and checked all my configuration, and it
0
2039
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
4170
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 in my browser. This test page just reads a table in mysql and outputs the results. Fatal error: Call to undefined function: mysql_connect() in /var/web/public/test.php on line 2 I'm using:
1
4006
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 out over 4000 emails. (Note that each email is customised so needs to be sent individually - not using Bcc). The application reported to have sent the 4000 emails successfully (it sends each one as part of a loop and then when completed gives a...
1
1972
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". Does anybody know where is problem? thanks in advance best regards P.
2
2708
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 code that is giving error: #ifdef HAVE_CONFIG_H
0
1959
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 following error org.xml.sax.SAXException: Fatal Error: URI=file:///E:/Personal/SMat/My%20Fav/We Services/axis/axis-1_4/samples/userguide/example3/MyService.wsdl Line=2: Conten is not allowed in prolog. at...
3
1831
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 More Specific i am Creating a C++ Object in a C file... this Giving me the error!!! :( can Any Body Please Help me
3
4162
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 in /home/oneowner/public_html/admincp/system_cls.php on line 0" Here is the URL of the website. http://www.oneownercar.com.au/index_20081120.php
0
9901
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11025
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10682
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10371
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9513
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4562
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4159
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3187
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.