PHP+Spread

This is a temporary location for a hacked-about version of the PHP extension for Spread (originally found on PECL here), mentioned in my article about LAMP and Spread on ONLamp.

You can download the source from here.

This “works for me”, but I make no guarantee as to its suitability, useability, compileability… or any other ability for that matter.


Note #1:
At this point I haven’t made any changes to the code since the article.


Note #2:
Contributed from Graeme Merrall, the original module can apparently be compiled (at least under OSX) by commenting out the line:

static unsigned char a2_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };

However, using the module causes a segfault. If anyone using OSX has a positive experience, let me know and I’ll post updates here.


Note #3:

Contributed from Christoph Dorn (thanks Christoph!), this package contains the necessary files to get the extension working for Mac OSX users.

5 Responses to “PHP+Spread”

  1. Ingo Schramm says:

    I have to “export LD_LIBRARY_PATH=/usr/local/lib”, otherwise PHP cannot find the spread libraries on runtime.

  2. dH says:

    Hi,

    the source URL currently says 404 not found. ( http://www.onlamp.com/onlamp/2006/11/30/examples/php_spread.tar.bz2 )

    Can you fix it please?

  3. jrbriggs says:

    I don’t have access to fix it directly. But you can download the code from the top of this page…

  4. dH says:

    Hi,

    thank you I’ve got it! I’ve downloaded the PECL version (v1.1) then I’ve copied your source (spread.c, spread.h) to the pecl sources, I’ve renamed the files to php_spread.c, php_spread.h and I’ve did a ‘phpize’, ‘configure’, ‘make’, ‘make install’. Finally I’ve got a php_spread.so file in the PHP extensions directory as well! PHP loads it well (defined in php.ini) but I cannot use the spread functions (even connect function) using php scripts. Is it the way how I have to build your spread sources? I know you give no guarantee and it ‘works for you’ but if you see I did something wrong please let me know! Thank you.

  5. jrbriggs says:

    Cannot use? Do you get an error message of some kind?

Leave a Reply