Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with different rules file for different vhosts #260

Open
fearworksmedia opened this issue Oct 10, 2018 · 37 comments
Open

Issue with different rules file for different vhosts #260

fearworksmedia opened this issue Oct 10, 2018 · 37 comments

Comments

@fearworksmedia
Copy link

Hi,

I might be missing something really obvious, but here goes with my issue...

I have a very simple setup with Apache 2.4.6 on CentOS, with PHP 7.2.8. I have installed the latest git release of Snuffleupagus (0.4.0 according to my PHPInfo).

I have enabled the extension in my php.ini file, but rather than define the location of the rules file in php.ini, I have been experimenting with defining it in the Apache vhost file, like this:

php_admin_value sp.configuration_file "/etc/php.d/snuffleupagus/host1.rules"

As I add more vhosts with slightly different needs/requirements, I would define a separate rules file for a second vhost in the appropriate vhost section of the vhost file, and so on.

However, something doesn't seem to like this. I think it's Snuffleupagus, because if I visit one host, with certain rules defined, and then go to another tab and visit a page from the second vhost, I am finding that sometimes the rules from the first vhost are still being applied, and it sometimes takes a few page refreshes for PHP or Apache or Snuffleupagus or whatever is causing the issue to catch up and use the correct rules file for the correct vhost.

It's almost like one rules file is loaded and used regardless of the vhost I am visiting, and it's held in memory for a certain time before it refreshes and uses the correct rules file.

I am not sure if Snuffleupagus is meant to work like this, or if it is designed to work from ONE rules file ONLY across the entire server?

Keith

@sriccio
Copy link

sriccio commented Oct 10, 2018

Hi, are you using PHP from apache with mod_php, or php-fpm ?

@fearworksmedia
Copy link
Author

Hi,

I am using PHP with mod_php7... is that my problem or is there a way to make this work?

Thanks.

@jvoisin
Copy link
Owner

jvoisin commented Oct 10, 2018

I think that Snuffleupagus doesn't support multiple configuration files for a single php instance :/

@sriccio
Copy link

sriccio commented Oct 10, 2018

Well, on our side, we are currently running snuffleupagus in shared hosting and patched snuffleupagus.c to set the configuration value as PHP_INI_PERDIR instead of PHP_INI_SYSTEM with php-fpm .user.ini in each site directory to set the configuration on the fly.

Seems to work so far.

Maybe this could work with .htaccess using the same patching (untested)?

@sriccio
Copy link

sriccio commented Oct 10, 2018

Our .user.ini content residing in the virtualhost document root

;;
;; aPanel PHP72 configuration file
;; Do NOT edit this file manually! Use the control panel.
;;

sp.configuration_file = "/etc/php/sp/virtualhosts/madjix.ch.conf"
max_execution_time = On
upload_max_filesize = 700M
post_max_size = 700M
display_errors = On
short_open_tag = Off
error_reporting = "7"
magic_quotes_gpc = Off
output_buffering = Off
allow_call_time_pass_reference = Off
register_globals = Off
;;

@sriccio
Copy link

sriccio commented Oct 10, 2018

At least in our production test-run we didn't see any problem with this setup, even when the differents virtualhosts using the same php-fpm pool.
Switching from a site to another seems to re-read the snuffleupagus configuration from the .user.ini at each request without too much overhead.
There are probably better ways to have snuffleupagus being configurable per virtualhost but at the moment that's the only method we get it to work.

@fearworksmedia
Copy link
Author

Thanks for the replies and the suggestions.

Yes it would be great if it could work in a shared environment. I am looking at using Snuggleupagus with Sentora, which is an evolution of ZPanel. Both of these are hosting control panels "in a box" so to speak, with one installation package to install everything needed for hosting. Although I can tweak things for my own setups, I was looking into using Snuffleupagus as a Suhosin replacement to allow us to upgrade to PHP7 without having to rewrite anything else in this package. Changing to a php-fpm setup would require reworking a lot of the code (I think) and I am just experimenting with this, so would like to get it working with the minimum of changes if possible.

I will try setting the configuration value as PHP_INI_PERDIR instead of PHP_INI_SYSTEM in snuffleupagus.c and see if this creates a solution for the setup I am running, and report back.

Many thanks again.

Keith.

@fearworksmedia
Copy link
Author

