Jump to content

shell_exec() doesn't work after unserialize()


DenBorn

Recommended Posts

Debian 5

PHP 5.2.6-1

 

This script works:

 

       <?
      $output = shell_exec('ls -lart');
      echo "<pre>$output</pre>";
      ?>

 

 

This script doesn't work:

      <?
      $vars=unserialize(file_get_contents("file.txt"));
      $output = shell_exec('ls -lart');
      echo "<pre>$output</pre>";
      ?>

 

I get error:

Warning: shell_exec(): Unable to execute 'ls -lart'

or

Warning: system(): Unable to fork [ls -lart]

 

If file.txt has size 500k, the script works without errors.

But my file file.txt has size 30M.

 

Help.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.