NOTE:

These instructions to install XSLT on Windows PHP (with Apache) are left here
for legacy reasons ONLY, or if you use archaic versions of PHP. If you use PHP
4.1.x or above, please see the more recent instructions and examples at --


http://sniptools.com/php_xslt_on_windows




OLD VERSIONS OF PHP

     Getting XSL and PHP to work on Windows (for PHP versions < 4.1)
     My config: Apache 1.3.14, MySQL 3.23.28 (gamma), PHP 4.0.4pl1

Click here to download *.zip 
 

1.

Unzip the ZIP that you downloaded on your PC. Let us say you extracted it on your Desktop. This will make a folder called "Installing XSL with PHP on Windows" on your desktop.

2.


Look into this folder and copy+paste the following files into your SYSTEM32 folder (for me, this is "c:\windows\system32"):

  • expat.dll
  • sablot.dll
  • xmlparser.dll
  • xmltok.dll
  1. The last two might already be in your SYSTEM32 folder. If yes, overwrite them because I know these are working for sure.
  2. If "Access Denied" error appears (on Windows NT machines), please shut down some of your services. I did not take the time to figure out exactly which services use what files. I shutdown the Apache server, and all instances of my browser as well.

3.


Copy/paste the following file into your EXTENSIONS folder for PHP. For me, the EXTENSIONS folder is "c:\apache\php\extensions".

  • php_sablot.dll
  1. If it is already there, overwrite it because I know this one is working for sure.
  2. I used the PHPTriad software to install my PHP on Windows - its pretty handy in general as well because it installs Apache + MySQL + PHP will a clean installable. You might like to grab it from SourceForge.

4.


Thats it, you are done "installing" Sablotron. Now, open your PHP.INI (for me, this is in "c:\apache\php\php.ini") and uncomment the line that says "extension=php_sablot.dll".

So, find the line

;extension=php_sablot.dll

Change the line to:

extension=php_sablot.dll

(Remove the ";" at the beginning to uncomment it).


5.

You are done installing the stuff, now you need some examples to see if the XSL stuff is working or to get a 101 about XSLT in general. I have some preliminary examples that could get you started with the XSLT concepts. All you need to do it copy the folder "xsl" (from my *.zip file) into your Apache root. For me this is "c:\apache\htdocs\xsl" (and most likely is for you as well).

6.

Restart your machine. OK, dont ask - this is what works (perhaps because of the copying of files to system32?)!

7.

Try the "test.php" from your browser. Hopefully, its time to say "Bingo!".

 



D I S C L A I M E R

AFAIK, most of the files I zipped are under the GNU license so they are freely available from these sites anyway: Sablotron | Expat | PHP. I made this helper site with a good intention, not to break any laws. Hope you find this useful. Drop me a note if you wish.


Btw, thanks for all the mail..didn't know this simple page would be so popular.
As I write this, this page has been hit 35, 516 times since September 2001. Which makes it an average of around 97.3 hits per day (for me, and for this page, that is huge!). Thanks.

Back to Shanx.com

 




Shashank Tripathi's tutorial for installing XSL and PHP to work together on a Windows platform {Shanx.com}, Working with PHP and XSLT, XSLT, PHP, Working with Gingerall Sablotron on PHP and Windows XP, Windows 2000, Windows 2k, Win 98, XSLT, PHP 4.1.2, PHP 4.0.4, Sablotron, Windows