【发布时间】:2012-12-18 14:03:19
【问题描述】:
可能重复:
‘php.exe’ is not recognized as an internal or external command, operable program or batch file
我正在尝试使用 WAMP 在我的计算机上安装 cakePHP。
我在尝试设置安装路径时遇到问题。这是我制作的路径条目。
F:\ProgrammingPoint\wamp\bin\php\php5.4.3;F:\ProgrammingPoint\wamp\www\cake\app\Console;
分别用于 PHP 和 cakePHP 安装。但是,当我尝试使用 cake bake 命令时:
F:\ProgrammingPoint\wamp\www\cake\app\Console cake bake
我收到以下错误。
'php' is not recognized as an internal or external command.
设置路径的输出是:
Path=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x8
6)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:
\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:
\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\O
penCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Componen
ts\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Progr
am Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files
(x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Lenovo\Bl
uetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program
Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
【问题讨论】:
-
如果你运行
php会发生什么? -
如果路径设置正确,请检查
set path的输出。如果您使用Environment Variables对话框设置了 PATH 变量,您可能必须关闭并重新打开控制台,因为只有新进程会继承新的环境变量。 -
听起来 php 设置不正确。
-
@vstm:
set path返回上述内容。这很奇怪,因为我已经按照问题中的描述设置了路径 -
只需确保您已将 PHP 添加到环境变量的路径中。例如我会设置 C:\wamp\bin\php\php5.3.13.
标签: php cakephp-2.1