Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Apr 2010 11:14:52 +0200
From:      Alex Dupre <ale@FreeBSD.org>
To:        ports@freebsd.org
Subject:   To all maintainers of (broken) PHP extensions
Message-ID:  <4BC2E48C.9030508@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
A few thirdy party pecl extensions broke after the PHP update to 5.3.2
release. My apologies for it, but since PHP 5.3.0 was released 9 months
ago, this means that there is already a newer version of the extension
with PHP 5.3 support, or the extensions is unmaintained and perhaps
obsolete.

If you are going to fix your port, here is a list of the most common
errors with proposed solutions:

1) error: duplicate 'static'

The macro ZEND_BEGIN_ARG_INFO_EX already includes 'static const'
keywords in the signature, so it's enough to remove the additional 'static'


2) error: 'struct _zend_compiler_globals' has no member named
'extended_info'

The member has been renamed to 'compiler_options' to hold additional
variables. So, for example, if the code looks like:

 CG(extended_info) = 1;

you can modify it in this way:

 CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;


3) error: 'zval' has no member named 'is_ref'
   error: 'zval' has no member named 'refcount'

The access to such members is wrapped by a few macros (look at zend.h
for a complete list). So for example, if the code looks like:

 if (z->is_ref)
     z->refcount++;

you can modify it in this way:

 if (Z_ISREF_P(z))
     Z_ADDREF_P(z);

-- 
Alex Dupre



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BC2E48C.9030508>