Installation of PHP SDO_SCA for PHP 5.3

1066 views
Skip to first unread message

jongiddy

unread,
Aug 10, 2010, 6:45:12 AM8/10/10
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.

Thanks,
Jon.

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

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

$ svn co http://svn.php.net/repository/pecl/sdo/branches/GOLDCREST
$ cd 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
correctly

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
also
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

**** OPTIONAL
There is already a package.xml file, so the following steps are
optional:
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)

**** REQUIRED
$ 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
extension=sdo.so
===

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

Peter

unread,
Aug 1, 2011, 5:15:13 PM8/1/11
to php...@googlegroups.com
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:
https://pety.homelinux.org/cloudbank_repo/SCA_SDO-1.2.5.tgz

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): https://pety.homelinux.org/cloudbank_repo/SCA_SDO-1.2.4-fix_php_5.3.3_gcc_4.4.5.patch

I hope this helps someone :)


Peter


---------- 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.

Thanks,
Jon.

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

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

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

CloCkWeRX

unread,
Sep 4, 2011, 7:37:49 AM9/4/11
to phpsoa
Hey Peter/John,
I forked the svn trunk version (as opposed to the goldcrest branch
mentioned; I didn't see that bit) to github and applied the same
steps.

You can create your own fork and apply further fixes if you like.
https://github.com/CloCkWeRX/sdo

make test shows only one failing test:
test for bug #9243 - unnecessary warning messages loading remote
schema [tests/SDO/phpt/bug9243.phpt]


I'm part of PEAR (rather than PECL); so there's a (very) slim chance I
can actually get the pecl maintainers to pick up the fixes and make it
official :) Mostly by annoying them in a polite fashion

mansi gupta

unread,
Feb 26, 2013, 5:05:08 AM2/26/13
to php...@googlegroups.com
Hi,

Can i get the dll file after the build.I need to use it with the xamp php version 5.3.1

Regards,
Mansi

Peter Sági

unread,
Apr 12, 2014, 4:31:56 PM4/12/14
to php...@googlegroups.com
Just becouse I still see downloads of the tarball :)

The new address is:

https://pety.rr.nu/cloudbank_repo/SCA_SDO-1.2.5.tgz

Peter

Marc Gagnon

unread,
Jul 8, 2014, 10:34:19 AM7/8/14
to php...@googlegroups.com
Hi Peter,

I was having a lot of trouble getting things to compile on Mac OS 10.6.8. I finally just did an OS upgrade to Mavericks and still got compilation errors.

I change "function_entry" to  "zend_function_entry" which fix several errors, but now am getting new ones:

SDO_CPPException.cpp:90:42: error: no member named 'default_properties' in '_zend_class_entry'

        zend_hash_copy(object->properties, &ce->default_properties, (copy_ctor_func_t)zval_add_ref,


SCA_SDO-1.2.5/SDO_CPPException.cpp:221:16: error: no matching function for call to 'get_active_class_name'

                class_name = get_active_class_name(&space TSRMLS_CC);

As well as several warnings.

Any ideas on how to fix this?

Any help would be much appreciated as we've been at this for several days now.

Peter Sági

unread,
Jul 8, 2014, 12:54:55 PM7/8/14
to php...@googlegroups.com
I do not know if there is anyone else on this list :) but I have no
experience on OS X.
I guess, you know that this PHP SDO_SCA is quite obsolete. The last time
I tried (and succeeded) to compile it was back in August 2011 on Debian
6 (Squeeze).
I believe you have to port the source code if you want to compile it on
any current OS.
I am still on Debian Squeeze, so I avoided the porting so far...

Please share the patch, if you did it :)

Peter
> --
> You received this message because you are subscribed to the Google
> Groups "phpsoa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to phpsoa+un...@googlegroups.com
> <mailto:phpsoa+un...@googlegroups.com>.
> To post to this group, send email to php...@googlegroups.com
> <mailto:php...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/phpsoa.
> For more options, visit https://groups.google.com/d/optout.

Marc Gagnon

unread,
Jul 8, 2014, 6:52:18 PM7/8/14
to php...@googlegroups.com
Thanks for the quick reply Peter. 

We've been at it all afternoon, and I think we're going to try to go another way with this. Far too much of a problem.

Thanks again.
Reply all
Reply to author
Forward
0 new messages