phpapacheubuntusuhosin

Load extension automatically in PHP5 ubuntu


I'm pretty new in PHP. Learn at college at 10 years ago, and now must face this programming language again. I work as PHP Programmer since 1 month ago. :)

Current situation is: There are Server Available with specification: Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4 with Suhosin-Patch Server

I develop web app from scratch, then I face problem: export to word. I'd google it, and found this solution: https://phpword.codeplex.com/documentation

I don't know how to enable PHP Extension ZipArchive and PHP Extension xmllib. I'd google it too, and it seems we just need to uncomment that extenstion in php.ini.

But when I open php.ini, there are no extension to be uncomment. I can't find ZipArchive and xmllib extension in php.ini. see my preview: dynamic extension

How to load ZipArchive and xmllib extension to my Server?


Solution

  • Installation

    The libxml extension is enabled by default, although it may be disabled with --disable-libxml .

    By default. So you have to install libxml in your system running apt-get install libxml2-dev, and php will use it automatically.

    ZipArchive can be installed using pecl command: pecl install zip