(Doctrine-Ubuntu) Get error: doctrine-cli.php: command not found

(Doctrine-Ubuntu) I run $ doctrine-cli.php command and I get doctrine-cli.php: command not found . R

+2


a source to share


2 answers


Do it on the command line if you just want to execute it:

chmod +x doctrine-cli.php

      

and optional

cp doctrine-cli.php doctrine

      

this way you can do

./doctrine-cli.php [arguments]

      



and if you took an optional step you can do

./doctrine [arguments]

      

and if you don't want to. / do it

export PATH=$PATH:/full/path/to/doctrine/folder

      

now you can execute the command doctrine

from any folder

What this means is adding the "execute" permission to the file. If you have the correct shebang at the top of the file, everything should work fine (I think it does) and optionally add the doctrine folder to your PATH so you can execute it from anywhere.

+2


a source


What command are you running? It should be something like this:

php doctrine-cli.php COMMAND

      



php

Should also be available in a system variable PATH

, but on Ubuntu (if you installed PHP via the package installer) that was the default.

+3


a source







All Articles