2006 May 10 11:49 PM
Hi
I tried to install PHP 5.1.4 and Sun One Web Server 6.1. I am not able to complete this and got stuck. All the available materials in net seems to flow above my head.
It will be very helpful if someone could let me know the step by step configuration a bit brief for the same.
Thanks in advance
Kathirvel Balakrishnan
2006 May 11 6:47 AM
2006 May 11 8:04 AM
Hi Craig
I am following these steps,
1st step : Installing PHP on the WindowsNT server (NT users only)
Copy the php files on your server
Get the php zip file
Copy the php files under a directory (for example : d:php4)
(be careful don't use c:Program Filesphp because of the space between Program and Files
copy php4ts.dll to c:winnt and msvcrt.dll if you don't already have it on your system
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:php4extensions ; directory in which the loadable extensions (modules) reside.)
copy php.ini in winnt directory (php.ini is parsed in my config)
Matthias Kramer told me that he had to move php.ini to <path-to-netscape-server>/https-servername/config for it to be parsed
Make a file association under Windows NT
In a DOS Window, type assoc .php=PHPScript
ftype PHPScript=d:php4php.exe %1 %*
Test the 1st step
Create a C:test.php file with a single line like <? echo("Nothing to write"); ?>
Create a C:test.bat file with 2 lines test.php
pause
double-clic on test.bat
If you see something like X-Powered-By: PHP/4.0.3
Content-type: text/html
Nothing to write
then the NT association works!!
--------------------------------------------------------------------------------
2nd step : Configuring Netscape Enterprise Server or iPlanet for PHP4 with nsapi (NT & UNIX)
Unix users only
Compile PHP as follows: ./configure --with-nsapi=/usr/local/netscape/server4 --enable-libgcc
make
make install
Add LD_LIBRARY_PATH=<libdir> to your Netscape server startup script
where <libdir> is the full path to the directory where libstdc++.so.2.10.0 is located (usually /usr/local/lib)
Add a mime-type to the Netscape Server
In the Netscape Administration console chose Preferences|Mime Types
Add a new type called magnus-internal/x-httpd-php for exts=php
Click here for screenshot
Stop your Web Server
Make a copy of obj.conf located in: <path-to-netscape-server>/https-servername/config
Modify obj.conf
There are several section in obj.conf
At the end of the Init section of obj.conf (necessarely after mime type init),
place this two lines For NT users
Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" shlib="d:/php4/sapi/php4nsapi.dll"
Init fn="php4_init" errorString="Failed to initialise PHP!"
For Unix users
Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" shlib="/usr/local/netscape/server4/bin/libphp4.so"
Init fn="php4_init" errorString="Failed to initialise PHP!"
In The < Object name="default" > section,
place this line (necessarely after all 'ObjectType' and before all 'AddLog' lines) Service fn="php4_execute" type="magnus-internal/x-httpd-php"
Add a new object called x-httpd-php <Object name="x-httpd-php">
ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
Service fn=php4_execute
</Object>
Restart your Web Server
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!
AS mentioned in step 1,
I am not getting the PHP message.
I am installing it in my laptop, it has no IP, is that has to do something with this.
Please guide me from here.
Thanks in advance
Kathirvel
2006 May 11 10:23 AM
Have you tried simply setting the PATH statement of the system to include PHP instead of just the file assoc.
@echo off
path=%path%;d:php4;
cd C:
php test.php
pause
If that works then the problem is 100% your file association.
2006 May 11 10:51 AM
hi,
you have no ip? what does that mean? you're simply offline or don't you even have a NIC (network card) or don't have TCP/IP configured?
What do you enter for 'server' then in the URI http://server/test.php? 127.0.0.1? localhost?
Is your webserver running at all? http://server -> Welcome, blabla?
Have you turned on full reporting in php.ini (errors, warnings, info)? what does it say? 404? 500? 403?
Questions, questions, questions....
anton
2006 May 11 12:49 PM
Hi Craig
Thanks for that information.
<?PHP echo("Nothing to write"); ?>
And added the messases you told, it gave me
<b>"Nothing to write"</b> in the console. I believe that solves my PHP problem.
But instead of <b>path=%path%;c:\php\</b> I set the same in the environmental variables.
Kindly help me to configure the Web Server for the same.
Thanks
Kathirvel
Message was edited by: Kathirvel Balakrishnan
2006 May 11 8:42 PM
The <?php was the other item I thought you might need.
For the other half unless someone else jumps in you'll need to wait as I'm about to fly to Orlando for Sapphire. I'll try getting online over the weekend though and help you out!
2006 May 11 8:46 PM
I take it that http://server comes up with the default webpage?
what happens when you run
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
?>
In a test.php file in the root of the directory?
2006 May 11 10:42 PM
Hi Craig
I tried to put the test.php in the root directory of my webserver. when i give this URL http://localhost/test.php, it shows a dialog box and asks me to <b>SAVE</b> or <b>OPEN</b>.
Thanks
Kathirvel
2006 May 11 11:01 PM
that is indicative of your web server not knowing what to do with a PHP file. It looks like the server configuration itself is missing the PHP mapping.
This <a href="http://us3.php.net/manual/en/install.windows.sun.php">PHP Sun One installation</a> external link 'may' help.
Regards
John
2006 May 11 11:07 PM
This bit seems hidden in the text but is very important:
In the Netscape Enterprise Administration Server create a new mime type (Category: type, Content-Type: magnus-internal/x-httpd-php, File Suffix: php).
2006 May 12 1:56 PM
Hi John Astill
I too have all these links. Netscape? I think I have mentioned it already I not using that. I could download some configuration guides for the Sun One Server. I will try this and update this thread once it works.
Thanks
Kathirvel
2006 May 12 1:59 PM
Which operating system are you using? I will try to recreate the setup at home.
JohnA
2006 May 13 9:45 AM
2006 May 13 10:04 AM
Hi
I have made all the configuartion given in th guides. When I try to open the php file as,
http://<server>/cgi-bin/test.php
I get the HTTP 500 error message
Thanks
Kathirvel
2006 May 22 3:23 PM
I could not configue for Sun Server
But this managed to help me for Apache
http://www.tanguay.at/installPhp5.php5?step=7
Thanks
Kathirvel