[FGS] Re: tclhttpd with PHP
Nicolas Boretos
nicolas at maich.gr
Thu Jul 29 09:03:51 EDT 2004
Daniel Morissette wrote:
> Tyler Mitchell wrote:
>
>>> I've downloaded the file to /home/tyler/fgs/tclhttpd/.
>>
>>
>>
>> I have also started an instance of the webserver as per Nicolas'
>> example:
>>
>> ./fgswebserver -port 9001 -docRoot /home/fgs -debug 1
>>
>> See it live, in action, at http://harmeny.com:9001/
>>
>> Just a reminder that if anyone else is trying it to use a different
>> port.
>>
>
> That sounds like a very interesting option. Does anyone know if
> tclhttpd will support internal redirection, the equivalent of Apache's
> AddType/Action directives? We would need that to redirect .php files
> to the PHP CGI and run PHP MapScript apps. If we had that then we
> would be all set. Note that with the source it might be possible to
> just implement our own hack, but I haven't looked into that yet.
Hi,
I've uploaded tclhttpd, hacked to run php cgis. I tested it and it runs
test test.php with the distro, as well as some of my mapfiles,
generating the images..
I've also included the hack, php .tcl that's incorporated into the
server. If there's a problem with the php path, edit this file and
"source" it from the console once the server is running, thus
overwriting the Cgi array....
Regardless though, this same structure can be used with windows when
wrapped with a win interp...
This file is tclphp-win.exe
I've also added the tclhttpd.rc that can be used instead of the command
line switches. Using this you would start as
./fgswebserver -config tclhttpd.rc
or
tclphp-win.exe -config tclhttpd.rc
This stuff is at http://www.maich.gr/hup
Caveats I saw. This hack runs php files that are under the /cgi-bin
directory correctly....
You can add cgi directories from the console as
Cgi_Directory /new_cgi_dir /physical_path_to_dir
Doing this, it seems that php files run, but they then need a .cgi
extension...
The server can be configured for running .php extensions in other
directories, but the system then compalins that
php was compiled with FORCE_REDIRECT........
and her's where I lose it/interest wrt to php.....
I used php 4.3.4, which includes the 4.0 mapscript dll....
Daniel maybe someone can inform as to how a typical php site structure
is setup?
regards,
nicolas
>
> Daniel
More information about the Foss-gis-suite
mailing list