Part of the EllisLab Network
   
 
XLM-RPC fread() bug
Posted: 04 January 2007 01:11 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  310
Joined  08-16-2006

fread() on line 652 of the XLM-RPC library will report “SSL: Fatal Protocol Error” when reaching the end of the data via an SSL stream.

To remedy this change this:

while($datum = fread($fp, 4096))
{
    $data
.= $datum;
}

to this:

while(!feof($fp))
{
    $data
.= fread($fp, 4096);
}

For the record the XLM-RPC library doesn’t currently support SSL. However the above change works for regular HTTP requests too.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66424 Total Logged-in Users: 35
Total Topics: 84775 Total Anonymous Users: 1
Total Replies: 454936 Total Guests: 270
Total Posts: 539711    
Members ( View Memberlist )