Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 11:44 am EST
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'
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
An error has occurred:
(This text is only displayed to users in the group 'Root'
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
12
25
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
bye, Dirk
11
10
Quote
phyre
Anonymous
What should I copy and where to?
14
15
Quote
phyre
Anonymous
Works now. Thanks for the help!
12
9
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'
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"
}
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'
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"
}
14
8
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.
The forum seems to be working except for the ability to edit.
9
11
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:
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
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
10
10
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'
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"
}
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'
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"
}
11
10
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
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
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
9
9
Quote
Phyre
Anonymous
Yup. That seemed to fix it.
7
13
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?
13
9
Quote
All times are EST. The time is now 11:44 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