1

I have a symfony2 project. I need to run it on my local environment using xampp. I placed the existing code in xampp but when i go to localhost/myproject, it simple list the directories and files there. I also installed composer in that directory

EDIT When I move to web directory, it gives me following error

Warning: require_once(G:\xampp\htdocs\m\developer\web/../app/bootstrap.php.cache): failed to open stream: No such file or directory in G:\xampp\htdocs\m\developer\web\app_dev.php on line 23

Fatal error: require_once(): Failed opening required 'G:\xampp\htdocs\m\developer\web/../app/bootstrap.php.cache' (include_path='.;\xampp\php\PEAR') in G:\xampp\htdocs\m\developer\web\app_dev.php on line 23

2 Answers2

1

The quickest way is if you go to localhost/myproject/web/app_dev.php

The proper way would be by configuring a virtual host. This question might help you with it Symfony 2 on virtual hosts

EDIT to your EDIT

Troubleshooting "require_once(../bootstrap.php.cache): failed to open stream: No such file or directory"

Community
  • 1
  • 1
Koalabaerchen
  • 555
  • 4
  • 15
  • it gives me error on console `could not open input file composer.json` –  Oct 30 '14 at 10:48
  • OK, I think you have to reinstall it. There is something broken. Try the initial installation as mentioned by @Veve or at http://symfony.com/download – Koalabaerchen Oct 30 '14 at 11:09
  • I installed a fresh copy of symfony with helloworld application and its working fine. I need to run existing symfony application, thats what is causign me a problem –  Oct 30 '14 at 11:11
1

It seems to be a problem between a project made in a linux environment, not functionning in a windows one. You could make a php composer.phar install in your project directory, it should resolve your issue.

If there are troubles, you may want to get a fresh start with a clean composer.json , remove composer.lock and the vendor forlder, then add the bundles you need in it.

Veve
  • 6,643
  • 5
  • 39
  • 58
  • `composer.json` file is not there :( –  Oct 30 '14 at 10:52
  • Have you a composer.json file in your project folder? – Veve Oct 30 '14 at 10:54
  • i dont have this file on root, I have this file in subfolder, and when i do the command in subfolder, it gives me `could not open input file` error –  Oct 30 '14 at 10:55
  • This file must be in your main project folder to work. – Veve Oct 30 '14 at 10:56
  • copied this file in my main folder, ran the command and now I am getting `Yor requirements could not be resolved to an installable set of packages` 5 reasons under that :( –  Oct 30 '14 at 11:04
  • You may want to get a fresh start with a clean composer.json (https://github.com/symfony/symfony-standard/blob/master/composer.json) then add the bundles you need in it. – Veve Oct 30 '14 at 11:08
  • you mean to place this file in my directory and run the commands? –  Oct 30 '14 at 11:09
  • Yes, see the edit of my answer, and the comments from Koalabaerchen. – Veve Oct 30 '14 at 11:11