【问题标题】:'php' is not recognized as an internal or external command [duplicate]“php”不被识别为内部或外部命令[重复]
【发布时间】: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


【解决方案1】:

你必须在php可执行文件所在的位置安装Cake php。

你的文件应该是(?)在F:\ProgrammingPoint\wamp\apache\php_5.2.11....

请参考here

【讨论】:

  • 我已经编辑了这个问题。你能解释一下正确设置路径吗?
猜你喜欢
  • 2020-10-31
  • 2018-01-01
  • 2013-01-04
  • 1970-01-01
  • 2020-04-07
  • 1970-01-01
  • 2013-12-20
相关资源
最近更新 更多