Simon Laws wrote:
Ok, so after a rather lengthy (and relaxing) Christmas break I'm starting to work again on building up the PHP capability in the C++ SCA implementation.
There was some work done before Christmas documented on our PHP SCA site
here [1]. There were some previous mail exchanges talking about the problem
generally [2] and talking about the slight discontinuity between the way
that composition is represented in PHP SCA annotations compared to the SCA
SCDL files in C++ SCA [3].

The first thing I'm going to do is get the existing C++ PHP Extension up and running again and submit any changes that are required now that C++ SCA has
moved on and I'm on to a new version of PHP. I'll add some more detail to
the README about what to do. This note was just to get the ball rolling
again so I'm sure there will be lots more issues to discuss very shortly.

Regards

Simon

[1] - http://www.osoa.org/display/PHP/PHP+SCA+Extension+For+Tuscany+CPP+SCA [2] - http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg11572.html [3] - http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg11747.html


Simon,

How are you building the PHP runtime to work both with the PHP SCA_SDO package at http://pecl.php.net/package/SCA_SDO and the Tuscany PHP extension?

I built PHP 5.2.0 on my Linux box like this:
./configure --prefix=/home/delfinoj/Tuscany/php5/php-5.2.0-bin --with-apxs2 --enable-embed
make
make install

--enable-embed allows linking with extension (and in particular the Tuscany extension)
--with-apxs2 allows PHP5 to run as an Apache2 module (rather than CGI).

I then built and linked the Tuscany extension to libphp5.so, like this:
libtuscany_sca_php_la_LIBADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \
       -L$(top_builddir)/runtime/core/src -ltuscany_sca \
       -L${PHP_LIB} -lphp5

INCLUDES = -Imodel -I$(top_builddir)/runtime/core/src \
          -I${TUSCANY_SDOCPP}/include \
          -I${PHP_INCLUDE} \
          -I${PHP_INCLUDE}/main \
          -I${PHP_INCLUDE}/Zend \
          -I${PHP_INCLUDE}/TSRM \
          -I${PHP_INCLUDE}/sapi/embed


The problem is that when I try to run Tuscany outside of Httpd (from the command line) the PHP extension won't load, complaining about unresolved references to Httpd symbols. Here's the log:

2555:3086005952 Library: /home/delfinoj/Tuscany/apache-deploy/cpp/sca/extensions/php/lib/libtuscany_sca_php.so 2555:3086005952 SystemConfigurationException raised: Unable to load library: /home/delfinoj/Tuscany/apache-deploy/cpp/sca/extensions/php/lib/libtuscany_sca_php.so: /home/delfinoj/Tuscany/php5/php-5.2.0-bin/lib/libphp5.so: undefined symbol: ap_rwrite 2555:3086005952 SystemConfigurationException raised: Unable to load library: /home/delfinoj/Tuscany/apache-deploy/cpp/sca/extensions/php/lib/libtuscany_sca_php.so: /home/delfinoj/Tuscany/php5/php-5.2.0-bin/lib/libphp5.so: undefined symbol: ap_rwrite
2555:3086005952     << void tuscany::sca::util::Library::load()

The unresolved symbol, ap_rwrite is in Httpd protocol.c, part of the core Httpd server. Did you run into this issue with PHP SCA_SDO? Are people using two different PHP libraries, one for use inside Httpd the other for use outside?

Thanks,

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to