?
Solved

Configure Domino to host php pages

Posted on 2003-04-01
16
Medium Priority
?
2,271 Views
Last Modified: 2013-12-18
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
Comment
Question by:Jean Marie Geeraerts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 2
16 Comments
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 8245985
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
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 8247175
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 8251699
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.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 8254570
Did you restart the server after making changes to httpd ?
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 8259361
Yes I did.
First only restarted http task, then restarted the server, still no go :(
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 8488712
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
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 8549786
Domino server is in C:\Lotus\domino
PHP executable is in C:\phpdev\php
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 8549789
This is all on my portable test PC :-)
I'm redefining the expression "Mobile Internet"
\<|:-)
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 12274705
Okay by me. No answer available and i'm no longer looking into this.
Should have suggested this myself.
0
 
LVL 63

Accepted Solution

by:
Zvonko earned 2000 total points
ID: 12277964
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
 
LVL 63

Expert Comment

by:Zvonko
ID: 12278038
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
 
LVL 63

Expert Comment

by:Zvonko
ID: 12278279
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
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 12284776
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
 
LVL 63

Expert Comment

by:Zvonko
ID: 12284795
Thanks  <|:-)  
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 12286516
You're welcome
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question