WordPress.org

Support

Support » Plugins and Hacks » Getting errors in Apache log "script tried to disable memory_limit"

Getting errors in Apache log "script tried to disable memory_limit"

  • jamminjames
    Participant

    @jamminjames

    I’m getting a constantly repeating error in my server logs, eg:

    Feb 23 20:17:56 content suhosin[9376]: ALERT – script tried to disable memory_limit by setting it to a negative value -1 bytes which is not allowed (attacker ‘199.27.128.134’, file ‘/home/humortimes/public_html/wp-content/plugins/nextgen-gallery/non_pope/class.photocrati_cache.php’, line 90)

    Sometimes it’s caused by other Nextgen files.

    What can be done about this?

    Thanks for any help!

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author photocrati
    Participant

    @photocrati

    @jamminjames – There is nothing in our code that should be trying “to disable memory_limit by setting it to a negative value -1 bytes”

    Would you be able to submit a Bug Report (http://www.nextgen-gallery.com/report-bug/ … please reference this topic) on this issue and include your WordPress log in and FTP credentials for your WordPress installation?

    Thanks!

    – Cais.

    jamminjames
    Participant

    @jamminjames

    Well, there is this in class.photocrati_installer.php:
    static function refresh_cron(){@ini_set('memory_limit', -1);
    That is one of the files pointed to in the errors, and a similar line in another file.

    Plugin Author photocrati
    Participant

    @photocrati

    @jamminjames – My apologies, I did not realize that bit of code was in there.

    You may be able to simply comment it out as this appears to be unique to those installations running “suhosin” … I will make a note for our developers to follow up on this issue.

    I’m seeing two references via a search, the one you noted and this one as well: products\photocrati_nextgen\modules\attach_to_post\mixin.attach_to_post_display_tab.php:97

    Thanks!

    – Cais.

    jamminjames
    Participant

    @jamminjames

    Ok. Commenting those lines out won’t hurt anything? What about changing the -1 to 0?

    oscar9872
    Member

    @oscar9872

    I’m receiving the same error when I try to manage the galleries or to set the options of NGG
    Forbidden
    You don’t have permission to access /wp-admin/admin.php on this server.
    The server administrator told me that she found into the log file this error:
    ALERT – script tried to disable memory_limit by setting it to a negative value -1
    Is there a way to fix it?
    Thank you
    Oscar

    Plugin Author photocrati
    Participant

    @photocrati

    @jamminjames & @oscar9872 – We are likely going to need Bug Reports (http://www.nextgen-gallery.com/report-bug/ … please reference this topic) and get log in and FTP credentials with your WordPress’ site specifics. I’ll likely have to have one of our developers review this more fully once we have that information.

    Thanks!

    – Cais.

    rafaelmagic
    Member

    @rafaelmagic

    I got the same error. Is there a workaround.

    What version of Suhosin are you guys running? I know that it was finally updated on 2/2014

    http://www.hardened-php.net/suhosin/changelog.html

    Maybe updating Suhosin and commenting out the lines.

    I do see a similar issue here going back a few months:
    http://wordpress.org/support/topic/suhosin-alert-unallowed-setting-of-memory_limit?replies=4

    Rafael

    rafaelmagic
    Member

    @rafaelmagic

    hmm. I was thinking about it.

    Are you guys setting the php limit in wp-config.php

    Example:
    define(‘WP_MEMORY_LIMIT’, ’60M’);
    define(‘WP_MAX_MEMORY_LIMIT’, ’60M’);

    VS

    Setting it in the php.ini file?

    Also Sushosin has configurations in the systems php,ini, like the one below, maybe they need tweaking:
    suhosin.memory_limit = 20

    Located at /usr/local/lib/php.ini file

    oscar9872
    Member

    @oscar9872

    @ photocrati: do you need my FTP credential? Isn’t it a bit …. dangerous? 🙂 Sorry about it, I’m new of WP, but someone could erase everthing with those, right? please, let me understand.
    I’ve just sent the bug report you asked me.
    Thank you again
    Oscar

    Plugin Author photocrati
    Participant

    @photocrati

    @oscar9872 – Thank you! I have responded to your Bug Report.

    We can continue our conversation there.

    – Cais.

    jamminjames
    Participant

    @jamminjames

    You may be able to simply comment it out as this appears to be unique to those installations running “suhosin” … I will make a note for our developers to follow up on this issue.

    I notice the new update did not address this issue. Did you follow up on it, as you said? Do they plan to deal with it soon?

    Also, I got a similar warning for another line in another file:

    Mar 19 19:57:53 content suhosin[17047]: ALERT – script tried to disable memory_limit by setting it to a negative value -1 bytes which is not allowed (attacker ‘173.245.52.95’, file ‘/home/humortimes/public_html/wp-content/plugins/nextgen-gallery/non_pope/class.photocrati_installer.php’, line 216)

    Thanks.

    Plugin Author photocrati
    Participant

    @photocrati

    @jamminjames – Did you submit a Bug Report on these issues as suggested earlier so we can look into this issue more, especially on your site as this is where there is a real world example of the problem?

    Thanks!

    – Cais.

    jamminjames
    Participant

    @jamminjames

    No, I didn’t submit a bug report, as the previous reply seemed to indicate they’d deal with it in the new release.

    Also, last time I submitted a bug report for something else, you guys logged in and reset the plugin, and I had to go back and redo a bunch of settings, so I’m hesitant to do that again.

    If I do submit the bug report, can they just look at what’s happening without resetting things? I’ve already tried that anyway. If you just need to get the plugin to play nice with Suhosin, I don’t see why you’d need to login to my account to do that anyway…

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Getting errors in Apache log "script tried to disable memory_limit"’ is closed to new replies.