laruence / taint

Taint is a PHP extension, used for detecting XSS codes
Other
611 stars 128 forks source link

compatibility with PHP 5.3.3 #6

Closed christopherowen closed 11 years ago

christopherowen commented 11 years ago

PHP version 5.3.3 is the version that ships with Redhat Enterprise Linux 6 and CentOS 6.

make test will return the following on these systems:

Warning: PHP Startup: Unable to load dynamic library '/usr/local/src/taint-1.2.2/modules/taint.so' - /usr/local/src/taint-1.2.2/modules/taint.so: undefined symbol: INIT_PZVAL_COPY in Unknown on line 0

and compared to a php 5.4 installation, INIT_PZVAL_COPY is truly not defined in /usr/include/php/Zend/zend.h.

Is there any way to get taint working with the php version shipped by RHEL/CentOS?

christopherowen commented 11 years ago

Adding the following in /usr/include/php/Zend/zend.h allows make test to work:

define ZVAL_COPY_VALUE(z, v) \

    do {                                                                            \
            (z)->value = (v)->value;                                \
            Z_TYPE_P(z) = Z_TYPE_P(v);                              \
    } while (0)

define INIT_PZVAL_COPY(z, v) \

    do {                                                                            \
            ZVAL_COPY_VALUE(z, v);                                  \
            Z_SET_REFCOUNT_P(z, 1);                                 \
            Z_UNSET_ISREF_P(z);                                             \
    } while (0)
laruence commented 11 years ago

thanks for reporting this, I will fix the build, thanks

jimmyyem commented 9 years ago

I installed taint and I download source code from: http://pecl.php.net/package/taint. Then I restart http but I found the following error message from /tmp/php_error.log

[05-Jan-2015 16:54:08] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/taint.so' - /usr/lib64/php/modules/taint.so: undefined symbol: INIT_PZVAL_COPY in Unknown on line 0

christopherowen commented 9 years ago

the patch is still necessary