douqin2108 2013-02-01 17:17
浏览 192
已采纳

如何在没有pha​​r支持的情况下在PHP 5.2.8上安装symfony(Composer依赖)?

I have been attempting to install symfony on my website however I have had little success as it depends on composer.

To install:

php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"

When I attempted the install (all install options appear to require phar support) I got this output:

-----------------------------------------------------------
Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in Command line code(1) : eval()'d code on line 378
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The phar extension is missing.
Install it or recompile php without --disable-phar

Your PHP (5.2.8) is too old, you must upgrade to PHP 5.3.2 or higher.
-----------------------------------------------------------

I do not have privileges to install a different version of php as I am using a paid webhost that is somewhat restrictive. What are my options?

  • 写回答

1条回答 默认 最新

  • doujuchuan9915 2013-02-01 17:18
    关注

    Symfony 2 doesn't support php < 5.3.2 http://symfony.com/doc/2.0/reference/requirements.html

    If you cannot upgrade your php version then find another web host or use a different framework.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 matlab解优化问题代码
  • ¥15 写论文,需要数据支撑
  • ¥15 identifier of an instance of 类 was altered from xx to xx错误
  • ¥100 反编译微信小游戏求指导
  • ¥15 docker模式webrtc-streamer 无法播放公网rtsp
  • ¥15 学不会递归,理解不了汉诺塔参数变化
  • ¥15 基于图神经网络的COVID-19药物筛选研究
  • ¥30 软件自定义无线电该怎样使用
  • ¥15 R语言mediation包做中介分析,直接效应和间接效应都很小,为什么?
  • ¥15 Jenkins+k8s部署slave节点offline