Giter VIP home page Giter VIP logo

Comments (6)

gordalina avatar gordalina commented on July 16, 2024

I'm not sure if it is possible, but if you submit a PR, i see no reason not to accept it.

from cachetool.

mbrodala avatar mbrodala commented on July 16, 2024

@gordalina I'd happily make a PR if I had an idea how to solve this. With this setup there is no way to cross the boundary of the CLI SAPI.

So I guess the only option here is the usual workaround where a random file is created in the web root with a opcache_reset() call and request this file from CLI via HTTP.

Unless you have a better idea I'll close this one.

from cachetool.

gordalina avatar gordalina commented on July 16, 2024

what's your exact use case? apache2 with mod_fcgi?
maybe if you expose fcgiwrapper through a socket, you can pass the path to cachetool so it connects as a regular fcgi client

from cachetool.

mbrodala avatar mbrodala commented on July 16, 2024

@gordalina Unfortunately I'm not sure about how this setup was made. It looks like mod_fcgid (mind the d) is currently used and I'm not sure where to find the socket in use. With lsof I can find this:

php5-cgi  32581       <ssh-username>    0u     unix 0xffff88023555a440       0t0    5271086 /var/lib/apache2/fcgid/sock/57741.60

However, the permissions of that socket file are rather strict:

srwx------ 1 www-data www-data 0 Jan 26 08:39 /var/lib/apache2/fcgid/sock/57741.60

It this setup messed up (not unlikely) or am I missing something?

from cachetool.

gordalina avatar gordalina commented on July 16, 2024

if you run cachetool as www-data you'd be able to access the socket, can you try that?
php cachetool.phar opcache:status --fcgi=/var/lib/apache2/fcgid/sock/57741.60

from cachetool.

mbrodala avatar mbrodala commented on July 16, 2024

This works indeed but requires sudo. And the socket file apparently changes from time to time so I'd have to detect it as mentioned with lsof.

All in all not really a useful solution from my POV for this setup. It'll most likely be switched to regular PHP-FPM soon so this shouldn't be an issue anymore.

But I'll keep the solution in my head in case I encounter it again, thanks a lot!

from cachetool.

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.