Cakephp Cake command returns No such file or directory

后端 未结 5 1099

I have been using the cake command on my linux server for 2 years. but now im trying to move to a new server and some how the cake command gives back the error: No such file or

5条回答
  •  一生所求
    2021-02-10 09:43

    I also have this problem on some servers and never figured out why this happened. I suspect the so called "shebang" might not be set correctly for every Linux distribution (e.g. if the cake script stars with #!/usr/bin/env bash, but you don't use bash on your server or your distribution doesn't have the env binary in that path, it might fail on that. This is just a theory though, as I said I never really figured it out, nor did I invest much time in investigating.

    Although, what I always use as a fallback is simply calling the cake.php script (from the app folder) instead, like:

    php Console/cake.php -app `pwd` bake
    

    That never lets me down. The -app pwd bit is to tell the shell that your current directory is your app directory, so the shell can find all your files.

提交回复
热议问题