Bug #2649: PHP for NS
| From: | srinivas dot katta at cwusa dot com | Date: | Mon, 01 Nov 1999 21:03:11 +0000 |
| Subject: | Bug #2649: PHP for NS | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-12069@lists.php.net to get a copy of this message | ||
From: srinivas.katta@cwusa.com
Operating system: solaris-.5.5.1
PHP version: 3.0.12
PHP Bug Type: Installation problem
Bug description: PHP for NS
Hi,
One of my customers want to test the test.php3 file under /docs dir of
his web site.
Here is the test.php3 file info.
---------------------------------
<HTML><HEAD><TITLE>
test
</TITLE></HEAD><BODY>
<?php print "<p>If you see this, php3 is installed"; ?>
</body>
</html>
---------------------------------------
Here is the system and web server info.
SunOS schering1 5.5.1 Generic_103640-24 sun4u sparc SUNW,Ultra-1
Netscape-Enterprise/2.01c
No database support.
Here is the more info.
----------------
I have done following things for to install the php over sun platform for
Netscape webs erver.
1)Compiled the php3 according to the info,which I have got info from the following web site.
http://www.webgenx.com/Kwazy/phpunix.html
As per web site,I have used following options at config level.
------------------------------------------------------------
./configure --with-gd=no - --enable-debug=no --enable-safe-mode=yes
--with-exec-dir=/web1/webroot --enable-magic-quotes=yes --enable-force-cgi-redirect=yes
--enable-discard-path=yes
----------------------------------------------------
Also,I have updated main.c file for following info.
-----------------PHP: main.c: (before compiling PHP make this change)
find "REDIRECT_STATUS"
replace with "HTTP_REDIRECT_STATUS
---------------------------------------------------------------
Also,I have updated config files for the following info.
a)mime.types
type=magnus-internal/php exts=php3,phtml
b)magnus.conf
Init fn=load-modules shlib=/home/ns-home/plugins/redirect_cgi.so funcs=redirect-cgi
c)obj.conf
----------
<Object name="php">
ObjectType fn="redirect-cgi" cgi_path="/usr/local/bin/php"
type="magnus-internal/php"
</Object>
-----------------------
After all,I have found following error mesg from error log file.
a)Here is the one of the error mesgs,When I used to access the url http://206.128.186.79/test.php3
error on the browser
-------------------
Server Error
This server has encountered an internal error which prevents it from fulfilling your request. The
most likely cause is
a misconfiguration. Please ask the administrator to look for messages in the server's error
log.
error from the error log.
-------------------------
[25/Oct/1999:16:02:48] config: for host 204.70.138.130 trying to GET /test.php3, handle-processed
reports: no way to service request for /test.php3
2)a)Here is the one of the error mesgs,When I used to access the url http://206.128.186.79/cgi-bin/test.php3
(I have added following line to the begining of the file).
#!/usr/local/bin/php
--------------------
error on the browser
-------------------
Security Alert! 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. This variable is set, for example, by Apache's
Action directive
redirect.
You may disable this restriction by recompiling the PHP binary with the
--disable-force-cgi-redirect switch. If
you do this and you have your PHP CGI binary accessible somewhere in your web tree, people will be
able to
circumvent .htaccess security by loading files through the PHP parser. A good way around this is to
define doc_root
in your php3.ini file to something other than your top-level DOCUMENT_ROOT. This way you can
separate the
part of your web space which uses PHP from the normal part using .htaccess security. If you do not
have any
.htaccess restrictions anywhere on your site you can leave doc_root undefined.
------------------------------------------------------------
Could you pl advice me how can I configure the php3 files under
NS webserver.
Thanks,
Srinivas.