OS2 World.Com Forum

Subject  :  PHP on Lotus Domino Go?
Author  :  Fahrvenugen
Date  :  31 Dec, 2005 on 21:54
Hi,

Has anyone managed to get PHP working on the old Lotus Domino Go Webserver? I've been trying to make this combination work, but have not had any luck with it. I'm guessing it probably has something to do with the way CGI stuff gets set up, and I've tried quite a number of combinations, but can't find any that work.

Anyone know if this is even possible?

Thanks.


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  RobertM
Date  :  01 Jan, 2006 on 19:40
I've heard of setups that work - but I've not much experience with it. Somewhere I have PHP stuff that supposedly works... I'll send you what info I can when I dig it out.

-Rob


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  Fahrvenugen
Date  :  01 Jan, 2006 on 21:38
Thanks. I imagine there should be a way of doing it, but I can't figure it out. And the IBM documentation isn't much help on the matter either.

I admit that normally I wouldn't care much, but I've got a fairly significant project coming up which in part involves setting up a machine to run as a web server, and I'm going to need it to also have PHP (and MySQL). I've done load testing both with dynamic PHP and static web pages, and so far out of all the servers I've load tested (Lotus Domino Go, Apache 1.3.33, Apache 2.0.52, Web/2, InetPowerServer) - at least on the "Static" web page testing I've found that Lotus Domino Go offers the best performance at heavy loads (IBM seems to have done a good job optimizing the thread handling with it from what I can tell). Too bad they dropped the product... from everything I threw at it (one test I cranked up the benchmark to simulate 1500 hits at once) - it was a top performer!

For web serving PHP pages (tested with all of the above minus the Lotus Domino Go), it is a close tie between Web/2 and IPS. Of course before I make any final decisions I'd like to see if I can get Domino Go working with PHP and see how it compares. Mostly because I want to be sure that I'm getting the highest reliability and performance out of the setup as I can... I don't really want to run into any problems - especially since I've had the question "Can we do this on Windows?" already and explained why I believe OS/2 to be the better option.

Take care!


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  RobertM
Date  :  01 Jan, 2006 on 22:36
I think you'll find the DominoGo package to outperform the others when it comes to PHP as well... HPFS386 or JFS will also increase it's capabilities greatly - as will a multiprocessor system. Have u checked Yuri Dario's site?

Subject  :  Re:PHP on Lotus Domino Go?
Author  :  Fahrvenugen
Date  :  01 Jan, 2006 on 23:05
Yup, I'm comparing HPFS386 and JFS for the project too. If information is correct, I believe I can get my hands on a spare Warp Server Advanced for HPFS386. If not, JFS will work too.

I've seen Yuri Dario's site - that's where I downloaded MySQL from. However I didn't see anything on there about PHP. PHP came from Brian Havard's site at:

http://silk.apana.org.au/php/

Although unfortunately I can't find any docs mentioning Domino Go and PHP. And I've tried Googling it and havn't found the answer yet.


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  Smedles
Date  :  02 Jan, 2006 on 10:36
Hi,
I haven't tried PHP with Domingo Go - but there's a PHP5 build at http://smedley.info/os2ports.html

I understand from dink (web/2 author) that he had to workaround some PHP4 bugs to make php work with web/2 - perhaps the same bugs in PHP4 affect Domino Go?

Cheers,

Paul.


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  RobertM
Date  :  02 Jan, 2006 on 15:47
There's also an earlier build at http://silk.apana.org.au/php/ - and someplace on Hobbes, there's the GWAPI library and tools that allow you (assuming you have VAC++) to build linkable DLLs that become a part of GoWebserver - using it provides a tremendous speed improvement over Go's already blazing speed (must make sure that whatever you write is multi-thread and SMP safe, and highly re-entrant as Go loads the DLLs once as if it is a part of the core Go package and then spawns threads calling the same DLL to handle any requests). Trying to find the references on how to get PHP working in Go - though that might be in the GoWebserver's docs itself [as I have lost my copy of 4.6.2.8 and cant seem to find another copy anywhere, I cant check those for you ].

Subject  :  Re:PHP on Lotus Domino Go?
Author  :  Fahrvenugen
Date  :  02 Jan, 2006 on 17:55
Thanks for the help.

I've got the HTML docs that come with Go, both the "up and running" guide and the "Webmaster's" guide. The Webmaster's guide does explain how to get a GWAPI DLL running, if you have the DLL already. And I'm sure if I had a GWAPI dll for PHP that would offer the quickest speed. But, I don't have a DLL already, and I don't have VAC++... So, I've been looking for a solution using the stuff that I do have.

