简体   繁体   English

如何在不支持phar(Composer依赖)的PHP 5.2.8上安装symfony?

[英]How to install symfony on PHP 5.2.8 with no phar support (Composer dependency)?

I have been attempting to install symfony on my website however I have had little success as it depends on composer. 我一直在尝试在我的网站上安装symfony,但是由于它依赖于作曲者,因此收效甚微。

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: 当我尝试安装时(所有安装选项似乎都需要phar支持),我得到了以下输出:

-----------------------------------------------------------
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. 我没有特权安装其他版本的php,因为我使用的是付费的虚拟主机,该主机有些受限。 What are my options? 我有什么选择?

Symfony 2 doesn't support php < 5.3.2 http://symfony.com/doc/2.0/reference/requirements.html Symfony 2不支持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. 如果您无法升级您的php版本,请查找其他Web主机或使用其他框架。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM