On 23 Apr, 11:25, Jack Zai <[EMAIL PROTECTED]> wrote:
> Hi Simon ,
> I am new to SCA for PHP, I have installed the latest release (1.1.2)
> using PECL, but it looks somehow (directory structure) different from
> the Buzzard branch. So how can I get the new contents before the next
> release is ready?  Can I just download the new files and copy them
> into my local disk, but how about the .dll file for Windows users, do
> I need a new one as well.
> Thanks,
> Jack

Hi Jack

Very good question. We 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 its 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

- 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


- Take the latest complete PHP source code release (I'm using 5.2.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 compile.
>From the previous steps you will have the following directory

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:[EMAIL PROTECTED]:/repository/pecl/sdo checkout

You will have to convert this into whatever form your CVS client

- Get dependencies. The 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.

- Having got all of this together you need to configure the PHP build
to include to SCA_SDO extension. You do this by repeating the
buildconf and configure process from the first step. This time round
though you need to tell configure about SDO and its dependencies.
Here's the configure line I use on windows:

cscript configure.js --with-extra-includes=c:\win32build\include;
                            --enable-debug -
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 the
curl bits out if you don't have that yet.

During the nmake stage of the build process the sdo files should now
be built and pacakged as a dll called
php_sdo.dll in the php5.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 extension.

You 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
php5.2.1/Debug_TS you need to set the following:


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.

I am bound to have missed something out here so I would be very
surprised if you got through this first time with no problems. Even
though I've done this plenty of times now I always seem to have to
fiddle around with things to make it work.

Anyhow I hope that helps and let us know how you get on.



[1] http://www.php.net/downloads.php
[2] http://www.php.net/manual/en/install.windows.building.php
[3] http://www.php.net/anoncvs.php
[4] http://uk2.php.net/sdo/
[5] http://www.zlatkovic.com/libxml.en.html

You received this message because you are subscribed to the Google Groups 
"phpsoa" group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to