Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 16254 invoked from network); 27 Mar 2007 11:21:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Mar 2007 11:21:58 -0000 Received: (qmail 14012 invoked by uid 500); 27 Mar 2007 11:22:04 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 13981 invoked by uid 500); 27 Mar 2007 11:22:04 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 13972 invoked by uid 99); 27 Mar 2007 11:22:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2007 04:22:04 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of scarleton@gmail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2007 04:21:56 -0700 Received: by ug-out-1314.google.com with SMTP id 75so1879039ugb for ; Tue, 27 Mar 2007 04:21:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=uuq7TL9sHZJPbcyE+gEZgXS29Oqp+necmJSYuxx8DUMFTrMmxaKhSz6oSpKnQy0BYIHguunwOB/w+BPiPLgcs0Br4yKbLKqkOQlI2IRtjbA/DdbKeKlrXrpz+xtICt0sE16pZKTc/jnpJ5NE0lM8ccVKlzf5YTH6xhdla+cen44= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=YdsLBZEQLkXQbMT00mieE/rpUNYNNVMTv5HbeK4fRBe8gKUjAo94VJHqtT8BbtgRrTRXHHkWP5doMHLEglCyvCh0Ze+D9xmr4RA1OCYa6fsnwO9JBELW0jeDODBceEEkJljLyBZ0pb6b55GlA9x/o2v+bqOWznhn8eckMedSkRU= Received: by 10.114.137.2 with SMTP id k2mr3124346wad.1174994493450; Tue, 27 Mar 2007 04:21:33 -0700 (PDT) Received: by 10.114.122.10 with HTTP; Tue, 27 Mar 2007 04:21:33 -0700 (PDT) Message-ID: <8d38ca0a0703270421x2d8520f6h62fbfecf685fc2cf@mail.gmail.com> Date: Tue, 27 Mar 2007 07:21:33 -0400 From: "Sam Carleton" To: modules-dev@httpd.apache.org Subject: Re: apache module or CGI (conclusion) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Folks, I want to thank all three of you for your time, thoughts, and input on this matter. I have reached a conclusion... Drum role please.... It will be.... a .... apache module!!!!!!!!!!! In the end, it came down to portability. I realize that either way I go, I need to be using APR and using apxs, it does appear that an apache module is actually easier to implement. I got the skeleton up and running last night! On my nightly walk I started to think of the possibilities now that I am in the world that I know and love: C/C++. I realized a way to implement the whole web solution in this module, but there are more infrastructure questions I have about how to tell the different "pages" apart. With the current PHP code, I have two different php pages: index.php: It has two looks, one where it shows thumbnails, another where it shows one larger image. Both pages have parameters passed to via the GET method. imageHandler.php: Given the correct parameters via a GET, it will downsize the image and send it out. My first question is, in an apache module, are there tools to get at the parameters passed to the module or will I still need something like cgic to get at them easily? Second, right now the URL looks like I am using gets, I *THINK* I would like to change that so it simply looks like a path: Rather then the current: index.php?fldoid=f50b8377-d1cf-4407-bb59-a86ae7804d5c&imgoid=DSC_8912 I would like to see something like this: index.php/f50b8377-d1cf-4407-bb59-a86ae7804d5c/DSC_8912 I do recall seeing something, in years gone by, about how apache can do this type of thing and convert it back to a normal GET for the script. With a module, do I lose this feature and have to simply parse it myself? More importantly, lets say my module is called mod_coolapp and when I have it installed, you get to it at /coolapp. I want /coolapp to be the equivalent to the index.php and then have say, /coolapp/images be the same as imageHandler.php. Is there any trick to knowing which "page" is being requested or is it simply a matter of doing a string compare to see if the first part of the string passed the actual URL (/coolapp/) is images? Oh, one final question. I am going to set things up so my customers have great flexibility in what the web page actually looks like. The module will read in a template file to get what the out side, HTML wrapper is and then will call different XSLT scripts to actual transform the XML the module creates into HTML. Is there any standards as to where these resource files should be located? Sam