Posted on: 08/13/10 04:25pm
By: Anonymous (phyre)
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
Re: Forum error with new install
Posted on: 08/13/10 04:46pm
By: Dirk
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
Re: Forum error with new install
Posted on: 08/13/10 04:58pm
By: Anonymous (phyre)
What should I copy and where to?
Re: Forum error with new install
Posted on: 08/13/10 05:20pm
By: Dirk
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
Re: Forum error with new install
Posted on: 08/13/10 05:32pm
By: Anonymous (phyre)
Works now. Thanks for the help!
Re: Forum error with new install
Posted on: 08/14/10 01:32am
By: Anonymous (phyre)
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"
}
Re: Forum error with new install
Posted on: 08/14/10 03:21am
By: 1000ideen
Do you see the few "//" double backslashes? Did you get the settings right in the configuration concerning URL etc?
Re: Forum error with new install
Posted on: 08/14/10 11:27am
By: Anonymous (phyre)
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.
Re: Forum error with new install
Posted on: 08/14/10 11:42am
By: Dirk
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
Re: Forum error with new install
Posted on: 08/14/10 11:53am
By: Anonymous (phyre)
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"
}
Re: Forum error with new install
Posted on: 08/14/10 12:07pm
By: Dirk
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
Re: Forum error with new install
Posted on: 08/14/10 12:57pm
By: Anonymous (Phyre)
Yup. That seemed to fix it.
Re: Forum error with new install
Posted on: 09/03/10 08:56am
By: jmucchiello
Quote by: DirkThe 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?