How to set up $ this-> cwd for symfony2 framework

I am new to symfony and I was assigned a Symfony 2 project. Now I am facing some problems with the application server / console: run.

The project is a production system, so the problem must be due to my limited knowledge within Symfony.

this is what i keep getting

proc_open() : CreateProcess failed, error code - 267 in C:\xampp\htdocs\xxx\vendor\symfony\symfony\src\Symfony\Component\Process\Process.php on line 246.

      

line 246 is part

  $this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $this->env, $this->options);

      

I tried to change $ this-> cwd to "C: / xampp / htdocs / xxx", it may work, but it will have a different problem after visiting localhost: 8000, it shows this

Warning: require(app_dev.php): failed to open stream: No such file or directory in C:\xampp\xxx\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Resources\config\router_dev.php on line 30


Fatal error: require(): Failed opening required 'app_dev.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\xxx\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Resources\config\router_dev.php on line 30

      

Any ideas what is wrong?

EDIT:

I updated all my files as my Matteo suggested, a few vendor questions popped up and I resolved it for a new one (hopefully). However, now I am stuck with another problem which is this

The given document root directory "C:/xampp/htdocs/xxx/app/../web" does not exist. 

      

As mentioned in the comments, I don't have a folder called "web". It has been renamed public. I have already changed the composer .json but it doesn't do anything.

{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
    "psr-0": { "": "src/" }
},
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "~2.4",
    "doctrine/orm": "~2.2,>=2.2.3",
    "doctrine/doctrine-bundle": "~1.2",
    "twig/extensions": "~1.0",
    "symfony/assetic-bundle": "~2.3",
    "symfony/swiftmailer-bundle": "~2.3",
    "symfony/monolog-bundle": "~2.4",
    "sensio/distribution-bundle": "~2.3",
    "sensio/framework-extra-bundle": "~3.0",
    "sensio/generator-bundle": "~2.3",
    "incenteev/composer-parameter-handler": "~2.0",
    "richsage/rms-push-notifications-bundle": "dev-master",
    "friendsofsymfony/user-bundle": "~1.3",
    "ircmaxell/password-compat": "~1.0.3"
},
"scripts": {
    "post-install-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ],
    "post-update-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ]
},
"config": {
    "bin-dir": "bin"
},
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "public",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "2.4-dev"
    }
}
}

      

If I type app / console --version in cmd it shows Symfony version 2.6.1 - app / dev / debug

Please help me.

+3


source to share


1 answer


This is a bug documented here . It is allowed in the current version of the frame (2.6.1).

So, the solution is to upgrade to the current version. You can check in the UPGRADE files on the github repo that something has changed, but there is no BC (break compatibility).

Also, your current version of the framework (2.4.2) is not supported, so this is a good time to complete this task.



In general, it is good practice to update to the latest stable version of the framework. Take a look at the sf2 release for the release process and at the end of support for different release frameworks.

Hope for this help

0


source







All Articles