Giter Site home page Giter Site logo

Comments (7)

tariqbuilds avatar tariqbuilds commented on May 1, 2024

does it work when the command within the where.php file is changed from which to whereis?

We recently made some changes to that file and if those changes are the culprit, we can always revert.

If not, we can try to put a conditional clause to detect nginx + php-fpm to try to resolve this solution too.

from linux-dash.

commonquail avatar commonquail commented on May 1, 2024

In general, having to hard-code PATH does not seem ideal. Is it not being picked up or is which not in PATH by default?

from linux-dash.

pschmitt avatar pschmitt commented on May 1, 2024

@commonquail Whether which is in the PATH or not isn't relevant, since which gets called directly (/usr/bin/which).

@afaqurk The whereis.php from 96496f6 works just fine.

from linux-dash.

tariqbuilds avatar tariqbuilds commented on May 1, 2024

This means that we can either:

  1. Revert back to whereis rather than which
  2. Write conditional code in where.php to detect nginx/apache and execute appropriate command

tough choice. What do you guys think?

from linux-dash.

commonquail avatar commonquail commented on May 1, 2024

@pschmitt: I meant php, not which. Sorry.
I'm still unclear on why whereis works but which doesn't.

from linux-dash.

pschmitt avatar pschmitt commented on May 1, 2024

whereis searches the standard *nix locations for a specified command.

which searches your user-specific PATH (which may include some of the locations whereis searches, and may not include others - it might also include some places that whereis doesn't search if you'd added to your PATH)

http://superuser.com/a/40302

Note that there also the where, type, command and hash shell buildins that may be used to check whether a command is available or not, but that would require spawning a shell for each and every check.

From what I read, command would be the standard, POSIX way, of doing this.

from linux-dash.

commonquail avatar commonquail commented on May 1, 2024

POSIX 2004 command specification, Bash and KornShell support confirmed. That seems reasonable.

from linux-dash.

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.