I have tried with both PHP_INI_PERDIR and PHP_INI_ALL in snuffleupagus.c but still get the same result. I haven't tried moving the rules file declaration out of the apache vhosts file yet to a user.ini file or to the .htaccess file - not sure if there would be any difference or if declaring it in the vhost config file is essentially the same thing as having it in the .htaccess file?

Also, I get some Zend warnings when I run the "make" command, could that have anything to do with it or not?

Many thanks for any help you can give!

Keith

@jvoisin
Copy link
Owner

jvoisin commented Oct 10, 2018

What are those warning?

@fearworksmedia
Copy link
Author

fearworksmedia commented Oct 10, 2018

Sorry for the lengthy post but this is copied from the server when I run "make":

/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/snuffleupagus.c -o snuffleupagus.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/snuffleupagus.c  -fPIC -DPIC -o .libs/snuffleupagus.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/snuffleupagus.c:11:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_config.c -o sp_config.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_config.c  -fPIC -DPIC -o .libs/sp_config.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_config.c:5:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_config_utils.c -o sp_config_utils.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_config_utils.c  -fPIC -DPIC -o .libs/sp_config_utils.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_config_utils.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_harden_rand.c -o sp_harden_rand.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_harden_rand.c  -fPIC -DPIC -o .libs/sp_harden_rand.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_harden_rand.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_unserialize.c -o sp_unserialize.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_unserialize.c  -fPIC -DPIC -o .libs/sp_unserialize.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_unserialize.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_utils.c -o sp_utils.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_utils.c  -fPIC -DPIC -o .libs/sp_utils.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_utils.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_disable_xxe.c -o sp_disable_xxe.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_disable_xxe.c  -fPIC -DPIC -o .libs/sp_disable_xxe.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_disable_xxe.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_list.c -o sp_list.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_list.c  -fPIC -DPIC -o .libs/sp_list.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_list.c:4:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_disabled_functions.c -o sp_disabled_functions.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_disabled_functions.c  -fPIC -DPIC -o .libs/sp_disabled_functions.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_disabled_functions.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_execute.c -o sp_execute.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_execute.c  -fPIC -DPIC -o .libs/sp_execute.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_execute.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_upload_validation.c -o sp_upload_validation.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_upload_validation.c  -fPIC -DPIC -o .libs/sp_upload_validation.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_upload_validation.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_cookie_encryption.c -o sp_cookie_encryption.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_cookie_encryption.c  -fPIC -DPIC -o .libs/sp_cookie_encryption.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_cookie_encryption.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_network_utils.c -o sp_network_utils.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_network_utils.c  -fPIC -DPIC -o .libs/sp_network_utils.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_network_utils.c:5:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/tweetnacl.c -o tweetnacl.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/tweetnacl.c  -fPIC -DPIC -o .libs/tweetnacl.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/tweetnacl.c:3:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_config_keywords.c -o sp_config_keywords.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_config_keywords.c  -fPIC -DPIC -o .libs/sp_config_keywords.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_config_keywords.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_var_parser.c -o sp_var_parser.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_var_parser.c  -fPIC -DPIC -o .libs/sp_var_parser.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_var_parser.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_var_value.c -o sp_var_value.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_var_value.c  -fPIC -DPIC -o .libs/sp_var_value.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_var_value.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_tree.c -o sp_tree.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_tree.c  -fPIC -DPIC -o .libs/sp_tree.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_tree.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_pcre_compat.c -o sp_pcre_compat.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_pcre_compat.c  -fPIC -DPIC -o .libs/sp_pcre_compat.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_pcre_compat.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_crypt.c -o sp_crypt.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_crypt.c  -fPIC -DPIC -o .libs/sp_crypt.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_crypt.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_session.c -o sp_session.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_session.c  -fPIC -DPIC -o .libs/sp_session.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_session.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_sloppy.c -o sp_sloppy.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_sloppy.c  -fPIC -DPIC -o .libs/sp_sloppy.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_sloppy.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=compile cc -std=gnu99  -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector   -c /root/snuffleupagus/src/sp_wrapper.c -o sp_wrapper.lo
libtool: compile:  cc -std=gnu99 -I. -I/root/snuffleupagus/src -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -c /root/snuffleupagus/src/sp_wrapper.c  -fPIC -DPIC -o .libs/sp_wrapper.o
In file included from /usr/include/php/Zend/zend.h:328:0,
                 from /usr/include/php/main/php.h:35,
                 from /usr/include/php/main/SAPI.h:24,
                 from /root/snuffleupagus/src/php_snuffleupagus.h:17,
                 from /root/snuffleupagus/src/sp_wrapper.c:1:
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/usr/include/php/Zend/zend_operators.h:446:2: warning: implicit declaration of function '__builtin_saddl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/usr/include/php/Zend/zend_operators.h:500:2: warning: implicit declaration of function '__builtin_ssubl_overflow' [-Wimplicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/bin/sh /root/snuffleupagus/src/libtool --mode=link cc -std=gnu99 -DPHP_ATOM_INC -I/root/snuffleupagus/src/include -I/root/snuffleupagus/src/main -I/root/snuffleupagus/src -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector  -lpcre -o snuffleupagus.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/snuffleupagus/src/modules  snuffleupagus.lo sp_config.lo sp_config_utils.lo sp_harden_rand.lo sp_unserialize.lo sp_utils.lo sp_disable_xxe.lo sp_list.lo sp_disabled_functions.lo sp_execute.lo sp_upload_validation.lo sp_cookie_encryption.lo sp_network_utils.lo tweetnacl.lo sp_config_keywords.lo sp_var_parser.lo sp_var_value.lo sp_tree.lo sp_pcre_compat.lo sp_crypt.lo sp_session.lo sp_sloppy.lo sp_wrapper.lo
libtool: link: cc -std=gnu99 -shared  -fPIC -DPIC  .libs/snuffleupagus.o .libs/sp_config.o .libs/sp_config_utils.o .libs/sp_harden_rand.o .libs/sp_unserialize.o .libs/sp_utils.o .libs/sp_disable_xxe.o .libs/sp_list.o .libs/sp_disabled_functions.o .libs/sp_execute.o .libs/sp_upload_validation.o .libs/sp_cookie_encryption.o .libs/sp_network_utils.o .libs/tweetnacl.o .libs/sp_config_keywords.o .libs/sp_var_parser.o .libs/sp_var_value.o .libs/sp_tree.o .libs/sp_pcre_compat.o .libs/sp_crypt.o .libs/sp_session.o .libs/sp_sloppy.o .libs/sp_wrapper.o   -lpcre  -O2   -Wl,-soname -Wl,snuffleupagus.so -o .libs/snuffleupagus.so
libtool: link: ( cd ".libs" && rm -f "snuffleupagus.la" && ln -s "../snuffleupagus.la" "snuffleupagus.la" )
/bin/sh /root/snuffleupagus/src/libtool --mode=install cp ./snuffleupagus.la /root/snuffleupagus/src/modules
libtool: install: cp ./.libs/snuffleupagus.so /root/snuffleupagus/src/modules/snuffleupagus.so
libtool: install: cp ./.libs/snuffleupagus.lai /root/snuffleupagus/src/modules/snuffleupagus.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /root/snuffleupagus/src/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/snuffleupagus/src/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

