Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31899 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7597 invoked by uid 1010); 24 Aug 2007 15:29:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7582 invoked from network); 24 Aug 2007 15:29:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2007 15:29:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=mikko.koppanen@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mikko.koppanen@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.189 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: mikko.koppanen@gmail.com X-Host-Fingerprint: 209.85.128.189 fk-out-0910.google.com Received: from [209.85.128.189] ([209.85.128.189:46026] helo=fk-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/71-31863-E39FEC64 for ; Fri, 24 Aug 2007 11:29:03 -0400 Received: by fk-out-0910.google.com with SMTP id f33so880202fkf for ; Fri, 24 Aug 2007 08:28:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=MQF5MO0WApzrbcwqrICdbWZAG5mMCtcpo+tE3UEdGFZLDgYL1v7apGWZg3QONKR98lRqAeEPxLHYx8bk/mF3tY1Y75uvvcZNb432M/ZgVVKhiObO1czhlject+lIgon6tmfrJA4OgIrm6i0WnJZ4BqMzqcWCpMitMfd3fqoDmv0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=gHcXjw3XWzDKgH+IvCKV0HtH8demlK/21nnWyYdu5nTY4qh5IEJw6IzQrbKlF9bLDKvca1+spiG8R4bw6mreUM+1xWMqoRW2I4nCjzYbp1rqSARMK7FsJlxKd2qIKHtQb+jEJmoq9xqennrffTrdTvOfIbmYz0SjfMZwZy9+pLE= Received: by 10.82.186.5 with SMTP id j5mr6947829buf.1187969339064; Fri, 24 Aug 2007 08:28:59 -0700 (PDT) Received: by 10.82.158.18 with HTTP; Fri, 24 Aug 2007 08:28:59 -0700 (PDT) Message-ID: <8cf711460708240828g1de04429hd3b59d2cef50b08e@mail.gmail.com> Date: Fri, 24 Aug 2007 18:28:59 +0300 Sender: mikko.koppanen@gmail.com To: "Robert Cummings" Cc: "Steve Francisco" , internals@lists.php.net In-Reply-To: <1187968936.22231.14.camel@blobule> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_99641_5285084.1187969339033" References: <1187968936.22231.14.camel@blobule> X-Google-Sender-Auth: bff52aebddae8348 Subject: Re: [PHP-DEV] How to integrate PHP with my homegrown server From: mkoppanen@php.net ("Mikko Koppanen") ------=_Part_99641_5285084.1187969339033 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/24/07, Robert Cummings wrote: > > On Fri, 2007-08-24 at 11:08 -0400, Steve Francisco wrote: > > Hi, as an experiment I have a simple Java based server that listens on > > port 80 and can serve files just fine. I'd like to extend it to support > > PHP but am looking for guidance on how to do that. Can someone point me > > to instructions? > > > > My first attempt was to just call the php.exe command line interface to > > launch the php interpreter, capture the html and send it back to the > > caller. That works well, but I can't seem to figure out how to deal > > with parameters. For example, if the url would be this on the server: > > http://some.server.com/mypage.php?parm1=Hello&parm2=Goodbye > > and in mypage.php I do something like this: > > $echo $_GET["parm1"]; > > then how do I test this via the PHP command line? > > > > If the command line doesn't have a way to cause $_GET to be populated, > > then what other way of invoking PHP could I use? > > Sounds like you might need some glue. Have your PHP script run a > function that synchs up the globals with what you want. So your Java > server could populate a file or something with the appropriate data that > it received and your glue function would read it and populate the global > arrays. > > Cheers, > Rob. > -- > ........................................................... > SwarmBuy.com - http://www.swarmbuy.com > > Leveraging the buying power of the masses! > ........................................................... > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > You could take a look at implementing PHP support via CGI. -- Mikko Koppanen ------=_Part_99641_5285084.1187969339033--