Installing PHP Under Xitami - Installing PHP (Page 3 of 4 )
Download Windows binary for the latest version of PHP. Once you've downloaded it, unzip it into a C:\, rename the folder to "PHP".
Open the PHP.INI-DIST file from C:\PHP folder, locate the following line
;cgi.force_redirect = 1
We need to uncomment this line and change the setting to 0 as shown below to run PHP under Xitami, do the necessary changes and save the file as php.ini in your windows folder (C:\windows on my computer)
cgi.force_redirect = 0
Configuring Xitami for PHP
Point your browser to Xitami admin console http://localhost/admin and click on Configuration. Click on Filters, and put the extension which PHP should parse (i.e. .php) into the field File extensions (.xxx). In Filter command or script put the path and name of your php executable i.e. c:\php\php.exe. Press the Save icon and restart the server to reflect changes.
Alternately you can add the following lines to default.cfg, which will be present in the folder where Xitami is installed and restart the server to reflect changes.
Open your favorite text editor and create a text file and type the following in it
<?php phpinfo(); ?>
phpinfo() is a PHP function which outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment, the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.
Save this file as test.php in C:\Xitami\webpages (your default Xitami Web Root Folder).
Open you browser and type http://localhost/test.php in the address bar, click Go to make sure PHP in configured and running properly.
If the source code appears in the browser and not the output we are expecting, then PHP has not been properly installed or Xitami does not recognizes PHP files, please make sure you have followed the instructions properly.
A few more things you might want to know about Xitami, in the xitami.cfg change the following setting
To Disable the Web-Based Administration (WBA) Interface:
To Change the HTTP Port
You can run Xitami on any port from 80 upwards,to set HTTP port to 5000, set the portbase to 5080,donít forget to add 80 to whatever port you desire.
Xitami default web root folder is a subdirectory called webpages under the Xitamiís installation folder.
By default all the HTTP accesses are logged in the file access.log.
By default all the Errors and console log messages in the file xitami.log. Xitami supports the HTTP GET, POST, and HEADER commands.
All CGI scripts and programs are in a subdirectory called cgi-bin.
You can protect any directories editing the file xitami.aut.