@jvoisin
Copy link
Owner

jvoisin commented Oct 10, 2018

It seems that something is super-wrong with your compilation toolchain. Try a git clean -xdf before rebuilding.

@fearworksmedia
Copy link
Author

Forgive me for asking, but when should I run this command?

These are the commands I am running:

git clone https://github.com/nbs-system/snuffleupagus
cd snuffleupagus/src
phpize
./configure --enable-snuffleupagus
make
make install

Many thanks.

@jvoisin
Copy link
Owner

jvoisin commented Oct 10, 2018

Try a make clean before your make, odds are that you have some compiled objects lying around.

@fearworksmedia
Copy link
Author

No I am still getting the same errors...

@fearworksmedia
Copy link
Author

Ok, I just upgraded PHP from 7.2 to the RC version of 7.3 on my server, and no longer get those warnings when I run the "make" command. I also ran "make clean" just before I ran "make".

No errors or warnings.

I will now see if I have the same problem with different hosts in my shared hosting environment and report back...

Keith

@fearworksmedia
Copy link
Author

To clarify a few points:

  • I have upgraded to PHP 7.3 (release candidate) and when I run the "make" command I no longer get any errors or warnings.

  • I am using php_mod7 with Apache.

  • I am defining the rules file for each host like this, in the Apache vhost config file:

