PHP as CGI (Shell-CGI)
807567Aug 25 2004 — edited Aug 10 2007Hi Everybody,
I am new to Web Servers and as a Java Developer I have decided to start
with Sun ONE Web Server 6.1SP1. Till now I have been able to configure
Servlet and JSPs' but not been able to configure PHP. As Zend enabler is
not free I had to look for alternatives and then I found one in the PHP.net
site, which is as follows:
Copy the php files on your server
Get the php zip file http://www.php.net/
Edit php.ini-dist
rename php.ini-dist to php.ini
Edit php.ini : Indicate in which directory you have copied youre php files. (extension_dir = d:\php4\extensions ; directory in which the loadable extensions (modules) reside.)
copy php.ini in youre windows directory (c:\winnt)
Make a file association under Windows NT
In a DOS Window (do not copy this two lines in a batch file! because of %1), type assoc .php=PHPScript
ftype PHPScript=d:\php4\php.exe %1 %*
2nd step : Configuring Netscape Enterprise Server for PHP
Specifying shell-CGI as Filetype
Due to a bug of the Nestcape/iPlanet administration console,
you have to create a dummy shell-cgi directory (for ex:/dummy maps c:/temp)
Remove it just after, (it will create 4 lines in obj.conf)
If you don't do that you will get (no way to service request in the netscape error log)
First Activate CGI as a file type
From the Server Manager of NES 3.6.x, choose Programs|CGI File Type and Set the Radio Group to 'YES'
Click here for screenshot
From the Server Manager of NES 3.6.x, choose Server Preferences|MIME Types.
On the MIME Types page, add a new MIME type.
Set the Type field to type, and the content type to magnus-internal/shellcgi
In the File Suffix field, enter php Click here for screenshot
Test the 2nd step
Put the test.php file in the document root of your server
Then type http://server/test.php
If you can see "nothing to write" in your browser then it works!
But after doing all these works yet PHP program does not work. I am using Windows XP &
PHP 4.3.4. My queries are:
1. Is it possible to configure Sun ONE Web Server in this way?
2. If so then what went wrong?
3. If not then someone please tell how it can be done?
Waiting for the reply and THANKS in advance for your assistance.