How to set up Son hServer to run PHP scripts
-----------------------------------------------
Download PHP, better as zip-archive.
Unpack archive into empty folder, better is
C:\php
Run Son hServer and enter its options.
Go to "CGI" tab, in "CGI dir" field enter
relative URL of dir with Your php-scripts.
If You want to run PHP scripts in any place
of Your site - enter just slash /
Create (on same tab) association of files
php,php3,php4,php5,phtml and others (where
You want to use PHP code) with php-cgi.exe
interpreter. When doing this specify full
path to php-cgi.exe including directory and
filename.
Create or copy file php.ini to interpreter`s
folder (as example, see file that`s placed
in the same dir as document that You read
now).
Open this php.ini with any text editor.
In php.ini find parameter cgi.force_redirect
and set it to zero:
cgi.force_redirect = 0
do not forget uncomment (i.e. delete ";"
sign if it is present there). It`s already
done in my example.
In the same way set up following variables:
doc_root to be equal full path to Your site
  (not an URL! same path set as server root
  folder in options - "Main" tab);
cgi.force_redirect = 0
cgi.rfc2616_headers = 1
date.timezone to be equal Your time zone
  e.g. for me
  date.timezone = "Europe/Moscow"
Save php.ini.
Place info.php file into server root dir
(info.php is located in the same dir with
text that You are reading now).
Go in web-browser to
http://localhost/info.php
You`ll see long page with PHP logo at the
top. Now You can install php-scripts.
------------------------------------------
Remark: if You use PHP-script(s) as index
files for directories - do not set "Denie
access to non-programs in CGI dir" flag!