安装Composer for PHP时出现fopen错误(Windows 7)

时间:2015-07-20 15:16:07

标签: php composer-php

我正在尝试在Windows 7旗舰版下安装Composer。不幸的是,每当我运行命令时,Composer都会生成一个fopen()异常(见下文)。

我的猜测是,某个空文件名正在某处传递,可能是由于配置错误。

在测试中,我已经删除并重新安装了Composer,针对两个进行了测试 PHP的版本并检查了我的GitHub连接/更新了界面。

错误的一个例子(无论我做什么都是一样的)如下:

?作曲家-vvv诊断
检查平台设置:FAIL
加载了xdebug扩展,这可以减慢Composer的速度  建议在使用Composer时禁用它 检查git设置:执行命令(CWD):git config color.ui

[ErrorException]
  fopen():文件名不能为空

异常追踪:
 ()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Pipes/WindowsPipes.php:55
 Composer \ Util \ ErrorHandler :: handle()在n / a:n / a
 frn()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Pipes/WindowsPipes.php:55
 Symfony \ Component \ Process \ Pipes \ WindowsPipes-> __ construct()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Pipes/WindowsPipes.php :172
 Phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:1264  Symfony \ Component \ Process \ Process-> getDescriptors()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:273
 Symfony \ Component \ Process \ Process-> start()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:208 br />  Symfony \ Component \ Process \ Process-> run()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/ProcessExecutor.php:62
 Composer \ Util \ ProcessExecutor->执行()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/DiagnoseCommand.php:166
 Composr \ Command \ DiagnoseCommand-> checkGit()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/DiagnoseCommand.php:82
 Composer \ Command \ DiagnoseCommand->执行()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony \ Component \ Console \ Command \ Command-> run()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony \ Component \ Console \ Application-> doRunCommand()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Syrfony \ Component \ Console \ Application-> doRun()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:146  Composr \ Console \ Application-> doRun()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126  Symfony \ Component \ Console \ Application-> run()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:82
 Composer \ Console \ Application-> run()at phar:// C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:43
 在C:\ ProgramData \ ComposerSetup \ bin \ composer.phar:25

中的require()

所有帮助表示赞赏

1 个答案:

答案 0 :(得分:0)

问题已解决:sys_temp_dir条目[php.ini]指向缺少的目录