Register a domain and help support LQ
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-29-2010, 12:20 PM   #1
Senior Member
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,045
Blog Entries: 1

Rep: Reputation: 83
php/HttpRequest/https: A TLS packet with unexpected length was received


I'm working on an application that makes http requests using HttpRequest and it's been doing what I need so far without a problem. Now I need to make https requests as well and when I try to make the request, i get this error message:

Fatal error: Uncaught exception 'HttpInvalidParamException' with message 'Empty or too short HTTP message: ''' in /home/antoranz/waneesia/html/index.php:0 inner exception 'HttpRequestException' with message 'SSL connect error; gnutls_handshake() failed: A TLS packet with unexpected length was received. (' in /home/antoranz/waneesia/html/index.php:104 Stack trace: #0 /home/antoranz/waneesia/html/index.php(0): HttpRequest->send() #1 {main} thrown in /home/antoranz/waneesia/html/index.php on line 0
What's going on?

The project:

Thanks in advance
Old 05-30-2010, 06:40 AM   #2
Registered: Nov 2007
Posts: 113

Rep: Reputation: 16
Dunno if this may help...

I had this happen the other day to me, the solution I found was to use NSS
instead of gnutls. I don't know if this is a bug in gnutls itself or our
usage of it.
Others suggest using cURL instead of HttpRequest...


https, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected "Unsupported protocol: HTTPS" error in Apache/PHP/curl bions Linux - Server 6 11-29-2010 10:51 AM
received UDP packet length sasubillis Linux - Software 1 02-12-2010 07:57 AM
packet queue length question vlyamtse Linux - Networking 4 10-08-2009 12:29 AM
Bad Packet Length 1349676916 satishp Linux - Software 1 07-16-2007 12:21 PM
problem in received packet linux_lover2005 Programming 2 04-24-2005 08:33 PM

All times are GMT -5. The time now is 09:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration