Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group forums not working? On a DV?

  • Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    I haven’t been able to get group forums up and running. Until now that is.

    If you have problems getting this up and running and you are on a Dedicated Virtual Server (DV) then you may need to edit the /etc/hosts file on your box. bp uses a goodie from sambauers that uses xmlrpc to talk to bbpress.

    The little goodie relies on a php lib called curl. curl goes out and gets some stuff from bbpress to find an xmlrpc connection endpoint to talk to. Well, curl relies on the operating system to tell it the ip address of the url we need to talk to. I want to connect to ‘ourcommoninterest.org/bbpress/’ in my case.

    To resove the host ‘ourcommoninterest.org’ into an ip address it first looks in my local /etc/hosts file. If it can’t find what it’s looking for then it goes out and uses dns to resolve the host name.

    Since I’m running on a dv my hosts file just contains a standard entry for my domain with an alias for ‘localhost’. It read:

    /etc/hosts

    127.0.0.1 ourcommoninterest.org localhost localhost.localdomain

    Evidently apache pays some attention to this hosts file but not much since it’s been resolving my domain name to the proper ip address all along and it’s only 127.0.0.1 to utils that run on the box.

    mu is a util that runs on the box if it is using the curl lib to GET results from an url. So sam’s goodie, mu and bp were being told by the curl lib that my domain didn’t exist. That the url I have bbpres setup at was 404. The curl, thru the hosts file thought my ip address was 127.0.0.1

    I went to tech support at my host and explained that I was using curl and getting 404s for valid urls on my domain. They explained that ‘well yah ya dummy’ the hosts file contains such and such and is returning so and so.

    I changed my hosts file to the following and everything is happy now.

    /etc/hosts

    127.0.0.1 localhost localhost.localdomain

    99.99.99.999 ourcommoninterest.org ourcommoninterest

    The 99′s are obviously not my actual ip address. curl goes out and finds my domain and my ip address and purrs merrily along.

    Don’t forget to keep the localhost line in there. Just add your ip/hostname to the list.

    If you want to know *way* more than you care to about the linux hosts file just google ‘linux hosts file’.

    Welcome to linux sysadmin 101. This is your first lesson Burt. Pay attention now.

    (can I go back to hacking my theme up again?)

