This project is read-only.

Getting started from zero knowledge

Nov 11, 2016 at 10:55 AM
Hi

I am trying to get up and running with phpWord because it sounds amazing. I have tried to work my way through the installation instructions but I don't really know what I am doing and so after I have done a step I don't know how to check if I've done it properly.

My server is Windows Server 2008 running IIS. What I have done so far:
  1. Downloaded php-5.6.28-nts-Win32-VC11-x86 and installed this. This appears to be working as when I load my test.php page with phpinfo(); it shows a page with a load of info and PHP Version 5.6.28 at the top.
  2. I then installed composer on the server - I know this is working as it downloaded stuff for me in later steps of the installation.
  3. On the server I then typed composer require zendframework/zendframework and it downloaded a bunch of stuff - I am not sure where it actually put everything but it seemed to have worked.
  4. On the server I then typed composer require phpoffice/phpword "v0.13.*" this downloaded and installed pclzip, common and phpword files. Again, I don't know where those files actually went but it seems to have worked.
Things I am unsure of at this point:
  1. Do I need to do anything with regards XML Parser extension
  2. What is Zend\Stdlib component and how do I get it
  3. What is Zend\Validator component and how do I get it
My test script begins with this:

<?php
require_once 'bootstrap.php';

// Creating the new document...
$phpWord = new \PhpOffice\PhpWord\PhpWord();
?>

More questions:
  1. What is bootstrap.php and does my php script know where to look for it? Does bootstrap.php need to be in the same folder as my test script?
  2. I am getting a 500 error when I run my test script - do I need to tell IIS where the phpword library is or should composer have done that for me?
Thanks very much - like I say I am starting from zero knowledge. I'd be happy to turn an answers into a complete beginner's guide and make it available to all.

Thanks very much

Ed