Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

PHP Fatal error

10 years 3 months ago
  • Michel's Avatar
    Topic Author
  • Michel
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi!
My site is under development and it was going ok but now I can't get access to the Jomsocial admin interface at all. 500 Internal error. I can normally get access to other components by admin side, only Jomsocial is faulty.

So I made a search and found another thread where you already solved the same problem, with exactly the same Fatal Error. No explanations on how you make it working.

Here is the thread : [url=http://]http://www.jomsocial.com/forum/installation/12474-solved-error-message-after-installation-is-done-with-3-101[/url]

The error is -> PHP Fatal error: Using $this when not in object context in com_community/libraries/cadminactivity.php on line 357

Could you tell me what you did to solve the problem or where I should look to find a solution to this.

Is it possible that it is a plugin or a module misconfig?

Thanks!

Php version is PHP 5.5.9-1~dotdeb.1
Mariadb 5.5 and Nginx 1.2.1
Joomla 3.2.2
Jomsocial should be 3.1.0.4, cannot check if the update has passed correctly.

++++++++++++++++++++++++++++++++++++=

10 years 3 months ago
  • Chris's Avatar
  • Chris
  • Visitor
  • Thank you received: 0
Licenses:

Hi Michel.

Please try to upload this file to /administrator/com_community\libraries\cadminactivity.php


This attachment is hidden for guests.
Please log in or register to see it.

This message has an attachment file.
Please log in or register to see it.

10 years 3 months ago
  • Michel's Avatar
    Topic Author
  • Michel
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Chris,

I got different Fatal Error after I've uploaded this attached file:

PHP Fatal error: Cannot redeclare class CommunityModelGroups in /site/front/end/components/com_community/models/groups.php on line 15

Thanks :-)

Michel

+++++++++++++++++++++++++++++++++=

10 years 3 months ago
  • Chris's Avatar
  • Chris
  • Visitor
  • Thank you received: 0
Licenses:

Hi Michel.

I'm very sorry, but your back-end does't loads for me, also did you upgrade to the latest version of JS first ?(3.1.0.4)

10 years 3 months ago
  • Michel's Avatar
    Topic Author
  • Michel
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Chris,

Yes I did upgrade to 3.1.0.4 and everything went ok during the whole installation that I did twice in fact. I also opened the package and the file there is exactly the same I have online.

I found I can get access normaly to the admin of Jomsocial when I modify the same file at line 6 where I deleted the word "static" in the class, leaving unmodified the original line #357. I read that $this doesn't work in static context so I tried to get rid of it and then I could access the JS admin.

I am a sys and network admin, not a programmer so I don't know what could be the colateral effects on the whole code.

Concerning the access to the back-end, I learned the hard way that I will never again give root or any back-end access to my servers/sites.

So, may be you don't agree with that "philosophy", but I hope that you will accept to continue to help me.

Thanks again,

Michel

++++++++++++++++++++++++++++++++++++=

10 years 3 months ago
  • Michel's Avatar
    Topic Author
  • Michel
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Licenses:
JomSocial Expired

So no more support for me :-(

10 years 2 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Michel,

We are sorry for delay asnwer, we was on holiday yesterday..

Anyway, can you provide us the FTP access please? So I can fix your issue.

thank you

10 years 2 months ago
  • Michel's Avatar
    Topic Author
  • Michel
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi!

Sorry but I never install FTP on my servers because, to my point of view, it is the most unsecure protocol.

So my problem (no access to the admin side of JS only) came from this error:

PHP Fatal error: Using $this when not in object context in /admin/side/com_community/libraries/cadminactivity.php on line 357

Chris sent me a file (cadminactivity.php) that modified the line #357, with no $this string. I synchronized the site. It doesn't work.

After that, I found that in PHP the string "$this" doesn't work in static context.

So I modified the line #6 where the function is declared as "public static function" and I deleted the word static, gave it a try and then I could get access to the admin side of Jomsocial.

With my system's config I get a 500 error but on a basic Apache/PHP config the result could be something like a blank page.

debian 7.4
PHP-FPM 5.5.9-1~dotdeb.1
Mariadb 5.5
Nginx 1.2.1
Joomla 3.2.2
Jomsocial 3.1.0.4

The other installed packages are: Akeeba backup, Admin Tools, ACL manager, EasyBlog, EasyDiscuss, Komento, Yootheme Warp 7 template, all latest version.

And everything is working pretty well but JS on admin side.

Do you have enough information to send me another patch or tell me what to do?

Thanks!

Michel

++++++++++++++++++++++++++++++++++++++=

10 years 2 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Michel,

I see, quick fix, please you change code line #357 in cadminactivity.php to this code :

$groupsModel = CFactory::getModel('groups');

10 years 2 months ago
  • Michel's Avatar
    Topic Author
  • Michel
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Dimas,

Now I get this error:

"PHP message: PHP Fatal error: Cannot redeclare class CommunityModelGroups in /var/www/components/com_community/models/groups.php on line 15"

Thanks.

Michel

++++++++++++++++++++++++++++++++=

10 years 2 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

ah that is different issue, actually that issue will be fixed in 3.2..

because you cant provide me the FTP access, so please you download this link www.dropbox.com/s/7ofdlzgj6gww8sd/admini....1.update.190214.zip , extract it and copy-paste to administrator/components/com_community/

10 years 2 months ago
  • Michel's Avatar
    Topic Author
  • Michel
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Licenses:
JomSocial Expired

Thanks Dimas,

I did exactly what you told me to do, but I get another error this time:

"PHP message: PHP Fatal error: Call to undefined method CommunityModelGroups::getPendingGroups() in /var/www/administrator/components/com_community/community.php on line 192" while reading response header from upstream

Thanks again

Michel

+++++++++++++++++++++++++++++++++=

10 years 2 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

I see, I forgot to add the community file, please you download it from here www.dropbox.com/s/cujhkhzo53fq73n/community.php and copy-paste to /var/www/administrator/components/com_community/

thx

10 years 2 months ago
  • Michel's Avatar
    Topic Author
  • Michel
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Dimas,

Everything is working fine now.

Excellent job! Thank you very much.

The ticket can be closed.

Michel

+++++++++++++++++++++++++++++++++=

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW