I have managed to make SDO_SCA working (compile, etc.) in the Debian
Squeeze environment (PHP 5.3.3, gcc 4.4.5) based on the below
description from Jon (and others - big THX!).
I am not sure how to submit a patch to the SDO_SCA source tree or make
these changes get to an official release (and into the PECL repo)
anyhow. If you have a hint, please let me know.

Until then, here is the tarball that works for me:

The changes have been made to the RELEASED, stable SCA_SDO-1.2.4.tgz
tarball. I had to change the version to 1.2.5 for some reason (I do
not remember now) but this is really the patched version of 1.2.4 not
a new official release.

Here is the patch file (created w/ the default options suggested by
man patch): 

I hope this helps someone :)


---------- Forwarded message ----------
From: jongiddy <jongi...@gmail.com>
Date: 2010 aug. 10, 12:45
Subject: Installation of PHP SDO_SCA for PHP 5.3
To: phpsoa

I've just been getting the PHP SDO SCA code working with PHP 5.3. Many
thanks to the March 2010 email of cdouglas for the initial steps.

Here are my changes for getting a working SOAP web service. I have not
tested this with PHP 5.2 so cannot guarantee that the changes are
backwards-compatible. Any comments are welcomed.


Instructions to install SCA and SDO modules to work with PHP 5.3

*** Checkout newest branch from Subversion (post 1.2.4 development

$ svn cohttp://svn.php.net/repository/pecl/sdo/branches/GOLDCREST

*** Patch code

Edit sdo.cpp
- remove all "static" modifiers, except "static char rcs_id[]..."

Edit commonj/sdo/SDODataConverter.cpp
- add "#include <stdio.h>"

ereg_replace is deprecated in PHP 5.3, the following change prevents
deprecation warnings being printed, which allows 2 tests to pass

Edit SCA/SCA_CommentReader.php
- Line 381:
$targetLine = ereg_replace("\t", " ", $targetLine);

$targetLine = preg_replace("{[ \t]+}", " ", $targetLine);
- Line 385:
if (strpos($word, $word, $bindingAnnotation) === 0) {

if (strpos($word,$bindingAnnotation) === 0) {
- Line 592:
$targetLine = ereg_replace("\t", " ", $targetLine);

$targetLine = preg_replace("{[ \t]+}", " ", $targetLine);

Edit SCA/SCA_AnnotationRules.php
- Line 222:
$line         = ereg_replace("\t", " ", $line);

$line         = preg_replace("{[ \t]+}", " ", $line);

SoapServer::fault cannot be used as a static method, either need to
use a
SoapServer instance, or just use the SoapFault class

Edit SCA/Bindings/soap/Mapper.php
- Line 84:
SoapServer::fault("Client", "Invalid WSDL Type");

throw new SoapFault("Client", "Invalid WSDL Type");
- Line 188:
SoapServer::fault("Client", "Unable to encode to XML");

throw new SoapFault("Client", "Unable to encode to XML");
- Line 221:
SoapServer::fault("Client", "Unable to create data object");

throw new SoapFault("Client", "Unable to create data object");

Edit SCA/Bindings/ebaysoap/Mapper.php
- Line 61:
SoapServer::fault("Client", "Invalid WSDL Type");

throw new SoapFault("Client", "Invalid WSDL Type");

SoapClient::__setLocation has an optional argument, so subclasses must
use an optional argument - allows 2 more tests to pass correctly

Edit SCA/Bindings/soap/Proxy.php
- Line 367
public function __setLocation($location) {

public function __setLocation($location=null) {

*** Build and install code

There is already a package.xml file, so the following steps are
Create (update) the package.xml file
$ php MakePackage.php make

Validate the package.xml file
$ pear package-validate package.xml
91 warnings to do with SDO_SCA prefix, but no errors
(if using old package.xml, this command shows 92 errors, including one
that the date in the file is not today's date)

$ pear package
- creates SCA_SDO-1.2.4.tgz

$ sudo pear install SCA_SDO-1.2.4.tgz
equivalent to running the following steps:
- phpize
- ./configure
- make
- make install
- install PEAR package in /usr/share/php

*** Tell PHP to load SDO extension
Create file /etc/php5/conf.d/sdo.ini

; configuration for php SCA and SDO module

SCA and SDO modules are now ready to use

*** Uninstall instructions
If you need to reinstall, first run:
$ sudo pear uninstall SCA_SDO-1.2.4.tgz

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 
For more options, visit this group at 

Reply via email to