php_admin_value sp.configuration_file "/etc/php.d/snuffleupagus/host1.rules"

  • I changed both occurrences of PHP_INI_SYSTEM to PHP_INI_PERDIR in snuffleupagus.c before running the "make" command.

  • When I use two different rules files for two different vhosts, I get restrictions that should only impact host 1 affecting host 2.

  • When I set two different vhosts to use the same rules file, I do not get a conflict - UNLESS I have a third vhost with a different rules file specified... then I start to get conflicts across the vhosts again.

Any suggestions as to what to try next?

Many thanks for looking into this and helping me out.

Keith.

@sriccio
Copy link

sriccio commented Oct 12, 2018

Hi,

Okay, we've discovered almost the same issue with our tricky approach.

Let's say we have a sp config for vhost1:
/etc/php/sp/virtualhosts/vhost1.conf

#
# aPanel snuffleupagus autogenerated configuration file
#

# SP user configuration from aPanel
sp.disable_function.function("exec").drop()
sp.disable_function.function("passthru").drop()
sp.disable_function.function("shell_exec").drop()
sp.disable_function.function("system").drop()
sp.disable_function.function("proc_open").drop()
sp.disable_function.function("popen").drop()
sp.disable_function.function("proc_terminate").drop()
sp.disable_function.function("curl_multi_exec").drop()
sp.disable_function.function("inject_code").drop()

and vhost2

sp.disable_function.function("exec").drop()
sp.disable_function.function("shell_exec").drop()
sp.disable_function.function("system").drop()
sp.disable_function.function("proc_open").drop()
sp.disable_function.function("popen").drop()
sp.disable_function.function("proc_terminate").drop()
sp.disable_function.function("curl_multi_exec").drop()
sp.disable_function.function("inject_code").drop()

So here basically on vhost2 we allow "passthru"

At the moment if we call a page with a passthru test call on vhost1 and then on vhost2,
vhost1 reject the call and vhost2 too.

BUT

if on vhost2 sp config file we add:

sp.disable_function.function("passthru").allow()

Then everything seems ok.

So basically I think:

  1. snuffleupagus is reading the config correctly between calls on different vhosts (with the PERDIR trick)
    but
  2. snuffleupagus doesn't "clear" the applied rules between calls, so if in vhost1 you drop a function or something, you have to specifically allow it on the other vhost to allow it back.

Now this sounds logical to me, because snuffleupagus is probably made to load the config only once for a php instance so it has no reason to reset it's state between calls.

Maybe there is something to work on here to have it more "multivhost per phpinstanace" friendly ?

@sriccio
Copy link

sriccio commented Oct 12, 2018

We didn't noticed this at first because we're using php-fpm in ondemand mode, so after a few secs idle the php child process are exiting and are forked again on next request for the pool (which clears the snuffleupagus state)

@jvoisin
Copy link
Owner

jvoisin commented Oct 12, 2018

Yeah, the configuration is stored in variables locale to Snuffleupagus, and not per vhost :/

@fearworksmedia
Copy link
Author

We didn't noticed this at first because we're using php-fpm in ondemand mode, so after a few secs idle the php child process are exiting and are forked again on next request for the pool (which clears the snuffleupagus state)

Yes, that's exactly the same behaviour I am experiencing, although you're using php-fpm and I'm using mod_php - so I guess the implementation is not the issue, but like you said, Snuffleupagus is not resetting its state between calls.

And exactly as you described, it only seems obvious if you visit host 1 and host 2 in quick succession of each other. If there's a delay between loading one and then the other, there seems to be more chance they will load correctly.

Is it possible to have some options to make it more "multivhost per php instance" friendly?

Keith.

@sriccio
Copy link

sriccio commented Oct 12, 2018

It would be great indead. In the meantime I found a workaround for our needs. I'll open another issue tomorrow or so about this topic and write how we actually managed to work around this.

@fearworksmedia
Copy link
Author

Thank you, I will look out for that.

In the meantime, may I suggest that this be labelled as a bug, or are we wrong to expect Snuffleupagus to work in this way?

Thank you for your time.

Keith.

@fearworksmedia
Copy link
Author

It would be great indead. In the meantime I found a workaround for our needs. I'll open another issue tomorrow or so about this topic and write how we actually managed to work around this.

Hi @sriccio

Are you able to post details of the workaround you have created?

