DaVieS007 / mod_vhs

Other
2 stars 2 forks source link

zend_qsort #2

Open wsritab opened 5 years ago

wsritab commented 5 years ago

Hi

Since PHP 7.1 uses zend_sort instead of zend_qsort. This change breaks the make of mod_vhs. Is it possible to use zend_sort instead. Is it possible to make an update.

error log

./include/vhs_php_config.h:20:75: error: too many arguments to function call, expected 4, have 6 zend_alter_ini_entry("doc_root", sizeof("doc_root"), path, strlen(path), 4, 1);


/usr/local/include/php/Zend/zend_ini.h:77:1: note: 'zend_alter_ini_entry' declared here
ZEND_API int zend_alter_ini_entry(zend_string *name, zend_string *new_value, int modify_type, int stage);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
                  ^
In file included from mod_vhs.c:31:
./include/vhs_php_config.h:51:83: error: too many arguments to function call, expected 4, have 6
                        zend_alter_ini_entry("open_basedir", 13, obasedir_path, strlen(obasedir_path), 4, 16);
                        ~~~~~~~~~~~~~~~~~~~~                                                           ^~~~~
/usr/local/include/php/Zend/zend_ini.h:77:1: note: 'zend_alter_ini_entry' declared here
ZEND_API int zend_alter_ini_entry(zend_string *name, zend_string *new_value, int modify_type, int stage);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
                  ^
In file included from mod_vhs.c:31:
./include/vhs_php_config.h:54:65: error: too many arguments to function call, expected 4, have 6
                        zend_alter_ini_entry("open_basedir", 13, path, strlen(path), 4, 16);
                        ~~~~~~~~~~~~~~~~~~~~                                         ^~~~~
/usr/local/include/php/Zend/zend_ini.h:77:1: note: 'zend_alter_ini_entry' declared here
ZEND_API int zend_alter_ini_entry(zend_string *name, zend_string *new_value, int modify_type, int stage);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
                  ^
In file included from mod_vhs.c:31:
./include/vhs_php_config.h:66:54: error: too many arguments to function call, expected 4, have 6
                zend_alter_ini_entry("display_errors", 10, "1", 1, 4, 16);
                ~~~~~~~~~~~~~~~~~~~~                               ^~~~~
/usr/local/include/php/Zend/zend_ini.h:77:1: note: 'zend_alter_ini_entry' declared here
ZEND_API int zend_alter_ini_entry(zend_string *name, zend_string *new_value, int modify_type, int stage);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
                  ^
In file included from mod_vhs.c:31:
./include/vhs_php_config.h:96:66: error: too many arguments to function call, expected 4, have 6
                                zend_alter_ini_entry(key, strlen(key) + 1, val, strlen(val), 4, 1);
                                ~~~~~~~~~~~~~~~~~~~~                                         ^~~~
/usr/local/include/php/Zend/zend_ini.h:77:1: note: 'zend_alter_ini_entry' declared here
ZEND_API int zend_alter_ini_entry(zend_string *name, zend_string *new_value, int modify_type, int stage);
^
/usr/local/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
                  ^
5 errors generated.
apxs:Error: Command failed with rc=65536
.
*** Error code 1

Best Regards 

Erik
wsritab commented 5 years ago

Work Around for FreeBSD port. edit the Makefile and change line 29

from AP_EXTRAS+= -DHAVE_MOD_PHP_SUPPORT

to

AP_EXTRAS+= -DHAVE_MOD_PHP_SUPPORT

The suport for PHP will be disabled but everything else works.

DaVieS007 commented 5 years ago

I queued it to myself to do a fix under BSD clang, PHP 7.1 ,.., PHP 7.3 versions at my free time, that is not so much nowadays. Trying my best.