Viewing 25 replies - 1 through 25 (of 32 total)
  • Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    So you’ve got the group forums working? Congrats and thanks for the how to! Going to try this out as soon as time permits.

    So do you do this in the cpanel or do you do this in a WP file

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    You only do it if group forums are not working for you and you are running on a dv. I don’t know how hosts other than Media Temple (mine) handle things. I can’t imagine it would be different though. They setup apache and all the operating system standard things for us and walk away. It’s a cookie cutter thing for them. They find what works for most of their customers.

    Most of their customers at mt probably aren’t running trunk mu, bbpress and bp. Anyway, you have to edit your /etc/hosts file from root. I don’t know anything about cpanel. I have plesk which is similar. The tech support guy had me playing in plesk and all I accomplished thru there was turning off my subdomains.

    I played in root with vi. If you can find a way to do this thru the dv backend, I’m sure loads of people would appreciate knowing about it.

    Perhaps one of the people who freelance and visit here frequently could enlighten us?

    (hint)

    Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    stix1972 – Media Temple uses Plesk so you are likely not affected by this, though it may be a similar problem at your host, which I presume isn’t Media Temple as they don’t use cPanel as far as I know.

    Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    burtadsit – Did you successfully integrate cookies as well or just users?

    Thanks, so it is on the Apache server. So we need to have the hosting site chage the host file. I can see if I can get in the backend bt I think that if it is on apache they will have to do it

    OK I think that will help out. Yes the forums are not working It always say error in posting.

    Yes I use A Small Orange. So I will contact them.

    Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    Tried this but still no luck. Back to the drawing board.

    Burtadsit, what method were you using to determine that it was 404′ing? I’m curious to test and see if I was/am receiving a 404 because that should help me pinpoint where the problem is.

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    @stix1972 No it has nothing to do with apache config in any way. The communications between bbpress and buddypress are xmlrpc. That’s why Andy has us flipping switches in bbpress for xmlrpc and pingbacks. Apache is not involved.

    The php curl library is what’s being used to find a link between bbpress and buddypress. This may not affect everyone. Matter of fact the xmlrpc stuff in wp and bbpress has 5 different ways of establishing a connection. It tries the curl method first. If curl is enabled on your site then it uses it.

    My problem wasn’t with the curl library. It was working fine doing what it was supposed to do. My problem was that my server, which I’m supposed to know how to config because I’m the sysadmin for it, was not configured to enable php to go out and do low level stuff based on the settings in the /etc/hosts file.

    Does that make any sense?

    Group forums wasn’t working and I knew I had it configured correctly. Then I went looking for a different reason. I knew the code was ok because it worked for other people just fine. I debugged down to find out the exact error that was causing a problem then tracked it down to the curl lib not being able to resolve the correct ip address.

    It was something in my environment other than bp and bbpress. The hosts file was it.

    If forums aren’t working for you then this might be the problem. Then again it might not. This setup between bp and bbpress depends on so many factors being right, it’s a miracle it works at all. I’m guessing that’s one reason xmlrpc has 5 different ways of talking. Never know what environment it’s gonna run in.

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    @stix1972 again. I have no idea how shared hosting works. I don’t know that you *can* modify the /etc/hosts file at all. Maybe they won’t let you. I dunno. I get to play with whatever I want on my server because I got the whole thing to myself. Well, virtually to myself. :)

    Anybody else running on a shared host and got forums up?

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    @gogoplata We may have the same host but are you on the Grid Server? Isn’t that shared? Talk to mt and explain the exact problem.

    OK. About the debugging. Gotta go pull up those files again and figure out what I did. I pulled the debug stuff out of some of them. Lemme go find that stuff and I’ll brb.

    OK. In bp forums code it winds up calling:

    discover_pingback_server_uri($url, $deprecated = 2048) which is in /wp-includes/comment.php

    In that function it calls:

    wp_remote_get( $url, array( ‘timeout’ => 10, ‘httpversion’ => ’1.1′ ) );

    Which is a new mu 2.7 thing and it lives in: /wp-includes/http.php

    That call finally resolves down to something low level in the WP_Http class which is the function:

    function request( $url, $args = array() )

    at line 261 is the selected transport mechanism obj making another low level call.

    This is the end of that request() function where I have some debug code.

    $response = array( ‘headers’ => array(), ‘body’ => ”, ‘response’ => array(‘code’, ‘message’) );

    foreach( (array) $transports as $transport ) {

    $response = $transport->request($url, $r);

    if( !is_wp_error($response) )

    //global $burt; if($burt) {echo ‘TRANS:’; var_dump($response); die();}

    return $response;

    }

    return $response;

    }

    This call is evidently used alot so I have that global there because I only want to trigger var_dump() when I’m going out looking for a pingback url which is what going in to the groups area does with the forums component turned on.

    (pausing for breath…)

    Up in comment.php I have a toggle for the $burt var. (I love that var). Line number 1249/1250 is this:

    //global $burt; $burt=true;

    $response = wp_remote_get( $url, array( ‘timeout’ => 10, ‘httpversion’ => ’1.1′ ) );

    Insert your fav var name there and in http.php and it only triggers when discover ping back whatever the hell it is, is called.

    Remember you asked.

    Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    Nah, I’m on a DV as well. I’ll probably just contact support and see if I can make any progress that way, though I need to try to pinpoint where it’s going wrong as all I know right now is the forums don’t work and that’s about it.

    Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    The hosts file can be edited through Plesk. You must be logged in as root then go to Virtuozzo->File Manager then navigate to /etc/hosts and you can edit it from there. That’s how I did it and can confirm it works, but make sure your changes stick. I modified it once and the server changed it slightly after saving which still prevented the forums from working but I re-edited as outlined above and it fixed my forum issues. Thanks!

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    @gogoplata wonderful! Glad to hear a forums success story once in awhile.

    I don’t have a File manager on my Virtuozzo menu, the only file managers are on each domain, and there is no etc/ directory, how do I reach that directory?

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    root. login as root with telnet.

    Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    Go to the AccountCenter and enable root access then login to plesk as root using the password you set and then there will be a file manager in Virtuozo.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Burt, I hope it’s okay to post this in this topic. I didn’t want to muck up the sticky so I figured this might be best?

    I did your debug trick, and this is what I got out of it…

    TRANS:array(3) {
    ["headers"]=>
    array(11) {
    ["date"]=>
    string(29) "Thu, 19 Feb 2009 06:38:04 GMT"
    ["server"]=>
    string(6) "Apache"
    ["cache-control"]=>
    string(62) "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
    ["expires"]=>
    string(29) "Thu, 19 Nov 1981 08:52:00 GMT"
    ["pragma"]=>
    string(8) "no-cache"
    ["x-pingback"]=>
    string(50) "http://delsolownersclub.com/discussions/xmlrpc.php"
    ["x-powered-by"]=>
    string(9) "PHP/5.2.8"
    ["set-cookie"]=>
    string(50) "PHPSESSID=3b8ae666f00ea382cab1706711f718d7; path=/"
    ["last-modified"]=>
    string(29) "Thu, 19 Feb 2009 06:38:05 GMT"
    ["transfer-encoding"]=>
    string(7) "chunked"
    ["content-type"]=>
    string(24) "text/html; charset=UTF-8"
    }
    ["body"]=>
    string(18499) [...]
    ["response"]=>
    array(2) {
    ["code"]=>
    int(404)
    ["message"]=>
    string(9) "Not Found"
    }
    }

    Now, the URL for x-pingback is valid, I know it is because I’m looking right at it now. I’m assuming that the 404 is for that file, responding back saying it can’t find it? Is it possible that my .htaccess is disallowing it? Hmm….

    WAIT I know what it is! Maybe… When I try to access that file directly, I get a redeclare error, something to do with IXR_IntrospectionServer. My guess is this deep integration business is causing it to be included twice…

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    SWEEET SUCCESSSSS!

    Okay… For those of that might be using “deep integration” namely using your BuddyPress/MU functions in bbPress, at the time of this writing at the top of your bb-config.php file, put…

    if ( !defined( 'ABSPATH' ) & !defined('XMLRPC_REQUEST')) {
    include_once( 'absolute/path/to/your/wordpressmu-directory/wp-blog-header.php' );
    }

    This way, it only tries to include the MU/BP functions if they haven’t already been defined and if it’s NOT a xmlrpc request!

    DUH! Yay! Burt, haha you rule…

    Avatar of Dfa327
    Dfa327
    Participant

    @dfa327

    You are a LIFESAVER!!!!! For sendmail I had my domain bound to 127.0.0.1. I changed it to the ip the domain maps to and BAM!!! THANK you SOOOOOO MUCH:)

    Avatar of Chad Holden
    Chad Holden
    Participant

    @holdench

    This sucks.

    PART 1 : I am installing this for a client on WAMP and have had no luck in getting the forums to work flawlessly. I can get the forum to be created though the group’s setup page, but the group cant post new topics to the forum. (or can they?)

    PART 2 : When I post something to the forum, it is closed instantly before I can view it. So the main page shows 5 posts, but none are actually in the forum when I click on it, it just gives me the main post a new topic.

    Any help with this sort of issue would be a blessing. John, how the hell did you get the forum working on yours.

    And BuddyPress people, do you use bbpress for this site as well??

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Haha I used one of my three wishes to make it work, so I’ve got two left. Burt is my genie. :D

    First things first. You need to use WPMU 2.7, BuddyPress RC1, and bbPress 1.0alpha6. Any other combination will result in a giant stress headache on your behalf for at least a few days.

    To address part 1: When you say that you haven’t gotten the forums to work flawlessly, are you speaking of integration, or alone? Obviously the first thing we need to have is a fully functioning bbPress installation before we can attempt to integrate them together.

    To address part 2: That is bizarre. When you say closed, do you mean the topic is marked as closed, or that when you submit the post that it just refreshes the page immediately back to the main front page?

    The BuddyPress forums are currently running the most stable version of bbPress in the 0.9 branch. The alpha’s have gone through some growing pains in the past few months, mostly due to pressure to make integration work with the rapidly changing WordPress.org updates. bbPress and BuddyPress are both going to get some major super mega awesome momentum this year however, so the next few weeks are going to be pretty fun. :D

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    PART 2: ‘it is closed instantly’ What does that mean? I’m hazy as to exactly what is happening.

    You create a group with a forum. The forum gets created because you can visit the bbpress side and see the new forum. You create a new topic in bp and what happens? Does the topic show up in bbpress?

    Can you create a topic in bbpress within that forum and have it show up in bp? What happens when you create topics and replies in a group forum on the bbpress side? They should show up in bp.

    Are you using deep integration?

    This is bbpress 0.9x here.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I beat you by 4 minutes. Too slow! :D

    Avatar of Chad Holden
    Chad Holden
    Participant

    @holdench

    John, I am using the VERSIONS of software that you suggested already and thought I had it working and was pretty excited until I ran into point 2.

    Point 1 : The same exact thing is happening when I ONLY use the forum part. I can create as many forums as I want, but any topic I post goes straight to a “This topic has been closed >> Back to …” no other message.

    I suppose this also addresses point #2.

    When you say that there will be a lot of action in the bbpress and buddypress realm, do you know this for a fact? Is this insider information? I want to use this for another client project that just came up, but cant do so until all bugs are worked out and the installation is more integrated.

    Thanks John and Burt for thinking about this one.

    I’m actually a bit fuzzy on what you mean by Deep integration Burt.

Viewing 25 replies - 1 through 25 (of 32 total)

The topic ‘Group forums not working? On a DV?’ is closed to new replies.