7

I'm starting to learn PHP Symfony2 Framework. I have a PC with Windows 7 and Wamp manager 2.2 and it includes PHP 5.4.3 and Apache 2.4.2.

I followed these steps to attempt installing and running a Symfony2project:

c:\> php -r "readfile('http://symfony.com/installer');" > symfony.phar
c:\> mkdir projects
c:\> move symfony.phar c:\projects
c:\projects\> php symfony.phar
c:\projects\> php symfony.phar new my_project_name
c:\projects\> php app/console server:run

The issue I'm having is just in the last step, because it's throwing this error:

C:\Users\Jessai\projects\my_project_name>php app/console server:run -v
Server running on http://127.0.0.1:8000

Quit the server with CONTROL-C.
  RUN  "C:\wamp\bin\php\php5.4.3\php.exe" "-S" "127.0.0.1:8000" "C:\Users\Jessai
\projects\my_project_name\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBun
dle\Resources\config\router_dev.php"
  RES  -1073741819 Command did not run successfully
Built-in server terminated unexpectedly

And surprisingly there's only one question about this and it didn't help me because I changed the port as it says and didn't work, also I reinstalled from Composer. I have seen also that there are some warnings like:

[...Notice: Undefined index: PATH in phar...]

What am I doing wrong? Is it a bug?

Thanks in advance!

0

4 Answers 4

4

For me the doc was helpful.

In particular I used another port then default:

php app/console server:run 127.0.0.1:9000

Then in browser:

http://localhost:9000/

And it worked!

Sign up to request clarification or add additional context in comments.

Comments

2

I would say that youre trying to run the built in php server when you have a wamp server running already.

2 Comments

I tried to run the command as you said (without starting WAMP) and it's the same error and error code. What else can you suggest me?
Don't bother with the php server, run was, type localhost into your browser and see what you get.
1

I downloaded the zip file (in this link) and copied directly to the htdocs/www folder. I have to advice everybody that instructions contained in Symfony2 website are confusing. Thanks!

Comments

0

Try to disable eAccelerator in your php.ini file.

2 Comments

mu4ddi3 assumes OP is using Apache server
i had a similar problem with OP, i solved it by ditching in-built web server and using Apache server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.