Giter Site home page Giter Site logo

Comments (9)

jvoisin avatar jvoisin commented on July 24, 2024

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.

demonfoo avatar demonfoo commented on July 24, 2024

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.

demonfoo avatar demonfoo commented on July 24, 2024

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.

jvoisin avatar jvoisin commented on July 24, 2024

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.

demonfoo avatar demonfoo commented on July 24, 2024

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.

jvoisin avatar jvoisin commented on July 24, 2024

@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.

demonfoo avatar demonfoo commented on July 24, 2024

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.

jvoisin avatar jvoisin commented on July 24, 2024

I didn't manage to reproduce the issue on my end :/

from snuffleupagus.

nickchomey avatar nickchomey commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.