Welcome to Geeklog, Anonymous Friday, November 08 2024 @ 08:10 pm EST

Geeklog Forums

Blog plugin HTTP headers


Status: offline

jkyro

Forum User
Newbie
Registered: 06/17/06
Posts: 2
I recently installed the Blog plugin to 1.4.0sr1. I tried it with various clients, e.g. Flock and Performancing, to no avail. It seems like there is something wrong with the headers of the response, here's an Ethereal packet dump of the Geeklog response:
Text Formatted Code

Frame 42 (1237 bytes on wire, 1237 bytes captured)

Hypertext Transfer Protocol
    HTTP/1.1 200 OKrn
        Request Version: HTTP/1.1
        Response Code: 200
    Date: Sat, 17 Jun 2006 11:17:57 GMTrn
    Server: Apache/2.0.54 (Ubuntu) PHP/4.4.0-3ubuntu2rn
    X-Powered-By: PHP/4.4.0-3ubuntu2rn
    Content-Length: 886rn
    Keep-Alive: timeout=15, max=100rn
    Connection: Keep-Alivern
    Content-Type: text/html; charset=UTF-8rn
    X-Pad: avoid browser bugrn
    rn
Line-based text data: text/html
   
    <b>Warning</b>:  Header may not contain more than a single header, new line detected. in <b>*******/plugins/blog/include/xmlrpcs.inc</b> on line <b>303</b>
    <?xml version="1.0" encoding="iso-8859-1"?>
    <methodResponse>
    <params>
    <param>
    <value><array>
    <data>
    <value><struct>
    <member><name>url</name>
    <value>http://*******/index.php?topic=General</value>
    </member>
    <member><name>blogid</name>
    <value>General</value>
    </member>
    <member><name>blogName</name>
    <value>General News</value>
    </member>
    </struct></value>
    <value><struct>
    <member><name>url</name>
    <value>http://*******/index.php?topic=GeekLog</value>
    </member>
    <member><name>blogid</name>
    <value>GeekLog</value>
    </member>
    <member><name>blogName</name>
    <value>GeekLog</value>
    </member>
    </struct></value>
    </data>
    </array></value>
    </param>
    </params>
    </methodResponse>

 


So, it seems like the xmlrpc server can't insert correct headers and this somehow messes up the client. Could this be a problem with my Apache or PHP configuration? Both are Ubuntu stock. Anybody seen this?
 Quote

Status: offline

jkyro

Forum User
Newbie
Registered: 06/17/06
Posts: 2
OK, problem fixed. It appears that newer PHP versions don't allow multiple headers to be set in a single header() call, so i just replaced line 302 of xmlrpcs.inc with:

Text Formatted Code

Header("Content-type: text/xml",true);
header("Content-length: " . strlen($payload));

 
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Thanks for figuring it out. I was actually suspecting something like this but haven't had the time to look into it.

I guess it's time to finally switch the plugin to use the PEAR::XML_RPC class, now that we ship that with Geeklog anyway.

bye, Dirk
 Quote

Status: offline

DanGarion

Forum User
Newbie
Registered: 10/13/04
Posts: 12
Do both the files in the include folder need this fix? Also I changed my line 302 but I still seem to be having a problem. Is there an updated file version of this code posted somewhere?

I get this error once I changed back to the original files from version 1.1.0

Warning: Header may not contain more than a single header, new line detected. in /xxxxx/xxxx/xxxx/plugins/blog/include/xmlrpcs.inc on line 303
faultCode 103 faultString XML error: no element found at line 1
 Quote

Status: offline

DanGarion

Forum User
Newbie
Registered: 10/13/04
Posts: 12
Nevermind I figured it out.
 Quote

Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
Which Blog Plugin is this ? I can't find it..
Also Is there anything that allows some users to have a "Home page" or should the Blog plugin work well for that ?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by trampoline: Which Blog Plugin is this ? I can't find it..

It's the first hit if you search for "blog plugin", actually: Blog This!


Quote by trampoline: Also Is there anything that allows some users to have a "Home page" or should the Blog plugin work well for that ?

Sounds more like a job for the User Pages plugin (or maybe the Journal plugin).

bye, Dirk
 Quote

Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
I can't find User pages or Jornal Plugin's and I've done a search where are they ?
these sound like the thing !
Thanks...
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The Journal plugin is in the downloads area on this very site. The user pages plugin also goes by the name "upage" - see this thread.

Btw, are you using the forum search or the site-wide search (the one just below the Geeklog logo)?

bye, Dirk
 Quote

Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
Great I now have boh Upage and the journal plugin,
Upage does not work I keep getting this error below, and there seem to be no variables in config PHP, I have looked at the install instructions and followed to the letter.....
Warning: Unknown(/Library/WebServer/Communities/Documents/admin/plugins/upage/install.php): failed to open stream: Permission denied in Unknown on line 0

Warning: (null)(): Failed opening '/Library/WebServer/Communities/Documents/admin/plugins/upage/install.php' for inclusion (include_path='.:/usr/lib/php') in Unknown on line 0
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Sorry, never used that plugin myself so I can't help. But I've seen quite a few posts about it - try a search ...

bye, Dirk
 Quote

All times are EST. The time is now 08:10 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content