The guide also explains how to call a CGI from *within* an HTML file. But this also isn't what I want. What I'm looking for is a way to make Go run any file that ends in .PHP through PHP.EXE (or a DLL if I can find one that works with Go), then send the result to the user (much in the same way that Web/2 works for this). If there is a way to do this, I have so far been unable to find it.

I can't imagine that IBM would have left a feature like this out of DominoGo since just about every other web server - even the versions which were current at the time of the latest release of Go - had some way to implement this feature. But if it is there, I havn't been able to find the documentation.

Paul - Thanks for the info on PHP5.1.1 I'll do some load testing on this with the servers that I've managed to get PHP working with. Right now I'm not sure how much use it'll be - other then to see how it compares to 4.3.10 - because I do need the MySQL support, and from the readme it looks like that support has not been included. But on the other hand it is always good to see how well things run!


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  RobertM
Date  :  02 Jan, 2006 on 20:59
Well, how to get GoWebserver to do the same with PHP is pretty easy I would think... Somewhere in the server's instructions should be a method to tell it what type of content a certain file is or generates (or just look at the end of the server's config file: httpd.cnf). Add the appropriate info to the config file and that's ALMOST it.

The enxt step is for the cgi handling... tell it that PHP files are cgi and assign a parser to it - this too might be easier by viewing the example config files (or installing the Java Servlet for Go and seeing how it then handles Java Servlets and duplicating the method for PHP).

Also, the server's ability to use PHP or any other page generating script, function, procedure, executable, etc; is not limited to the methods in the instructions. (for instance) I often used REXX CMD files or executables ("compiled" with RxCls) to generate whole pages. You can even have the server translate "MyPage.html" to "MyPage.EXE" or ".PHP" before it does it's processing. Then, I'd just generate the appropriate HTML *SERVER* headers/footers, and the page content inbetween. You can simply then have links, pages, etc, be referenced as "http://www.MySite.com/MyPage.php" or to make the server more "secure" (ie: hide the fact that they are PHP pages so that no one looks for a vulnerability that they suspect may exist because of your use of PHP), you can call ".../MyPage.html" and have the server redirect the call to the PHP parser. or tons of other combinations. Go can handle such things on a static or wildcard based method - as well as by a http directory, server directory, domain or IP based directive.

