|
| Apr 26 |
|
| Dec 14 |
|
| Dec 14 |
|
| Dec 14 |
|
| Dec 8 |
|
| Sep 21 |
|
| Sep 21 |
|
| Sep 21 |
|
| Sep 21 |
|
| Sep 21 |
|
STOP: It's really much much easier to build the extension on *IX than on Windows. That's because on Windows it's a prerequisite for building a PHP extension that you can build PHP itself from source. On *IX all you need is a working PHP environment, and the process is well-documented. If you already build PHP from source on Windows, then you probably won't need these instructions. But if you don't, and want to give it a go ... Building PHP and the extension on WindowsWe run SCA/SDO development in a branch in the SDO CVS directories because there is an automated process that builds each PECL extension for the Windows environment so that people can download the dll's without having to build them. The automated process takes the code from HEAD. Now if we were to develop in HEAD we would either be breaking that automated build or introducing new functionality into the dlls that people are downloading before it's ready to be released. So you now know why we develop in a branch but this doesn't help you get a working build of the branch on your Windows PC. Here's what I do... Get a compiler that will compile C++ I'm using Visual Studio.net V7 but it appears from the PHP web site that the free visual studio express will do the job (although I've not tried it). You need to go and install a compiler and then ensure that you environment has all of the correct environment variables set. On Visual Studio express it will be something like C:\vcexpress2005\VC\bin\vcvars32.bat Take the latest complete PHP source code release (I'm using 5.2.1) [1]Build the source into a working PHP executable using the documented instructions [2] Test some sample scripts to make sure it works Now you have a working PHP system against which you can build our PECL extension. The SDO part of SCA_SDO contains some C++ code so this needs to be included in the PHP build process. Get the source code for SCA_SDO into the right place to compileFrom the previous steps you will have the following directory structure bindlib_w32 php-5.2.1 win32build You need to create a new directory (<MyDir>/pecl). This has to be directly under <MyDir> and will hold the source for any PECL extensions you choose to compile. To hold sdo create a new directory (<MyDir>/pecl/sdo). Go to this directory and check out the SCA_SDO source code. There is a page in the documentation that describes how to access CVS anonymously [3]. You will of course need to get yourself set up with a CVS client (I used the CVS client in Eclipse) but there are plenty of alternatives. Also you will need to go get SCA_SDO and not php. A command something like the following should do the trick. cvs -d :pserver:cvsread@cvs.php.net:/repository/pecl/sdo checkout <current-development-branch> /pecl/sdo You'll need to substitute the name of the current development branch. You'll find this in a file called DEV_BRANCH in the root directory. (But at this point you haven't checked the code out! Browse to http://cvs.php.net/viewvc.cgi/pecl/sdo/DEV_BRANCH?view=markup to find it). This name will change with each release. You will have to convert this into whatever form your CVS client requires. Get dependenciesThe C++ code in SDO depends on libxml2 which in turn depends on iconv and zlib. Our docs [4] describe this dependency and point off to the libxml site. This in turn points off to [5] for windows binaries. You will also need libcurl if you want to get the jsonrpc and xmlrpc support to work but you can leave it out in the first instance. Configure PHP buildHaving got all of this together you need to configure the PHP build to include the sdo extension. You do this by repeating the cscript configure.js --with-extra-includes=c:\win32build\include;Note. The line breaks I have put in here are for clarity and the command will not work with line breaks on windows. You can miss out the curl bits if you don't have that yet. During the nmake stage of the build process the sdo files should now be built and packaged as a dll called php_sdo.dll in the php-5.2.1/Debug_TS directory. Note that I turned debug on in the configure step hence this directory name. Configure the PHP runtime to pick up the sdo extensionYou have to tell PHP to use the sdo extension by adding some information to the php.ini file. Assuming php.ini is in the directory extension_dir="./" Having done all of this sdo should be configured to run in PHP. If you type php -m you should see "sdo" in the module list. References[1] http://www.php.net/downloads.php
|
| ||||||||||||||||||||||||||||
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2009 Google |