Sablotron XSLT , PHP, Apache on Windows (and a basic XSLT tutorial)
It is actually quite simple to get it working, but not adequately documented on the PHP website. Get straightforward, bullet point instructions here (installs PHP as a module which is in fact faster than running it as CGI).
It is actually quite simple to get it working, but not adequately documented on the PHP website. Get straightforward, bullet point instructions here (installs PHP as a module which is in fact faster than running it as CGI).
- Get the latest PHP package from http://qa.php.net/ and unzip it. It will automatically create a folder named PHP_version. (P.S. Novice users may want to skip this entirely and download PHP, MYSQL etc bundled as
XAMPP from Apachefriends.org.) - Please follow the instructions in the README to install
Apache as a module (faster than running as CGI). This should include –- Copying the latest PHP files into your C:PHP or wherever you have your PHP installed,
- Putting your PHP.INI file in the right place, mine is in C:WINDOWS (you must have only one valid INI file),
- Copying the php4ts.dll file from your downloaded PHP_version folder into C:WINDOWSSYSTEM32
- Copy all the *.dll files from your downloaded
PHP_versionDLL folder into the C:WINDOWSSYSTEM32.
This will include the latest expat.dll and the
sablot.dll. - Copy the php_xslt.dll from your downloaded PHP_versionEXTENSIONS folder into the C:WINDOWSSYSTEM32.
- Now, open your PHP.INI and uncomment the
php_xslt.dll extension.-
# Remove the semi-colon ";" at the beginning
# of the line to uncomment the PHP_XSLT extension
OLD LINE –> ;extension=php_xslt.dll
NEW LINE –> extension=php_xslt.dll
-
- Just for reference, my HTTPD.CONF file for Apache
has the PHP module working as follows:-
# P.S. The LoadModule should be php4apache2.dll
if you use Apache 2
ScriptAlias /php/ "c:/php/"
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
-
# P.S. The LoadModule should be php4apache2.dll
- Restart Apache, and hopefully time to say Bingo! If you have problems, please let
me know.
Testing your PHP XSLT installation:
Following is a zip file containing some examples for you to
test out your XSLT installation. Unzip it into your htdocs
folder, it will create a subfolder called xsltest.
Please read the README.TXT file inside this ZIP file for more.
Important notes to make sure XSLT works with PHP module of Apache:
- If running PHP as a module gives you problems, make sure you copy the
php4ts.dll file from your downloaded PHP_version
folder into C:WINDOWSSYSTEM32. This is
most often the cause of errors. - Make sure you don't have many copies of the same DLLs lurking around
in various folders. This is often the problem. Specifically, for instance,
the same DLLs should not exist in C:WINDOWSSYSTEM and the C:WINDOWSSYSTEM32
folders. - If you are using really ancient versions of PHP (i.e., version less
than 4.1.xx) then this page
may be useful to you as well.