In addition, in pages, to call on a script component, i also simply use the "<!-- include" statement as one method (I think it is "<!--include cgi=" though I am kind of hazy on it - been a while since I've done this and this is all from memory. There are a variety of include statements that are helpful for a few aspects of what you want to do.

DoGoWeb will serve any type of content, and even if you specify content type, that can be overriden on a case by case, or wildcard basis in the config file in the methods described, as well as by the script itself (assuming the file being called is set in the config file to be processed as a script - for instance, I've set an image call to "background.gif" to actually call a script which loads the appropriate background based on cookie or referrer info, then generate the server image header and stream the image and close that connection). I've also done the reverse... thus as long as you can get the config line correct (again, the java servlet or other cgi-bin lines should help), PHP should work...

The only thing I dont know how to do is parse the server variables... DoGoWeb will send the info - and parsing them in REXX is easy (and in C for that matter)... but I dont know much about PHP to know how it receives or handles them.

Hope some of that heads you in the right direction. I know it's a lot, but I'm not sure what you are using PHP for (ie: how extensively, in pages, as pages, etc), and thus wasnt sure how you want to call/serve it.

- Robert


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  Fahrvenugen
Date  :  04 Jan, 2006 on 20:47
Thanks for all your help RobertM,

I'm getting there... I've added the appropriate ADDTYPE statement for PHP files to the httpd.cnf file, and I've found that I can *sort of* get some things to work... But I have yet to be able to successfully find the right command in the httpd.cnf file to instruct LDGW to parse all .PHP files through PHP.EXE.

What I have found is that if I put the CGI PHP.EXE into the cgi-bin directory, and then call a phpfile using the following type of URL:

http://localhost/cgi-bin/php/phptest.php

Where "phptest.php" is sitting in my root / home directory, it will take that file and run it through PHP.EXE

However... when stuff is submitted back to PHP via the completion of a form, the information doesn't get passed back properly and I get an error. It looks like it might be a case where the URL is getting re-written without the "/cgi-bin/php/" part.

Ideally I'd like to figure out how to get LDGW to just parse *all* php files through php.exe without having to specify /cgi-bin/php/ at all - this would probably solve the problem.

The closest thing I've found is the MAP rule, which has some results but not really what I want...

I've tried:

MAP *.php /cgi-bin/php/*.php

But that doesn't work. It gives me a "No input file specified" error.

Then I tried:

MAP /*.php /cgi-bin/php/*.php
and
MAP */*.php /cgi-bin/php/*.php
And I got the same "no input file specified" error

And finally:
map /p/*.php /cgi-bin/php/*.php

And then accessing the URL:

http://localhost/p/phptest.php

it did parse the file, with the exception that when submitting something through a form it didn't work.

(minor rant session)
What I'm really looking for is something equivelant to the ACTION (I think that's the right one to set up CGI EXE's) command in the Apache setup. I know you're probably thinking that if I want this, I should just run Apache. And to be honest, right now I'm feeling kinda frustrated, and thinking I might be better off running either Web/2 or Apache - even though their results on the heavy load tests on static web pages aren't anything like the LDGW results, I'm wondering whether it is worth the headache needed to get it to work... if people end up with connection errors they'll likely try again... in a Microsoft world I often get connection errors on ISS served sites...
(/minor rant session over)

Okay, I'm going to try a few more things here to see if I can get it going. I'll keep you all updated.


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  RobertM
Date  :  06 Jan, 2006 on 01:13
Hi!

Try TRANSLATE instead of (or in conjunction with?) MAP (I believe that's the one I used that works). Also, if you happen to have an extra copy of LDGW you want to unload lemme know.

Oh, keep in mind that those statements (MAP, PASS, etc) have to be in the appropriate parsing order for things to work correctly.

TTYL,
Robert


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  RobertM
Date  :  06 Jan, 2006 on 01:15
Another easy option is to use a REXX script to call the PHP parser and to pass the data back to the web server. That's one way I know it will work (just make a REXX wrapper).

Subject  :  Re:PHP on Lotus Domino Go?
Author  :  Fahrvenugen
Date  :  06 Jan, 2006 on 23:19
Thanks again,

Nope, it isn't translate. I can't find any reference in the documentation to a "translate" command, and when I try and put one in, I get the error message:

The configuration directive is not valid: Translate

As for Map and Pass and Exec, I've tried a number of different combinations and orders of the commands in the httpd.cnf file, and have yet to find a combination that does what I'm really looking for. If you want to have a look at the "advanced configuration" docs, I've got them at:

http://lorne.tyndaleweb.com:81/Docs/icswgcfr.htm

As for spare copies of LDGW, I'm sorry to say that I only have the one license, so if I do get it working the way I want, then I'll likely use it.

But, if you are interested in an older copy of IBM's Internet Connection Server V4.1 (the code base which eventually became LDGW), I've got a spare one of these... back in the mid 90's IBM sent me a "Guide to business on the internet" CD promo CD, most of which just contained demos trying to say how great IBM servers were. But it also contained copies of ICS 4.1 (both the secure and non-secure version) for AIX, OS/2, and 95/NT. For the "secure" version - the license expired after something like 30 days unless you paid for it. However the license on the "non-secure" (ie, didn't support SSL) version never expires, and there is never any requirement to "pay" IBM further for it.

Because of the age of it, I'm not really interested in running ICS 4.1. However if you've got a use for it (keeping in mind that some of the bugs and stuff in ICS4.1 were fixed in the later versions), let me know.

Anyways, thanks again for all your help!


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  RobertM
Date  :  07 Jan, 2006 on 02:19
Couldnt connect to it from here... will try later tonite when I am out of work and off our firewall.

Gonna eventually try to get a new LDGW 4.6.2.8 disk from IBM. I've got the license for it and 4.6.2.5 - just "lost" (ie: stolen) the disks when I moved.

Will get back to you later when I've reviewed the docs - it's been a few years and I seem to be mixing my rexx with my httpd.cnf

- Robert


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  Fahrvenugen
Date  :  07 Jan, 2006 on 17:12
Yeah, I've got the "default" home page at:

http://lorne.tyndaleweb.com:81/

from which both the "Quick beginings" and the "webmaster's guide" can be accessed. There are also old links which go back to some other stuff formerly on IBM's site, but those pages are long gone.

For the firewall, probably because I've got it running on Port 81 instead of the usual 80 - right now I've still got Web/2 running on Port 80.

Take care!


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  Fahrvenugen
Date  :  16 Jan, 2006 on 03:09
oops!

I just discovered that I forgot to open up port 81 on my router/firewall.

fixed now... for anyone interested in the Lotus Domino Go Webserver docs, they're working now at the above address.


Subject  :  Re:PHP on Lotus Domino Go?
Author  :  RobertM
Date  :  16 Jan, 2006 on 19:20
Will check again tonite...

- Rob


Powered by UltraBoard 2000 <www.ub2k.com>