--- Kym Farnik <[EMAIL PROTECTED]> wrote:

> Oleg wrote:
> > > Anyone got Oleg Kobchenko's JHP working on Windows using Apache rather 
> > > than IIS?
> > >
> > > Please post a how-to!
> >
> > There are a few possibilities:
> >  - url rewrite to IIS serving from a different port
> >  - use pattern for UNIX with a cmd script instead of bash
> >  - use cygwin for bash script
> >
> > Are there any particular problems or questions?
> 
> All working now, using Apache 2.2.4.
> My J601 installed to C:\Jsoftware
> JHP examples moved to C:\Jsoftware\jhp
> I've made the Jsoftware directory browsable by Apache for now.
> 
> 
> FYI Configs:
> **************
> 1. Cygwin installed.
> 
> 2. Apache:
> Alias /Jsoftware "C:/Jsoftware"
> <Directory "C:/Jsoftware">
>   Options Includes Indexes FollowSymLinks MultiViews
>   AllowOverride All
>   Order allow,deny
>   Allow from all
> </Directory>
> 
> 3. and in  C:\Jsoftware\jhp\.htaccess :
> RewriteEngine on
> RewriteBase   /jhp/
> RewriteRule   .*\.jhp  /cgi-bin/jhp.sh
> 
> 4. jhp.sh in apache cgi-bin directory: (saved in Unix file format not DOS!!)
> #!C:/cygwin/bin/sh
> export PATH_TRANSLATED=`echo $SCRIPT_URL | sed -e 's|^/|C:/|'`
> export J_PATH=C:/Jsoftware
> $J_PATH/jconsole.exe C:/Jsoftware/addons/web/jhp/run.ijs $*
> 
> 5. Browse to http://localhost/Jsoftware/jhp for testing
> 
> The main issue I had to debug was making the jhp.sh file Unix format
> as in DOS format Cygwin adds a <CR> to the exports.
> 
> This is easy if you create the file from cygwin or use Notepad++ as an
> editor and save in Unix format.
> 
> Oleg: Feel free to add the above to your doco for JHP.

Congratulations. This is really an achivement!

Seeing  #!C:/cygwin/bin/sh  made me pause.

There are a few details to clarify. But first I would like to
point out how the configuration pattern chosen for JHP
works out on various systems, in a way that the separation
layer ensures that neither the library code nor, 
more importantly, user code (JHP pages) require any changes
when installed on various systems.

Now a few comments.

Is Apache a Windows application or a part of cygwin?
   http://httpd.apache.org/docs/1.3/cygwin.html
And if the latter would provide more UNIX-like configuration.

If the former, would a jhp.cmd script work instead of bash,
which would exclude cygwin altogether. Something like

@echo off
set PATH_TRANSLATED=C:%SCRIPT_URL%
C:\Jsoftware\jconsole.exe web/jhp/run %*


<Directory "C:/Jsoftware">
should probably be <Directory "/Jsoftware">

It's not a good idea to expose all J installation to the web,
but rather create more granular virtual folders.

> export J_PATH=C:/Jsoftware
should be JPATHj601

You need to reinstall cygwin and specify to use \n instead of \r\n.
Otherwise there will be many more such inconsistencies.

Thank you for offering your configuration experience.



 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to