PHP Fatal error - Flag module

Events happening in the community are now at Drupal community events on www.drupal.org.
gorgo's picture

Hey
Just did a clean install and enabled the flag (V2) module it all worked great with no errors.
Than I had to restart apache and starting getting Error 500 pages on user account paged and flag administration page.

When I reviewed my error log file it said:
PHP Fatal error: Class 'flag_flag' not found in /srv/www/site.com/public_html/sites/all/modules/flag/flag.module on line 1424

When facebook-style statuses is enabled I also get:
PHP Fatal error: Class 'flag_flag' not found in /srv/www/site.com/public_html/sites/all/modules/facebook_status/facebook_status.flag.inc on line 12, referer: http://site.com/admin/settings/varnish

But this error goes away when I disable flag.

Anybody has experience with that?

Comments

What version of PHP and are

cweagans's picture

What version of PHP and are you running APC?

--
Cameron Eagans
http://cweagans.net

Hi Cameron, I'm using PHP

gorgo's picture

Hi Cameron,
I'm using PHP 5.3.2 that was installed with Ubuntu 10.04.

Do you think this is the reason?

Are you using APC?

cweagans's picture

Are you using APC?

--
Cameron Eagans
http://cweagans.net

yes I am. I actually followed

gorgo's picture

yes I am.

I actually followed this guide to install the whole package on Linode:
http://library.linode.com/application-stacks/project-mercury/ubuntu-10.0...

Okay. Those guides are really

cweagans's picture

Okay. Those guides are really old. You should be using the new bcfg2 setup (I think there might even be a new one after the bcfg2 one).

At this part: http://library.linode.com/application-stacks/project-mercury/ubuntu-10.0...

There's a problem: apc.include_once_override should be set to 0. Causes problems on PHP 5.3 with a lot of contrib modules. See http://cweagans.net/blog/2011/2/8/feeds-and-apc for some details.

--
Cameron Eagans
http://cweagans.net

Thanks!! I changed

gorgo's picture

Thanks!!
I changed apc.include_once_override to '0' and now flag is working!

You said that the guide I used is really old.
Do you think that even though THAT error is gone, I should follow an updated guide on a clean install to avoid any more errors that might show up when I enable more modules?

If so, is there a guide you particularly recommend to follow?
It doesn't have to be for Ubuntu cause I can switch to another linux distribution if I do a clean install.

Thanks for the help!

I use this one:

cweagans's picture

I use this one: http://groups.drupal.org/node/70268

If you want to live on the edge, you could probably give this one a go: http://groups.drupal.org/node/115654 (that guy has been working for a while on getting the bleeding edge version of mercury to run on Linode correctly). I haven't tried it yet and YMMV, but it might be worth a shot.

--
Cameron Eagans
http://cweagans.net

Thanks Cameron! I been

gorgo's picture

Thanks Cameron!

I been installing a few more modules and I don't getting any more PHP errors, so I think I might just leave it like that and not reinstall everything for now.

The only other problem I'm having now is with the 'Facebook-Style Statuses' module, that when using AHAH to submit a new status and silently refresh the page I get a popup that says: an error occurred /facebook_status/js and than all the html (code) of the page.

I'm guessing it has to do with the page caching by varnish or memcache?
Do you have any experience with this module? Maybe I should add something to the varnish vcl file?

Update

gorgo's picture

I found that the issue is resolved if I remove this bit of code from settings.php

$conf['memcache_servers'] = array(
         '127.0.0.1:11211' => 'default',
         '127.0.0.1:11212' => 'menu',
         '127.0.0.1:11213' => 'filter',
         '127.0.0.1:11214' => 'form',
         '127.0.0.1:11215' => 'block',
         '127.0.0.1:11216' => 'update',
         '127.0.0.1:11217' => 'views',
         '127.0.0.1:11218' => 'content',
         '127.0.0.1:11219' => 'apachesolr',
       );
$conf['memcache_bins'] = array(
          'cache'        => 'default',
          'cache_menu'   => 'menu',
          'cache_filter' => 'filter',
          'cache_form'   => 'form',
          'cache_block'  => 'block',
          'cache_update' => 'update',
          'cache_views'  => 'views',
          'cache_views_data'  => 'views',
          'cache_content'  => 'content',
          'cache_apachesolr'  => 'apachesolr',
       );

I'm not sure what to do though, cause according to that guide I need it there for memcache to work...

I solved my fb problem by

AntiNSA's picture

I solved my fb problem by making sure that all caching was disabled on the views block, especially the timed caching./

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: