Welcome to Geeklog, Anonymous Tuesday, March 19 2024 @ 03:10 am EDT

Geeklog Forums

Forum error with new install


phyre

Anonymous
Just installed the latest version of geeklog. Then installed forum. After creating a category I get and then trying to post new to it I get the following error:

An error has occurred:

(This text is only displayed to users in the group 'Root'Wink

2 - main(PHP/Compat.php) [function.main]: failed to open stream: No such file or directory @ /testsite.com/forum/include/gf_showtopic.php line 44
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Geeklog no longer ships with the PHP_Compat PEAR package, but the forum still requires it. You could download the package from pear.php.net or extract it from an older Geeklog release (1.5.x, under system/pear).

bye, Dirk
 Quote

phyre

Anonymous
What should I copy and where to?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If you take it from an old Geeklog release, copy the entire system/pear/PHP subdirectory into the same place on your current install.

bye, Dirk
 Quote

phyre

Anonymous
Works now. Thanks for the help!

 Quote

phyre

Anonymous
Now I'm having an issue when I try to edit:



Welcome to testserver, Admin
Saturday, August 14 2010 @ 01:28 AM EDT


» Rental Community Integrity Ordinance No. 2457» Crime Reports » Around Town » Testing» Catch All


Warning: Cannot modify header information - headers already sent by (output started at /testserver.com/forum/include/gf_format.php:58) in //testserver.com//lib-common.php on line 6774

Warning: Cannot modify header information - headers already sent by (output started at //testserver.com//forum/include/gf_format.php:58) in //testserver.com//lib-common.php on line 6775
An error has occurred:

(This text is only displayed to users in the group 'Root'Wink

2 - Cannot modify header information - headers already sent by (output started at //testserver.com//forum/include/gf_format.php:58) @ //testserver.com//lib-common.php line 2838

array(1) {
["url"]=>
string(39) "createtopic.php?method=edit&id=7&page=1"
}
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Do you see the few "//" double backslashes? Did you get the settings right in the configuration concerning URL etc?
 Quote

phyre

Anonymous
No, the // was right - I edited it here before posting and put in the extra. The problem is coming from something else.

The forum seems to be working except for the ability to edit.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Ironically, what seems to be happening here is that Geeklog's error handler is obscuring the report of the actual problem. There was a similar discussion recently, but for whatever reason, the people involved in it didn't want to try what I suggested to get to the bottom of the problem ...

Open your lib-common.php, go to line 6774 (as indicated in the errors you posted). Comment out these two lines:
Text Formatted Code
            header('HTTP/1.1 500 Internal Server Error');
            header('Status: 500 Internal Server Error');

Then try editing again. It still won't work, but at least then you should get the actual error message. Post it here, please.

bye, Dirk
 Quote

phyre

Anonymous
After editing lib-common.php



Welcome to 75160, Admin
Saturday, August 14 2010 @ 11:49 AM EDT


» Rental Community Integrity Ordinance No. 2457» Crime Reports » Around Town » Testing» Catch All

An error has occurred:

(This text is only displayed to users in the group 'Root'Wink

2 - Cannot modify header information - headers already sent by (output started at /testserver.com/forum/include/gf_format.php:58) @ /testserver.com/lib-common.php line 2838

array(1) {
["url"]=>
string(39) "createtopic.php?method=edit&id=7&page=1"
}
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Ah, I see the problem now.

Go to line 2838 in lib-common.php and comment out the line
Text Formatted Code
header('Content-Type: text/html; charset=' . COM_getCharset());


Then go back to line 6774 and uncomment the two header() calls there (so that they are active again). Things should work then.

The header() call in line 2838 was only introduced in Geeklog 1.7.0. It assumes that plugins follow Geeklog's standard mode of operation, which is to collect all output in a string variable first and only echo it out at the end of the script. Unfortunately, the forum doesn't do that. When editing, it echos out a site header, then changes its mind and does a redirect with the COM_refresh() function. But sending a header after you've already echoed out something is not allowed, hence the problem you were having.

Commenting out the header() call in line 2838 brings things back to how they were before Geeklog 1.7.0, which isn't really a problem. The forum should really be changed to not echo out things too early, though, for the above and a couple of other reasons ...

bye, Dirk
 Quote

Phyre

Anonymous
Yup. That seemed to fix it.
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Quote by: Dirk

The header() call in line 2838 was only introduced in Geeklog 1.7.0. It assumes that plugins follow Geeklog's standard mode of operation, which is to collect all output in a string variable first and only echo it out at the end of the script.


Geeklog really shouldn't make that assumption. There are sometime legitimate reasons to send data to the browser piecemeal. At worst it should be documented that you can't call certain function if you need to send data in chunks rather than all at once. Perhaps a Feature Request/bug report is needed for this?
 Quote

All times are EDT. The time is now 03:10 am.

  • 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