php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2649 PHP for NS
Submitted: 1999-11-01 16:03 UTC Modified: 2002-06-16 14:18 UTC
From: srinivas dot katta at cwusa dot com Assigned:
Status: Not a bug Package: Installation problem
PHP Version: 3.0.12 OS: solaris-.5.5.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: srinivas dot katta at cwusa dot com
New email:
PHP Version: OS:

 

 [1999-11-01 16:03 UTC] srinivas dot katta at cwusa dot com
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.








Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 14:18 UTC] sander@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC