Page 1 of 1

help required !!!

Posted: Thu Aug 14, 2003 3:33 pm
by aaditya
i am new to php.

i am assigned the administration of my college website. i want to expand it to php. for that i have to check it some where, rt? so i installed pws coz my system is win98.
and my question is. i installed php on my system and mysql too. but when i put a sample php page in my :\inetpup\wwwroot folder i was not able to acces it using h++p://localhost/test.php

but i can get test.html.

why is this so?

i use dreamweaver too.

Posted: Thu Aug 14, 2003 3:43 pm
by JayBird
You need to tell PWS to Parse the php page using php.exe, the instaler should have done it for you, but if now, try this:

Run Regedit
Navigate to: 'HKEY_LOCAL_MACHINE /System /CurrentControlSet /Services /W3Svc /Parameters /ScriptMap'
On the edit menu select: 'New->String Value'
Type in the extension you wish to use for your php scripts. ex: '.php3'
Double click on the new string value and enter the path to 'php.exe' in the value data field. ex: 'c:\php3\php.exe %s %s'. The '%s %s' is VERY important, PHP will not work properly without it.
Repeat these steps for each extension you wish to associate with PHP scripts.
Now navigate to: 'HKEY_CLASSES_ROOT'
On the edit menu select: 'New->Key'
Name the key to the extension you setup in the previous section. ex: '.php3'
Highlight the new key and in the right side pane, double click the "default value" and enter 'phpfile'.
Repeat the last step for each extension you set up in the previous section.
Now create another 'New->Key' under 'HKEY_CLASSES_ROOT' and name it 'phpfile'
Highlight the new key 'phpfile' and in the right side pane, double click the "default value" and enter 'PHP Script'
Right click on the 'phpfile' key and select 'New->Key', name it 'Shell'
Right click on the 'Shell' key and select 'New->Key', name it 'open'
Right click on the 'open' key and select 'New-Key', name it 'command'
Highlight the new key 'command' and in the right side pane, double click the "default value" and enter the path to 'php.exe'. ex: 'c:\php3\php.exe -q %1'. (don't forget the '%1')
Exit Regedit

Really though, you should think about using apache.

You can get a FREE package call PHPDEV whick you can get from http://www.firepages.com.au. This installs apache, php and MySQL all at onece and configures everything for you. Its ready to go, straight after installation. Be sure to uninstall PWS before you install PHPDEV though.

Hope this helps

Mark