PortalParts.com Site

 Forum Index > Geeklog > Forum Plugin Support New Topic Post Reply
 problem with new instalation
 |  Printable Version
pinchnpaw
 January 20 2007 19:31 PM (Read 4416 times)  
Forum Newbie
Newbie


Status: offline

Registered: 01/20/07
Posts: 3

I have just installed forum version 2.6 RC3 on my website. I am currently running a newly updated Geeklog 1.4.1 that is performing great. The Forum install went flawlessly, and I could immediatly get to the admin. Created categories, added forums, and even did some story conversions to the forum. I can get into the forums as a user, but when I try and view a post, or start a new topic I get this error message.

2 - main(PHP/Compat.php): failed to open stream: No such file or directory @ MY DOCUMENT PATH/forum/include/gf_showtopic.php line 38

By looking at the gf_showtopic.php file I can see that this file has to do with calling the str_ireplace php function. Is this a path issue, or does it have to do with the way php is compiled on the server? I use a shared server, so I have no controle the php functions. Any thoughts would be greatly appreciated.

Chris :help:
webmaster@pinchnpaw.com
http://pinchnpaw.com


 
Profile Email PM
Quote
Blaine
 January 20 2007 20:06 PM  
Forum Admin
Admin

Status: offline

Registered: 03/01/02
Posts: 3576

The str_ireplace is a PHP5 function but a compatible function is provided by the PEAR library php_compat. I think you just need to update that pear library on your site.

http://pear.php.net/package/PHP_Compat


Please consider contributing to support my efforts ..
 
Profile Email Website PM
Quote
pinchnpaw
 January 21 2007 08:47 AM  
Forum Newbie
Newbie


Status: offline

Registered: 01/20/07
Posts: 3

Thanks for the Quick reply. It wasn't the problem, but you steered me in the right direction. Geeklog has all the needed functions in pear. It seems that it was a path problem. I was able to load compat.php by specifying the path in gf_showtopic.php, but it still wouldn't call the function without changing all the paths in compat.php.
to make a long story short I got around it by calling the function direct from gf_showtopic.php by commenting out the call by compat.php, and adding a direct call. I think this change should work with any geeklog configuration. That section of the file now looks like this.


if( !function_exists( 'str_ireplace' ))
{
// require_once( 'PHP/Compat.php' );
// PHP_Compat::loadFunction( 'str_ireplace' );
require_once $_CONF['path'] . 'system/pear/PHP/Compat/Function/str_ireplace.php';
}

include ($_CONF['path'] . 'system/lib-user.php');

so far it's working great. Hope this helps someone else that may run into this problem. Thanks for the great forum,

Chris
webmaster@pinchnpaw.com
http://pinchnpaw.com


 
Profile Email PM
Quote
pinchnpaw
 January 21 2007 09:57 AM  
Forum Newbie
Newbie


Status: offline

Registered: 01/20/07
Posts: 3

Being generally curious I had to find out why I had to make the changes I did. I figured that an issue like this would have come up before this, but nothing was mentioned. The problem was actually a combination of the php running on my server, and my actual config of geeklog. In geeklog config it gives you the option of using pear on the server, or pear that is in the geeklog release. Have pear=true in config must set the path to server pear. have pear=false must set the path to geeklog pear. I had it set to true, and everything worked fine until now. My servers php must not have the function str_ireplace. I changed the have pear setting in geeklog config, to false, and the origional gf_showtopic.php works fine. In some ways I feel stupid, in others proud. LOL I'm no expert at php, and I'm teaching myself a little at a time. It just keeps amazing me at how many ways you can skin a cat, and still wind up with a skinless cat. Nasty metaphor, but I guess it works. You may want to include something about this in your next document release. I'll tell you that I'm running on a Godaddy server, but no I don't run the canned geeklog that they supply, so someone else may run into this.
Thanks again for your help

Chris
webmaster@pinchnpaw.com
http://pinchnpaw.com


 
Profile Email PM
Quote
vas
 January 24 2008 07:55 AM  
Forum Newbie
Newbie

Status: offline

Registered: 01/24/08
Posts: 1

I have same problem, I tried this modification but still it is not working. By the by thare are 2 files with the same name one in plugins/forum/... and another in public_html/forum/.. I changed in both the places. But of no use. i downloaded 2.7 and installed. :help:


 
Profile Email PM
Quote
Content generated in: 0.22 seconds
New Topic Post Reply



 All times are CST. The time is now 11:22 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content