[Xitami] Tseting CGI on localhost

John Deitz xitami@lists.xitami.org
Wed, 7 Jul 2004 14:07:29 -0700


Thanks for those thoughts.  The Komodo debugger is supposed to be invokable
(even from a remote site) through a listening ports 9000/9011.  Guess I need
to drill down on how that really works;  I thot it would work from any web
server - even a local one.
Thanks again for taking the time to help!  

-----Original Message-----
From: xitami-admin@lists.xitami.org [mailto:xitami-admin@lists.xitami.org]
On Behalf Of R O
Sent: Wednesday, July 07, 2004 1:02 PM
To: xitami@lists.xitami.org
Subject: RE: [Xitami] Tseting CGI on localhost


i am not aware of http servers allowing for native script debugging.  I
believe there is an option in the configuration section for CGI that allows
for CGI debugging.  But I have never used that option so I don't know what
it will return.  but a -d in the script will hang the script at that
instance of "-d" thus not completing the script.  the -d will allow the
script, and executed at the CLI, will allow the user to step through the
script on line at a time.  I don't believe http can interpret that process.

-R

Russel P. Olinger
rolinger1@hotmail.com




>From: <jgdeitz@cox.net>
>Reply-To: xitami@lists.xitami.org
>To: <xitami@lists.xitami.org>
>Subject: RE: [Xitami] Tseting CGI on localhost
>Date: Wed, 7 Jul 2004 12:17:38 -0700
>
>I've made some progress.  Looked through the server logs, and 
>discovered an error relating to Xitami trying to resolve the script 
>name.  The problem was that the default install puts Xitami in a 
>directory name containing spaces; the internal routine that resolves 
>the physical script name stopped at the first space it found (in the 
>middle of the web server directory name).  I renamed the webserver 
>directory name to remove spaces, and now I'm HTTPing to my script.
>However, debugging is now a problem.  If I have the -d directive in the 
>script, Xitami hangs and fails with HTTP error 503.  Not sure how to 
>resolve that, but at least I'm executing locally now.
>BTW - I'm using v2.5c1, if that helps.
>
>-----Original Message-----
>From: xitami-admin@lists.xitami.org 
>[mailto:xitami-admin@lists.xitami.org]
>On Behalf Of R O
>Sent: Wednesday, July 07, 2004 10:36 AM
>To: xitami@lists.xitami.org
>Subject: RE: [Xitami] Tseting CGI on localhost
>
>
>actually, it is the Xitami.cfg that is supposed to be hardwired and 
>your not supposed to edit that.  In Xitami.cfg is a line pointing to 
>your true config
>- default.cfg (or whatever name you want to change it to.).  The 
>default.cfg should have all your baseline configs which should override 
>the xitami.cfg configs.  If you edit the xitami.cfg and mess things up 
>then you could potentially have to reinstall everything.  I have 
>actually corrupted mine before b/c I kept toying with it - took me a 
>week to figure out it was corrupted (it was the last thing I thought of 
>why things weren't working).
>
>What version of xitami are you using - I recall hearing some early XP 
>versions of xitami that had CGI (and/or PHP) problems.  Maybe someone 
>else can comment on this.
>
>The cg-bin path offers two options - 1) /cgi-bin is the root path (or a 
>variation of it), as in http://blah.com/cgi-bin/test.pl and 2) /cgi-bin 
>can be anywhere in the URL as in, 
>http://blah.com/site/cgi-bin/myscripts/test.pl
>- but the path, obviously, must exist.  Remember that webservers need 
>to know where the CGI scripts reside - unlike PHP where they can be 
>executed from anywhere.
>
>The two MAIN cgi configure lines are:
>Main CGI directory:  	cgi-bin
>      * (or where ever you store them)
>      * all your scripts must be in that directory or a sub-dir of that 
>main directory
>      * it is also wise to have that directory sit at the same level as 
>your "webpages" root dir CGI URLs start with:  /cgi-bin
>      * As I do, this makes the full URL path to the cgi directory 
>start with /cgi-bin
>            * correct: http://blah.com/cgi-bin/test.pl
>             * incorrect: http://blah.com/scripts/cgi-bin/test.pl
>      * you can anchor it another spot, but why?  :-)
>
>There is a sub-CGI configuration too, but don't confuse that with the 
>root configuration
>Working directory:  	'-'
>      * '-' means use program directory, refer to main config Match 
>/cgi-bin anywhere in URL?
>       * if selected this allows you to put cgi-bin anywhere in the URL 
>path, but can be confusing at first
>        * if not selected (recommended) this anchors all URLs to 
>http://blah.com/cgi-bin/test.pl
>
>g-luck.
>
>
>
>Russel P. Olinger
>rolinger1@hotmail.com
>
>
>
>
> >From: <jgdeitz@cox.net>
> >Reply-To: xitami@lists.xitami.org
> >To: <xitami@lists.xitami.org>
> >Subject: RE: [Xitami] Tseting CGI on localhost
> >Date: Wed, 7 Jul 2004 08:39:58 -0700
> >
> >I've continued to work on this, and now have the Komodo debugger 
> >getting invoked, but the execution location is in an IE temp internet 
> >files directory, and still not getting the HTTP vars passed through.
> >Here's answers to you questions:
> >
> >1) This seems to be covered.  My HOSTS file (under Windows) shows
> >127.0.0.1 associated with localhost. Entering http://127.0.0.1/ in 
> >the browser address line calls up the index.html file in the web 
> >server root directory, and entering http://localhost/ there does the
same.
> >2) I use the GUI Xitami configuration utility.  Under the [CGI] 
> >section I have the WORKDIR variable set to "-" which is supposed to 
> >cause the script to run from the directory where the script resides. 
> >Sounds like the DEFAULT.CFG approach is hard wired, but I'm willing 
> >to try it if you can point me to some doc on it.
> >3) PL files are properly alliased, as I have no problem running 
> >ActiveState's Komodo debugger in stand-alone mode. My PATH statement 
> >in the environment is also set up properly.  It starts out with 
> >C\PERL\BIN, which is what Xitami is supposed to discover and handle.
> >
> >Bottom line: it seems that Ximeta is recognizing the script as just a 
> >file (that it invoked the associated fil service on), and not a CGI
>script.
> >That
> >would explain the script running, but un the wrong location and 
> >WITHOUT any of the HTTP environment passed in.  Do you think setting 
> >up DEFAULT.CFG will solve that?
> >
> >Thanks!
> >
> >-----Original Message-----
> >From: xitami-admin@lists.xitami.org
> >[mailto:xitami-admin@lists.xitami.org]
> >On Behalf Of RPO
> >Sent: Wednesday, July 07, 2004 7:13 AM
> >To: xitami@lists.xitami.org
> >Subject: Re: [Xitami] Tseting CGI on localhost
> >
> >sounds like you have 3 issues: xitami config issue, WinXP issue and 
> >Perl script issue:
> >
> >1.  is localhost aliased properly?  is 127.0.0.1 selected as an IP 
> >address that xitami will run on?
> >2.  did you set up you cgi-bin root directory properly in defaults.cfg?
> >what is the root path for you cgi-bin files?
> >3.  did you alias .pl files, in WinXP, to your /perl/bin/perl program 
> >- or where ever you installed perl to?
> >
> >
> >----- Original Message -----
> >From: <jgdeitz@cox.net>
> >To: <xitami@lists.xitami.org>
> >Sent: Tuesday, July 06, 2004 4:36 PM
> >Subject: [Xitami] Tseting CGI on localhost
> >
> >
> > > I'm trying to test a Perl CGI program (form processor, POST) on
> >localhost
> > > (WinXP).  I'm experiencing a series of problems:
> > >
> > > 1)  When I invoke the pgm.pl from a form with 
> > > action="http://localhost/cgi/alwmsg.pl" it fails with a "Page not
>found"
> > > error; however, if I type the same URL into a browser the program 
> > > runs,
> >but
> > > (see problem 2)
> > > 2)  When the program executes, it seems to be simply executing 
> > > under Windows. Running the manual debugger, I see that none of the 
> > > HTTP
> >variables
> > > are in ENV, and none of the form fields are passed in.
> > >
> > > I've set up a CGI Alias called "localalw" and associated the exact
> >directory
> > > where the Perl script is.
> > >
> > > I've also set two environmental variables to try to invoke the
> >ActiveState
> > > Komodo debugger instead of the default one:
> > >
> > > PERL5LIB
> > > c:\Program Files\ActiveState Komodo 2.5 PERLDB_OPTS
> > > RemotePort=localhost:9011 PrintRet=0
> > >
> > > But this does not work; default (command line) debugger still gets
> >invoked.
> > >
> > > My Goal: When I invoke the Perl program from a HTML page form, I 
> > > would
> >like
> > > the debugger (Komodo) to be invoked for the program, normal 
> > > HTTP/CGI environment variables to be set up for the program, and 
> > > the output from
> >the
> > > program (an HTML page) returned in the browser.
> > >
> > > Any idea why HTTP isn't handling my Perl script?
> > >
> > > Thanks for any help.
> > >
> > >
> > >
> > >
> > > --
> > > Xitami Users Mailing List -- For Xitami support To unsubscribe:
> > > http://lists.xitami.org/mailman/listinfo/xitami
> > >
> >
> >
> >--
> >Xitami Users Mailing List -- For Xitami support To unsubscribe:
> >http://lists.xitami.org/mailman/listinfo/xitami
> >
> >
> >
> >--
> >Xitami Users Mailing List -- For Xitami support To unsubscribe:
> >http://lists.xitami.org/mailman/listinfo/xitami
>
>_________________________________________________________________
>Check out the latest news, polls and tools in the MSN 2004 Election Guide!
>http://special.msn.com/msn/election2004.armx
>
>
>--
>Xitami Users Mailing List -- For Xitami support To unsubscribe:
>http://lists.xitami.org/mailman/listinfo/xitami
>
>
>
>--
>Xitami Users Mailing List -- For Xitami support To unsubscribe: 
>http://lists.xitami.org/mailman/listinfo/xitami

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page - FREE
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/


--
Xitami Users Mailing List -- For Xitami support
To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami