No description, website, or topics provided.
C++ C PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
include
lib
tests
vc7.1
vc8.0
vc9.0
.gitignore
README.md
config.m4
config.w32
xiddomdocument.cpp
xydelta.cpp
xydiff.cpp
xydiff.php
xydiff_error_handler.cpp
xydiffprocessor.cpp

README.md

php_xydiff

Table of Contents

Installation

Installing with autotools (Linux / Unix / BSD / Mac OS X)

  1. Compile xerces-c++ 3.x from source, or install binaries + headers for your platform:

    • Ubuntu / Debian:
      apt-get install libxerces-c-dev
    • RedHat / CentOS / Fedora:
      yum install xerces-c-devel
    • Mac OS X (Homebrew)
      brew install xerces-c
  2. Clone the xydiff repository:

    git clone https://github.com/fdintino/xydiff
    
  3. Change directory to where you cloned the repository and generate the files from automake (≥ 1.10), autoconf (≥ 2.61) and m4 (≥ 1.4.6):

    ./autogen.sh
    
  4. Run a typical configure / make. If xerces-c was installed into an unusual location, you may need to pass its prefix to configure using, for example, --with-xercesc=/opt/xerces.

    ./configure
    make
    sudo make install
    
  5. Check out the source code for php_xydiff:

    git clone https://github.com/fdintino/php_xydiff
    
  6. Change directory to where you checked out php_xydiff and run the following commands. All --with arguments are optional; you will only need them if configure is unable to determine the install path of libxml, xerces-c, or xydiff.

    phpize
    ./configure --prefix=$PHP_DIR \
     --with-xydiff=$XYDIFF_SRC_DIR \
     --with-xercesc-dir= $XERCESC_DIR \
     --with-libxml-dir=$LIBXML_DIR
     make
     make test
     sudo make install
     
  7. Edit your php.ini file, adding the line:
    extension=xydiff.so

Installing php_xydiff on Windows

Requirements

Installation

  1. Compile (see below) or download php_xydiff-1.0-php53-vc9-x86.zip
  2. Copy php_xydiff.dll to %PHP_DIR%\ext
  3. Copy xerces-c_3_0.dll into the %PHP_DIR%. (Should be in zip binary, or in C:\code\xerces-c-3.0.0-x86-windows-vc-9.0\bin if you're compiling yourself)
  4. Edit your php.ini file, adding the line:
    extension=php_xydiff.dll

Building on windows

  1. Make sure Microsoft Visual Studio 2008 express is installed (download Visual C++ 2008 express installer).
  2. Install the Microsoft Windows SDK v6.1 if it is not already installed (download). Restart after installing.
  3. Create a working directory for the code. We will assume from here on in that this directory is C:\code.
  4. Download the Xerces 3.0.0 binaries compiled for Windows VC9 and extract them in C:\code. They should now be in the folder C:\code\xerces-c-3.0.0-x86-windows-vc-9.0.
  5. Check out xydiff into C:\code\xydiff:
    git clone https://github.com/fdintino/xydiff
  6. Open C:\code\xydiff\vc9.0\xydiff.sln. Choose "Release" as the active configuration, and build the solution
  7. Unzip the php_build_53_x86_vc9.zip file in the Downloads section of this repo into C:\code. The contents should now be in the directory C:\code\php_build_53_x86_vc9. 1
  8. Create the directory C:\usr\local\share and copy C:\code\php_build_53_x86_vc9\bin\bison.simple to this directory.
  9. Get the source code for php 5.3.2 (download) and extract it into C:\code. The contents should now be in the directory C:\code\php-5.3.2.
  10. Check out the source code for php_xydiff into C:\code\php-5.3.2\ext\xydiff.
    git clone https://github.com/fdintino/php_xydiff C:\code\php-5.3.2\ext\xydiff
  11. Open Start → Programs → Microsoft Windows SDK v6.1 → CMD Shell
  12. Issue the following commands:
"C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
[if on 64 bit windows: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"]
setenv /x86 /xp /release
set PATH=%PATH%;"C:\code\php_build_53_x86_vc9\bin"
cd C:\code\php-5.3.2
buildconf.bat
cscript /nologo configure.js --with-xydiff ^
       --with-php-build="C:\code\php_build_53_x86_vc9" ^
       --with-extra-includes="C:\code\xydiff;C:\code\xydiff\include;C:\code\xerces-c-3.0.0-x86-windows-vc-9.0\include" ^
       --with-extra-libs="C:\code\xydiff\vc9.0\Release;C:\code\xerces-c-3.0.0-x86-windows-vc-9.0\lib"
nmake clean
nmake

Footnotes

  1. php_build_53_x86_vc9.zip is a combined zip of the following files/libraries upon which php 5.3.X depends:

    [back]