WordPress.org

Ready to get started?Download WordPress

Forums

Buddypress-Ajax-Chat
Plugin not working : Fatal error (18 posts)

  1. anindyaray
    Member
    Posted 3 years ago #

    I'm testing this plugin on the localhost with xampp.
    with :
    PHP Version 5.2.9
    Wordpress 3.0.1
    Buddypress 1.2.5.2

    but the plugin is not working and is displaying a fatal error :
    __________________________________________________________________
    Fatal error: Call to a member function getName() on a non-object in C:\xampp\htdocs\jiyobangla\wp-content\plugins\buddypress-ajax-chat\bp-chat\chat\lib\class\AJAXChat.php on line 124
    __________________________________________________________________
    any solutions ?

      I cannot install it on the live site as it is not working in localhost.

    http://wordpress.org/extend/plugins/buddypress-ajax-chat/

  2. dfa3272008
    Member
    Plugin Author

    Posted 3 years ago #

    This looks like an old bug. Are you using the latest code version of chat? Can you please confirm to me the version?

    Thanks,
    Dave

  3. dfa3272008
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    I just installed xampp, wordpress 3.0.1, buddypress 1.2.5.2 and chat 1.3.3 on my local machine and it worked flawlessly.

    However, I did see an issue with how I handled db name, username, passwords, etc in the config file so if you had any of these with a $ in them, then yes it would break! So I'm betting that's the issue for you. Please let me know if 1.3.4 works for you.

    Thanks,
    Dave

  4. Poisony
    Member
    Posted 3 years ago #

    I got the EXACT same problem as AnindyaRay!

    "Fatal error: Call to a member function getName() on a non-object in C:\xampp\htdocs\twitt\wp-content\plugins\buddypress-ajax-chat\bp-chat\chat\lib\class\AJAXChat.php on line 124"

    Please help us dfa3272008 :P

  5. alex_clmx
    Member
    Posted 3 years ago #

    I had the same problem when updating the plugin has a fatal error. Please check what happens.

  6. abdeslam
    Member
    Posted 3 years ago #

    I got the EXACT same problem as AnindyaRay!
    my system ubuntu lucid
    PHP Version 5.3.2-1ubuntu4
    Server API CGI/FastCGI (php-fpm module)
    webserver nginx

    WordPress 3.0.1
    Buddypress 1.2.5.2
    ajaxchat 1.3.4 and i had this problem with 1.3.3

    Fatal error: Call to a member function getName() on a non-object in /home/public_html/mydomain.com/public/wp-content/plugins/buddypress-ajax-chat/bp-chat/chat/lib/class/AJAXChat.php on line 124

    please help and many many thanks

  7. dfa3272008
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    I'm pretty sure there is something I haven't seen as few people have complained about this. I'd love to get in there and see what's up.

    Did it make the bp-chat/config files? Did it make the right choices inside for the db, user, password stuff?

  8. anindyaray
    Member
    Posted 3 years ago #

    I have checked with ajaxchat 1.3.4 , and it too crashed

  9. abdeslam
    Member
    Posted 3 years ago #

    hi @ all

    no its working ,,, myself i had other problem , i reinstalled PHP , it work now , in dont undestand why and how!!!!

    but and i habe now PHPIDS installed (Intrusion Detection For PHP Applications With PHPIDS),
    _____ wordpress all my otheres modules work perfect ,,,_____

    only ajax chat daoesnt work .i get following errorss on frontpage:::

    Total impact: 7
    Affected tags: xss, csrf, id, rfe, lfi

    Variable: COOKIE.ajax_chat_settings | Value: bbCode=true&bbCodeImages=true&bbCodeColors=true&hyperLinks=true&lineBreaks=true&emoticons=true&autoScroll=true&maxMessages=0&dateFormat=(%25H%3A%25i%3A%25s)&persistFontColor=false&fontColor=null&audio=true&audioVolume=1&soundReceive=sound_1&soundSend=sound_2&soundEnter=sound_3&soundLeave=sound_4&soundChatBot=sound_5&soundError=sound_6&blinkInterval=500&blinkIntervalNumber=30
    Impact: 7 | Tags: xss, csrf, id, rfe, lfi
    Description: Detects unknown attack vectors based on PHPIDS Centrifuge detection | Tags: xss, csrf, id, rfe, lfi | ID: 67

    Centrifuge detection data
    Threshold: ---
    Ratio: ---
    Converted: ((++:

    Centrifuge detection data
    Threshold: ---
    Ratio: ---
    Converted: ((++:

    and this from nginx error file::::

    public_html/mydomain.com/public/wp-content/plugins/buddypress-ajax-chat/bp-chat/chat/lib/class/CustomAJAXChat.php on line 193" while reading upstream, client: 192.168.1.2, server: 192.168.1.2, request: "GET /wp-content/plugins/buddypress-ajax-chat/bp-chat/chat/index.php?channel=Public HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.2", referrer: "http://192.168.1.2/members/abdeslam/chat/"

    and this from PHPIDS log files:::

    "192.168.1.2",2010-09-02T13:09:49+02:00,7,"xss csrf id rfe lfi","COOKIE.ajax_chat_settings=bbCode%3Dtrue%26bbCodeImages%3Dtrue%26bbCodeColors%3Dtrue%26hyperLinks%3Dtrue%26lineBreaks%3Dtrue%26emoticons%3Dtrue%26autoScroll%3Dtrue%26maxMessages%3D0%26dateFormat%3D%28%2525H%253A%2525i%253A%2525s%29%26persistFontColor%3Dfalse%26fontColor%3Dnull%26audio%3Dtrue%26audioVolume%3D1%26soundReceive%3Dsound_1%26soundSend%3Dsound_2%26soundEnter%3Dsound_3%26soundLeave%3Dsound_4%26soundChatBot%3Dsound_5%26soundError%3Dsound_6%26blinkInterval%3D500%26blinkIntervalNumber%3D30","%2Fwp-content%2Fplugins%2Fbuddypress-ajax-chat%2Fbp-chat%2Fchat%2F%3Fajax%3Dtrue%26lastID%3D0","192.168.1.2"

    whats happen hier ??? please help

  10. anindyaray
    Member
    Posted 3 years ago #

    Its wordking fine in my live site , plain and simple .... only dragging the shoutbox is not wordking .... its not a matter ... I have disbaled the shoutbox site wide .........

    I don't know if it breaks rule of the forum .... I am asking this question as buying the plugin, related information was mentions in the plugin page's faq

    To
    The Developer @dfa3272008

    I am feeling to buy the adsense free chat .... can you clearify the procedure in detail ....
    whom to contact , how to contact , how much to pay , etc.

    my email address would be swabandhab@gmail.com

  11. dfa3272008
    Member
    Plugin Author

    Posted 3 years ago #

    The instructions for getting the ads removed are clear and are in the readme.txt :)

    The dragging of the shoutbox fails most likely due to a javascript error. Check Firefox's error console to see what is failing.

  12. open flips
    Member
    Posted 3 years ago #

    Please have a look at the related topic (Buddypress-Ajax-Chat – Plugin not working : Fatal error) on buddyppress.org.

    I think the problem occurs on local machines not using whosts (accessing bp via http://localhost/...)

    The plugin does not seem to create the right cookies (as seen on live servers).

    Please see the Cookies on localhost with explicit domain topic, it might be related.

    @dfa3272008 I hope you will be able to help us on this. It is really annoying not being able to use the plugin on dev setups.

    Thanks

  13. open flips
    Member
    Posted 3 years ago #

    Hi @dfa3272008,

    The 1.3.6 changelog of the plugin shows "Added cookie code to allow both localhost installs as well as remote name domain installs"

    The problem still occurs, could you please help us on this ?

    What changes did you do ? How should we use the plugin on local machines... ?

    Thanks a lot

  14. dfa3272008
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    Hmm, I tried it on xampp on windows and real server and both worked fine. I used Firefox to check the cookie creation as well.

    Here's the new code:

    from bp-chat.php -> setupChatCookies()
    ...
    $domain = ($_SERVER['SERVER_NAME'] != '127.0.0.1') ? $_SERVER['SERVER_NAME'] : false;
    $path = ($_SERVER['SERVER_NAME'] != '127.0.0.1') ? '/' : false;

    setcookie("loggedin_user_fullname", $bp_chat_username, time()+90000,$path, $domain);
    setcookie("loggedin_user_id", $bp->loggedin_user->id, time()+90000,$path, $domain);
    setcookie("loggedin_user_role", $role, time()+90000,$path, $domain);
    setcookie("xml_logout_url", $bp_chat_logout_url, time()+90000,$path, $domain);

    If it still fails for you perhaps you could try a test?
    Make a new file called test.php
    then echo $_SERVER['SERVER_NAME'] in it with php tags wrapped around it. If it is not 127.0.0.1, then I need to know what, in order to get you the code you need. HTTP_HOST isn't always reliable, but SERVER_NAME is.

    Thanks,
    Dave

  15. open flips
    Member
    Posted 3 years ago #

    Thanks for this quick reply Dave,

    of course... when I work on http://localhost/buddypress/, $_SERVER['SERVER_NAME'] contains 'localhost'.

    I propose the following :

    $domain = (gethostbyname($_SERVER['SERVER_NAME']) != '127.0.0.1') ? $_SERVER['SERVER_NAME'] : false;

    $path = (gethostbyname($_SERVER['SERVER_NAME']) != '127.0.0.1') ? '/' : false;

    Of course I could change my habit of using localhost instead of 127.0.0.1, but I guess I'm not the only one :-)

    Feel free to do whatever you think it's better. You're the boss :)

    Thanks,
    flips

  16. dfa3272008
    Member
    Plugin Author

    Posted 3 years ago #

    Awesome job flips:)

    I just checked in the fix 1.3.7. Darn DNS tricked me up. I have it coded that 127.0.0.1 and localhost will now not use the domain and tested it on windows/xampp as well.

    Enjoy,
    Dave:)

  17. open flips
    Member
    Posted 3 years ago #

    Thanks Dave, this topic can be marked as resolved.

    PS. Please have a look at Chat on member page redirects to home page (frontpage) Cheers.

  18. rockyteng
    Member
    Posted 3 years ago #

    really response quick,great work!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic