Link to home
Start Free TrialLog in
Avatar of Jean Marie Geeraerts
Jean Marie GeeraertsFlag for Belgium

asked on

Configure Domino to host php pages

Hello,
Who can tell me how to host php pages on a domino server?
I've looked around administration help and the LDD forum, but I can't find a decent answer anywhere.
I have installed php V4.3.1 on a Windows 2000 machine in combination with Domino R6.0.1CF1

Somehow I can't figure out how to set the correct directory rule and php.ini settings to get things to work.

Everytime I try to open a .php file in my html directory of the domino server I get a download dialog except that the page is returned to the server.

A step by step solution is worth 500 points.

Thanks in advance,
JM
Avatar of Jean Marie Geeraerts
Jean Marie Geeraerts
Flag of Belgium image

ASKER

Okay, I made some progress.
I forgot to enable the Internet Sites configuration where the directory mapping is defined.

After doing this I got the following error :
Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.


So I changed the setting in php.ini from
cgi.force_redirect = 1
to
cgi.force_redirect = 0

And after this I got the next error :

Http Status Code: 500

Reason: Unable to process request, CGI script failed to generate a response


The contents of my .php file is the following :
<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo "<p>Hello World</p>"; ?>
 </body>
</html>

This should just give an Hello World message in my browser.

Any ideas as to what is still wrong?
Avatar of HemanthaKumar
HemanthaKumar

I have added the lines
# change suffix to stop recursive mapping to Exec
Map *.php /internal/php*.phptype
# This translates the first part to exec php.exe
Exec /internal/php* C:\php\php*
# map the .php back in
Map *.phptype *.php

to the end of the httpd.cnf file in the lotus domino directory, but still no go.

When I enter the url
http://servername/php/hello.php
I still get a file download dialog.

Any ideas, Hemanth?
Did you restart the server after making changes to httpd ?
Yes I did.
First only restarted http task, then restarted the server, still no go :(
Avatar of Zvonko
Hello JM,

I would like to make this test with PHP.
Send me your installation paths so we are talking similar language when we compare.

Post it either here or send it by email.

So long,
Zvonko

Domino server is in C:\Lotus\domino
PHP executable is in C:\phpdev\php
This is all on my portable test PC :-)
I'm redefining the expression "Mobile Internet"
\<|:-)
Okay by me. No answer available and i'm no longer looking into this.
Should have suggested this myself.
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you get this error message:
Http Status Code: 500
Reason: Bad script request -- no variation is executable

Then is your target directory wrong set.
Target directory is the path to your php.exe
No asterisk, blanks or other characters after the php.exe are necessary.

One more note: It is secure to set this php.ini  setting:
cgi.force_redirect = 0

Because Domino ensures that only that directory is executable which contains the virtual directory.
OK. Well, since I no longer need this I didn't look at it myself, so no problem that you forgot about it :-)
Anyway, it's answered now, so it can be moved to PAQ with a big A \<|8-D
Thanks  <|:-)  
You're welcome