Cakephp Cake command returns No such file or directory

后端 未结 5 1051

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:37

    The REAL solution to this is to change the End-of-Line (EOL) characters to Unix format, instead of MsDos. So I guess this error will only occur if you worked in Windows.

    Anyway, teh mighty SOLUTION:

    (1) Open app/Console/cake file using any text editor that allows changing of EOL characters e.g. NotePad++.

    (2) In NotePad++ click: Edit -> EOL Conversion -> Convert to Unix format

    (3) Save the file and upload it to the server. Now if you navigate to the CakePHP app directory using command like:

    cd /usr/share/nginx/html/cakeproject/app
    

    ...you should be able to run Console/cake without any problems and see standard output (basically help commands).

    Hope this helped you!

提交回复
热议问题