Comments (9)
This sounds both equally wrong and horrible.
The configuration parser was a bit simplified in cee5535, so odds are that if something is wrong, it should be in it. However, Snuffleupagus doesn't care whether it's running under Apache or whatever else.
Do you have some funky sandboxing going on with Apache that might prevent the php process from reading the rules? If it's the case, Snuffleupagus should complain about it in its logs and in a phpinfo()
call.
You can use the SP_DUMP_CONFIG
environment variable to dump the whole thing.
from snuffleupagus.
We are using chroot()
with Apache via the ChrootDir
directive, but I hardlinked the config file inside the chroot()
environment at the same path. I also did an strace
of Apache running, and I only saw the parent process reading the rules file the one time, there were no attempts in the child processes to walk /etc/php.d/
and re-read the config file. Also, the fact that the same config directives are now working so long as the comments are removed would seem to point to something with the parsing, though obviously I can't say what.
from snuffleupagus.
Also, it did not complain about any parsing issues in either the Apache log file or in phpinfo()
output; I'd been loading a bit of PHP calling phpinfo()
(as it's one of the functions I meant to block), and it showed the php.ini
config directives and no complaints about parsing issues. It just seems that anything past a comment line just got ignored, like it didn't see the newlines or something?
from snuffleupagus.
Also, the fact that the same config directives are now working so long as the comments are removed would seem to point to something with the parsing, though obviously I can't say what.
Indeed, but you said that it's working in the cli, which is super-duper-confusing :/
Are you sure you're running the same versions in the cli and in apache?
from snuffleupagus.
Yes, there's only a single snuffleupagus.so
on the machines in question. It's installed via the Remi RPMs, though I did notice they don't depend on re2c
(I tried rebuilding them via rpmbuild
), so it apparently doesn't regenerate the generated .c
file? I don't know if that's a problem or not.
from snuffleupagus.
@remicollet might know :)
Anyway, the plot thickens! I'll try to play with comments in configuration files maybe tomorrow, more likely this weekend.
from snuffleupagus.
FWIW, I tried to use my rebuilt RPM with a copy of the config with the comments restored, and it did the same thing (I built the package with re2c
installed on the host). So that doesn't seem to make a difference.
from snuffleupagus.
I didn't manage to reproduce the issue on my end :/
from snuffleupagus.
Can I suggest dumping put the phpinfo()/php -i for cli and for Apache? It's entirely possible they're using different ini files
from snuffleupagus.
Related Issues (20)
- XXE and Nextcloud HOT 2
- none-standard symbols brake executions of rules HOT 2
- upgrading from older versions to latest HOT 1
- Snuffleupagus did;nt work as expected HOT 3
- Snuffleupagus for php 7.4 latest HOT 2
- Clarify `match` comparisson for filters
- Support filter `param` multiple times HOT 3
- SP doesn't work with phar files
- V10 debian packages missing HOT 3
- PHP-FPM 8.3 child exited with code 70 HOT 3
- Patchstack Wordpress Vulnerability DB HOT 1
- Snuffleupagus associated with high CPU load HOT 6
- How can i fix the mail issue? HOT 1
- generate_rules.php: why forbid curl_exec and curl_multi_exec? HOT 9
- generate_rules.php: remove assert if running PHP8+ HOT 1
- Support for PHP 8.3 on Alpine Linux HOT 1
- UBSan reports HOT 1
- FreeBSD build error on latest development release HOT 3
- Using Docker PHP 8.3 with Debian Bookworm & Apache won't log anything HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snuffleupagus.