Issues while executing commands with the php shell script

Basically, I maintain a mediaWiki setup on my Linode 360.

For whatever reason, when I run a script with: php (scriptName) (Options)

I get this, and wondered what it meant?

Thanks very much for any help!

The error I am getting (and trying to fix or get to go completely away if at all possible, is thus:

ALERT - script tried to increase memorylimit to 4294967295 bytes which is above the allowed value (attacker 'REMOTEADDR not set', file '/srv/www/keithnet.us/

public_html/wiki/maintenance/commandLine.inc', line 238)

How do I fix that? Thanks!

4 Replies

Searching around for that error message seems to point the finger at Suhosin. See the last entry in that thread for a possible fix.

Errm, also that's a PHP script trying to raise its memory limit to 4GB? No PHP script should ever use that much…

While Suhoshin is setting the limit, it is correct in saying that a PHP script requesting 4GB of RAM (the default limit in PHP is 16MB) is insane and should be stopped.

Looking at the MediaWiki code, I believe the script is trying to remove the memory limit:

ini_set( 'memory_limit', -1 );

I don't know if suhosin.memory_limit can similarly be set to -1 or if you need to pick a defined value.

That is a supremely bad idea. The limits exist for a reason. I'd suggest changing the MediaWiki code to not make such a dangerous error. It's a one-line fix; just put a reasonable value in the line of code in question.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct