Jump to content

open_basedir does not apply to shell_exec backticks?


Recommended Posts

I have a script that simply does this:

 

<?

$sCMD = `/bin/cat /tmp/test.txt`;

echo $sCMD;

?>

 

This works. But my open_dirbase does not include /bin or /tmp. Does anyone know why executing a program using backticks like this bypasses open_basedir? This should not work correct?

 

I'm running PHP 5.3.16 on linux kernel 2.4.

Link to post
Share on other sites

open_basedir is a PHP setting, and as such only has an effect on PHP's functions.  When you run an external program that program is not subject to the same limitations as PHP is.

 

Link to post
Share on other sites

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.