I would like to try it on our setup, and maybe it might lead to an answer for this issue?

Many thanks.

Keith.

@fearworksmedia
Copy link
Author

May I suggest that this be labelled as a bug, or are we wrong to expect Snuffleupagus to work in this way?

@jvoisin
Copy link
Owner

jvoisin commented Oct 18, 2018

I'm waiting for @sriccio to open an issue about this to tag it correctly and to close this one :)

@fearworksmedia
Copy link
Author

Ok that's great, thanks.

@sriccio
Copy link

sriccio commented Oct 18, 2018

Hi. Sorry, it's coming ASAP :) I've been busy on other things.
I want to write an issue about it with all the infos I have about this topic.

@fearworksmedia
Copy link
Author

Any further forward with this?

@jvoisin
Copy link
Owner

jvoisin commented Nov 7, 2018

ping @sriccio

@fearworksmedia
Copy link
Author

It has only occurred to me that I mis-understood what @sriccio wrote several weeks ago, and that the fix/workaround (as far as I'm concerned) seems to be already here...

If we drop something for one vhost, we need to explicitly allow it for another, rather than just missing out that config option, otherwise the setting might get carried over from the first vhost.

I don't know why I didn't read your earlier messages properly, but I am testing this now. I have still made the PHP_INI_PERDIR change as discussed above before compiling into PHP and will see what results I get.

But if it works I would call that a fix of sorts.

Keith.

@jvoisin
Copy link
Owner

jvoisin commented Nov 18, 2018

Do keep us informed ♥

@fearworksmedia
Copy link
Author

So far it is looking good.

The mistake I was making was that I was setting up one vhost with a particular set of rules to drop certain functions. I then had a second vhost set up with its own different set of rules, dropping certain other functions. It seems that Snuffleupagus was seeing a drop command for a particular PHP function on the first vhost, and was applying it also to the second vhost if viewed at about the same time - because there was no mention of that function in the rules file for the second vhost.

So to make it work, if we drop a function for one vhost, but we want it to be allowed on another, we have to explicitly define it as allowed in the rules file for that second vhost, rather than just not including it.

This is, of course, with the PHP_INI_PERDIR modification as described above.

I will update this thread if this behaviour changes or I find it is not as I have described.

Keith.

@avkarenow
Copy link
Contributor

Someone is working on this issue?
I have some ideas, but I don't know if it's sense to work on it, maybe is the solution (almost?) ready?

@jvoisin
Copy link
Owner

jvoisin commented Feb 11, 2019

I don't think that any one is actively working on it :)

@fearworksmedia
Copy link
Author

The behaviour I described above hasn't changed for me, hence I haven't posted further on this issue.

Keith.

@sriccio
Copy link

sriccio commented Feb 12, 2019

My fault, I have to write a detailed text about the issue and how to reproduce it. In the meantime and as we use snuffleupagus in production env we used workaround (which consist to explicitly allow and deny things in every virtualhost sp configuration, instead of only denying what we want to block)

I'll try asap to take an hour to write a complete description with our setup detailed for a better understanding.

@fearworksmedia
Copy link
Author

My fault, I have to write a detailed text about the issue and how to reproduce it. In the meantime and as we use snuffleupagus in production env we used workaround (which consist to explicitly allow and deny things in every virtualhost sp configuration, instead of only denying what we want to block)

I'll try asap to take an hour to write a complete description with our setup detailed for a better understanding.

This is exactly what I have found seems to work for my setup too. Explicitly allowing or dropping everything for every vhost. The issue seems to be, if you define a particular set of (for example) drop rules for example1.com, and you run example2.com as another vhost on the same server, but without a snuffleupagus rule file, example2.com will suffer from a "crossover" of the rules that should only be applied to example1.com. However, if we apply a set of the SAME rules as we have for example1.com to example2.com, but reverse all of the "drops" to "allows", everything works for both hosts as expected. The rule set has to match across each vhost, although for some vhosts they are set to allow, whilst for other vhosts they are set to drop. But the rules that are covered must match across the board. If we add a new rule into one vhost's set of rules, we then have to add either a "allow" or "drop" version of it explicitly to all other vhost rule sets.

I'm not sure that this clarifies anything more than has already been discussed in posts above, but I'd like to see some sort of mechanism or better workaround for this issue if possible.

Keith.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants