Re: Could someone look at my problem in shell-exec?

From: Date: Fri, 23 May 2003 20:28:42 +0000
Subject: Re: Could someone look at my problem in shell-exec?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148812@lists.php.net to get a copy of this message
At 20:33 23.05.2003, love jiangnan said: --------------------[snip]-------------------- >Thank you very much for your great help. > >I am trying to put my tar file into /tmp directory >which is available to all users and return it to the >user. > >$output=`cd /tmp; tar cvf output.tar >$home/www/1989/01/01.txt; ls; tar uvf output.tar`; > >echo<pre>$output</pre>; > >This time, the webpage list the files in tmp including >the tar file. However, it is not the /tmp which I see >from server. I have no idea which directory it >opened. Meanwhile, it cannot tar uvf output.tar. This sounds very much as if some security settings are in effect (I'm thinking on either an open_basedir setting, or on safe_mode). Check your ini file for this (use ini_get('open_basedir') if you have no access to the ini file). If this is the case you're seeing a fake /tmp folder instead of the "real" one. Take my advice - create a folder within your web root, you have enough control there to make this writeable for the web server. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#148812) next »