Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: How to make Apache to allow an executable to leave a file? Date: Thu, 09 Aug 2012 18:07:04 +0200 Lines: 22 Message-ID: References: <1c4f8604-e08e-4c83-aa09-e596f25c4267@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net lN4u/KG3LQ1BBD5K+OZQNAKfyrnZbqJaOXmF6XbLIzRH06V96bKbbpkT2jGb2X6qpG Cancel-Lock: sha1:7yVBT7iQAfKE2KcvgJzA9vj8hvU= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120807 Thunderbird/14.0 In-Reply-To: <1c4f8604-e08e-4c83-aa09-e596f25c4267@googlegroups.com> Xref: csiph.com comp.lang.php:6755 On 09/08/12 17:00, thejustpark wrote: > I am just wondering what I can do in this situation. > I have this simple web page, through which I want to invoke a program that leaves a file on site. > For your information, this web page itself can write (it saves uploaded files in a specific location in the server). > But the problem is that when I invoke the program via the web page (using a native system call in php), it doesn't produce a file in the same specific location the web page succeeded to leave a file. > > Simply speaking, my situation is > a web page can save a file to folder A, > but when the web page invokes a program to leave a file in the folder, it can't. > And the question is > how I can make the program to do so when it's invoked by the web page? You should provide the full path to the program and depending on the system you are running the script, the path may have unstandardised '\' as directory divider in the path. Also the command to invoke the command may or may not have a $HOME set. -- //Aho