Hi there!
If I enable php5.4 with ajax_comments module enabled Drupal (7.14) stop working at all and throw 500 error with folowing message:

Fatal error: Cannot re-assign auto-global variable _SESSION in /home/web/sites/pirate-party.ru/newsite/sites/all/modules/ajax_comments/ajax_comments.module on line 537

Module works fine (at least, it seems like) on 5.3.
Also, drupal almost work (at least, don't throw 500) with ajax_comments disabled.

CommentFileSizeAuthor
#5 1559356-5.patch1.57 KBjcisio

Comments

acouch’s picture

The PHP devs breaking stuff again: https://bugs.php.net/bug.php?id=54657

Will look at another way to implement this. Thanks for the heads up.

sokrplare’s picture

Since $_SESSION is global, could it just be not passed as a function argument? Tried that change locally and seemed to work, but had other PHP 5.4 issues with other modules so couldn't do full testing.

acouch’s picture

It will likely be a while before I test anything on PHP 5.4 personally, especially since the latest Ubuntu LTS still uses PHP 5.3, so if there is a patch that gets RTBC and doesn't break the functionality on 5.3 I will happily accept.

Alternatively there might be a better way of clearing those entries from the session variable in a cleaner way I'd be happy to include.

meinemitternacht’s picture

Several options here (I am not a Drupal developer):

1. Add a database column with a status code.
2. I haven't looked at the entire module, but depending on what calls the function, make the function argument irrelevant since it accesses the current session anyway.
3. Use the database! (reiterating #1)

Edit: Spelling

jcisio’s picture

Status: Active » Needs review
StatusFileSize
new1.57 KB

Sounds like we don't need that argument at all. This patch fixes it.

acouch’s picture

Status: Needs review » Fixed

Jeez, that makes me feel dumb ;)

I committed the above patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

plexaz’s picture

Hi. I'm brand new to Drupal. How do I run this patch? (Steps)

Thanks you greatly,.

kevla’s picture

Hi Plexaz,

Try out this link http://drupal.org/patch/apply

delta’s picture

Tested #5 works well for me.

Thanks

jci’s picture

Tested the patch #5 ... Solved the issue. Please commit the patch above. Thanks

muschpusch’s picture

this got committed a while ago...

kcaporaso’s picture

FWIW:
Actually, I just pulled the latest ajax_comments from:
http://ftp.drupal.org/files/projects/ajax_comments-7.x-1.0-alpha1.tar.gz

I had to apply the patch again in order to bring the site up.