PHP Symfony2 server run terminates unexpectedly

时光总嘲笑我的痴心妄想 提交于 2019-12-08 18:13:38

问题


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!


回答1:


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!




回答2:


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




回答3:


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!




回答4:


Try to disable eAccelerator in your php.ini file.



来源:https://stackoverflow.com/questions/28842819/php-symfony2-server-run-terminates-unexpectedly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!