1

What I attempt: php folder/file I get command not found

The PHP location is /usr/local/bin/php-7.0

4
  • 1
    What returns whereis php ? Commented Feb 2, 2018 at 12:33
  • /usr/local/bin/php-7.0 folder/file. To avoid command not found later, add /usr/local/bin to your $PATH variable. Commented Feb 2, 2018 at 12:35
  • @Syscall it returns pretty much nothing php [[email protected] curerentfolder] Commented Feb 2, 2018 at 12:37
  • 1
    Possible duplicate of -bash: php: command not found - Centos6.7 Commented Feb 2, 2018 at 12:39

1 Answer 1

1

The executable seems to be named php-7.0:

$ /usr/local/bin/php-7.0 /path/to/file.php

Instead of call the fully qualified path, you could make sure that /usr/local/bin is in your $PATH, e.g.:

$ export PATH=${PATH}:/usr/local/bin

and then call php-7.0:

$ php-7.0 /path/to/file.php
Sign up to request clarification or add additional context in comments.

2 Comments

And maybe a ln -s to link php to php-7.0?
@Syscall or even alias, or better yet, use alternatives.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.