WordPress.org

Forums

NextGEN Gallery
Getting errors in Apache log "script tried to disable memory_limit" (14 posts)

  1. jamminjames
    Member
    Posted 1 year ago #

    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/

  2. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    @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.

  3. jamminjames
    Member
    Posted 1 year ago #

    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.

  4. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    @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.

  5. jamminjames
    Member
    Posted 1 year ago #

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

  6. oscar9872
    Member
    Posted 1 year ago #

    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

  7. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    @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.

  8. rafaelmagic
    Member
    Posted 1 year ago #

    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

  9. rafaelmagic
    Member
    Posted 1 year ago #

    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

  10. oscar9872
    Member
    Posted 1 year ago #

    @ 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

  11. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

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

    We can continue our conversation there.

    - Cais.

  12. jamminjames
    Member
    Posted 1 year ago #

    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.

  13. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    @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.

  14. jamminjames
    Member
    Posted 1 year ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic