From owner-freebsd-newbies@FreeBSD.ORG Mon Aug 16 07:41:15 2004 Return-Path: Delivered-To: freebsd-newbies@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9229F16A4CE for ; Mon, 16 Aug 2004 07:41:15 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D20543D5F for ; Mon, 16 Aug 2004 07:41:13 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a142.otenet.gr [212.205.215.142]) i7G7f63S020444; Mon, 16 Aug 2004 10:41:07 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i7G7e7KP074974; Mon, 16 Aug 2004 10:40:08 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i7FIOZml031834; Sun, 15 Aug 2004 21:24:35 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sun, 15 Aug 2004 21:24:35 +0300 From: Giorgos Keramidas To: Michael Rottmeier Message-ID: <20040815182435.GA31802@gothmog.gr> References: <000a01c482df$56d60140$0c2a02d9@oemcomputer> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000a01c482df$56d60140$0c2a02d9@oemcomputer> cc: freebsd-newbies@freebsd.org Subject: Re: newbie question :-| X-BeenThere: freebsd-newbies@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Gathering place for new users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2004 07:41:15 -0000 On 2004-08-15 17:48, Michael Rottmeier wrote: > Hi there, > > my question is not primariyl related to FreeBSD but more to FreeBSD > and PHP 4. > > I'm writing the 2nd version of a larger project in PHP and want to use > a php command which launches (if the server is a Windows machine) a > simple text editor; here's what I do if the php script is run on a > Windows Server: > > [code] > //start Notepad.exe minimized in the background: > $WshShell = new COM("WScript.Shell"); > $oExec = $WshShell->Run("notepad.exe ,1, false); > [/code] > > I know that the COM command is not supported on FreeBSD according to > the php manual but I'm searching the web now for hours and hours > looking for a way to port this piece of code to something working when > the script is run on a FreeBSD server. > > What is important is that the started text editor (here on Windows: > notepad.exe) should be visible to the user. This would be a very dangerous thing to allow on a web page. The implications of running a text editor remotely, with direct access to the server's filesystem would be horrible. Are you really, absolutely sure you want to do this? > Can anybody give me please some clues for this problem?! A better idea would probably be to present a web-interface for limited editing of text snippets. Something similar to what a wiki does. You'd then have control of what the user can edit, which parts of the text he can edit *AND* get to validate the data when he hits "POST" with your own logic. - Giorgos