2013-08-18 64 views
1

当我尝试安装推进,并试图用这个命令运行它:没有INI文件被加载(php.ini中)

library/propel/generator/bin/propel-gen

我总是得到这样的错误:

Warning: require_once(phing/Phing.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/GentseFeesten/library/propel/generator/bin/phing.php on line 39

Fatal error: require_once(): Failed opening required 'phing/Phing.php' (include_path='.:') in /Applications/MAMP/htdocs/GentseFeesten/library/propel/generator/bin/phing.php on line 39

当我搜索了一个解决方案,我在stackoverflow上找到this主题。

在下面的步骤:

Check that correct php.ini is used:

Run php --ini and see what INI file is being loaded. Then make sure this INI files contains PEAR directory in it's include_path

我得到这个从我的命令行:

enter image description here

没有INI文件加载...

我使用甲基苯丙胺与PHP版本5.4.4。 当我检查与<?php phpinfo(); ?>
的PHP版本,我看到的PHP版本是“5.4.4”。
当我检查终端的PHP版本

php -v

我得到这个:

enter image description here

我在做什么错?

UPDATE: 当我在终端运行

locate php.ini

我得到这样的结果: enter image description here

我已经添加.:/usr/lib/php/pear在php5.4.4 php.ini文件/但仍然是相同的结果..

+0

在这里检查http://stackoverflow.com/questions/11691767/where-does-mamp-keep-its-php-ini – elclanrs

+0

更新的帖子... – nielsv

回答

0

将版本更改为我的MAMP版本,它的工作原理!

+0

不要忘了接受你自己的答案 – j0k

1

PHP的命令行版本与web服务器中的PHP完全分开。您的命令行版本看起来像是位于“某处”的未配置的CLI可执行文件,我认为您应该在您的机器上安装一个匹配版本的PHP 5.4.4 CLI。然后你就可以配置PEAR,并获得Phing的工作副本。

你在命令行上的当前PHP在哪里? which php 它有什么配置? php -i