Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2299
  • Last Modified:

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
0
Jean Marie Geeraerts
Asked:
Jean Marie Geeraerts
  • 8
  • 5
  • 2
1 Solution
 
Jean Marie GeeraertsApplication EngineerAuthor Commented:
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?
0
 
HemanthaKumarCommented:
0
 
Jean Marie GeeraertsApplication EngineerAuthor Commented:
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?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
HemanthaKumarCommented:
Did you restart the server after making changes to httpd ?
0
 
Jean Marie GeeraertsApplication EngineerAuthor Commented:
Yes I did.
First only restarted http task, then restarted the server, still no go :(
0
 
ZvonkoSystems architectCommented:
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

0
 
Jean Marie GeeraertsApplication EngineerAuthor Commented:
Domino server is in C:\Lotus\domino
PHP executable is in C:\phpdev\php
0
 
Jean Marie GeeraertsApplication EngineerAuthor Commented:
This is all on my portable test PC :-)
I'm redefining the expression "Mobile Internet"
\<|:-)
0
 
Jean Marie GeeraertsApplication EngineerAuthor Commented:
Okay by me. No answer available and i'm no longer looking into this.
Should have suggested this myself.
0
 
ZvonkoSystems architectCommented:
Hello JM,
sorry for missing this.
It is absolutely confusing (because it is tooooo easy to run php on Domino)
I did again test for a half hour to recreate how simply it was.

Ok, if you still want to do it, then try this:
1.) Install PHP. Use the default directory: C:\php
(or change the target to your php directory bellow)
2.) Add one Maping document with this content:
Maping type: URL-->Directory
Incoming URL string: /x
Target server directory: c:\php\php.exe

That's all.

Now all Domino URLs like this: http://localhost/x/hello.php
will inwoke the php processor with this parameter: C:\Lotus\Domino\data\domino\html\hello.php

That say: your wirtual /x directory is the trigger for Domino to invoke PHP with the path excluding the virtula directory.

See you,
Zvonko

0
 
ZvonkoSystems architectCommented:
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.

0
 
ZvonkoSystems architectCommented:
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.
0
 
Jean Marie GeeraertsApplication EngineerAuthor Commented:
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
0
 
ZvonkoSystems architectCommented:
Thanks  <|:-)  
0
 
Jean Marie GeeraertsApplication EngineerAuthor Commented:
You're welcome
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 8
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now