note 7913 deleted from Installation by ronabop
| From: | ronabop@php.net | Date: | Sat, 26 Aug 2000 04:51:47 +0000 |
| Subject: | note 7913 deleted from Installation by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3296@lists.php.net to get a copy of this message | ||
My config: PHP4 (php-4.0.1pl2), Win98 SE, Personal Web Server (PWS)
I had some troubles getting PHP to function but did get it. I'm not sure how I fixed it. There
are two possibilities:
1) I was naming my test files phptest.html, instead of phptest.php (I didn't realize until just
now that was necessary :/ )
or
2) I got it right via this install method:
- rename php.ini-dist file to php.ini and place in Windows dir.
- Edit php.ini file:
Leave doc_root var empty
Set extension_dir var to "c:progra~1php"
Set browscap var to "c:windowssysteminetsrvbrowscap.ini"
(In all cases above the quotes (") are used for the var settings)
- copy php4ts.dll & MSVCRT.DLL to WindowsSYSTEM dir.
- Create C:Program FilesPHP dir; place php.exe and all php*.dll files there.
- Edit registry:
Set [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesw3svcparametersScript Map]
".php"="C:\Program Files\PHP\php4isapi.dll"
- I then followed the PHP3 install manual for further Registry edits:
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: .php (A program had already
claim this key, so I overwrote the value according to the next step)
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:phpphp.exe -q %1. (don't forget the %1).
Exit Regedit.
- In PWS manager, Advanced Tab, select Home virtual directory, click Edit Properties button, select
"Execute" checkbox and click OK. Repeat for a few virutal dir's I made for myself.
I tested by making a file phptest.php, with the following code, and put it in the Home virtual
directory. (Replace ['s with <'s)
[html]
[head]
[title]Example[/title]
[/head]
[body]
[script language="php"]
echo("Hi, I'm a PHP script!");
[/script]
[/body]
[/html]
then point browser to http://localhost/phptest.php
If it works, you'll see the text "Hi, I'm a PHP script!"
I hope this saves other clueless PHP newbies some of my pain :)