Symfony 3.0 Openshift找不到vendor / autoload.php

时间:2016-02-13 23:24:49

标签: php openshift symfony

您好我使用php 5.4和Postgresql为Openshift做了一个小装备,我试着让我的第一个同情应用程序工作但不知怎的,我得到这个奇怪的日志:

// method is async and returns a Task
public async Task<IActionResult> Index()
{
    var userId = User.GetUserId();

    // call `FindByIdAsync` and await the result
    ApplicationUser user = await userManager.FindByIdAsync(userId);

    ViewBag.UserId = userId;
    ViewBag.DefaultListId = user.DefaultListId;

    return View();
}

我还注意到已安装的作曲家很老了。所以当我通过ssh登录我的装备并执行时:

PHP Fatal error:  require(): Failed opening required '/var/lib/openshift/56bf2dba0c1e663957000163/app-root/runtime/repo/app/../vendor/autoload.php' (include_path='.:/var/lib/openshift/56bf2dba0c1e663957000163/app-root/runtime/repo/lib:/var/lib/openshift/56bf2dba0c1e663957000163/app-root/runtime/repo/libs:/var/lib/openshift/56bf2dba0c1e663957000163/app-root/runtime/repo/libraries:/var/lib/openshift/56bf2dba0c1e663957000163/app-root/runtime/repo/src:/var/lib/openshift/56bf2dba0c1e663957000163/app-root/runtime/repo/vendor:/var/lib/openshift/56bf2dba0c1e663957000163/app-root/runtime/repo/vendors:/var/lib/openshift/56bf2dba0c1e663957000163/php/phplib/pear/pear/php:/usr/share/pear') in /var/lib/openshift/56bf2dba0c1e663957000163/app-root/runtime/repo/app/autoload.php on line 9

我收到以下错误:

cd app-root/repo/
composer install

即使我更改了composer.json文件的设置: http://pastebin.com/X5bYnPM4

同样来自各种各样的教程,并且我已经开始制作这些文件:

.openshift / action_hooks /构建:

Problem 1
- This package requires php >=5.5.9 but your PHP version does not satisfy that requirement.
Problem 2
- Installation request for doctrine/cache v1.6.0 -> satisfiable by doctrine/cache[v1.6.0].
- doctrine/cache v1.6.0 requires php ~5.5|~7.0 -> your PHP version does not satisfy that requirement.
Problem 3
- Installation request for doctrine/common v2.6.1 -> satisfiable by doctrine/common[v2.6.1].
- doctrine/common v2.6.1 requires php ~5.5|~7.0 -> your PHP version does not satisfy that requirement.
Problem 4
- Installation request for symfony/symfony v3.0.2 -> satisfiable by symfony/symfony[v3.0.2].
- symfony/symfony v3.0.2 requires php >=5.5.9 -> your PHP version does not satisfy that requirement.
Problem 5
- doctrine/cache v1.6.0 requires php ~5.5|~7.0 -> your PHP version does not satisfy that requirement.
- doctrine/orm v2.5.4 requires doctrine/cache ~1.4 -> satisfiable by doctrine/cache[v1.6.0].
- Installation request for doctrine/orm v2.5.4 -> satisfiable by doctrine/orm[v2.5.4].

它们都是可执行的。

如果你有任何我的想法我会赞成它。

3 个答案:

答案 0 :(得分:0)

您需要将PHP升级到5.5.9

#composer.json
 "require": {
        "php": ">=5.5.9",

或安装以前版本的openshift

openshift包的全名是什么?

答案 1 :(得分:0)

请在github上检查我的初学者项目,这是一个关于openshift的diy(自己动手)应用程序,有symfony3和php5.6

答案 2 :(得分:0)

我应该制作一个自定义的catridge才能运行php 5.5或更高版本。