简体   繁体   English

Symfony2无法连接到本地主机

[英]Symfony2 cannot connect to localhost

I am trying to start my first symfony2 application and i am following the instruction from symfony but seems i am doing something wrong and can not figure it what i am doing wrong. 我正在尝试启动我的第一个symfony2应用程序,并且正在按照symfony的说明进行操作,但似乎我做错了什么,无法弄清我做错了什么。 this is what i have done(running on mac) --- 这就是我所做的(在Mac上运行)-

    **$ curl -LsS http://symfony.com/installer > symfony.phar
    $ sudo mv symfony.phar /usr/local/bin/symfony
    $ chmod a+x /usr/local/bin/symfony
    $ symfony new my project
    $ cd myproject/
    $ php app/console server:run**

错误信息显示 it show this error although i have edit at my php.ini file - extension=php_intl.dll and when i try to browse http://localhost:8000/ it shows --- 它显示此错误,尽管我在php.ini文件-extension = php_intl.dll中进行了编辑,当我尝试浏览http:// localhost:8000 /时,它显示--- 无法连接 can anyone help me what i am doing wrong. 谁能帮我我在做什么错。 Thanks a lot in advance .. 非常感谢..

Like Anna Adamchuk said you can set default time zone un php.ini 就像Anna Adamchuk所说的那样,您可以将默认时区设置为php.ini

date.timezone = Europe/Paris

And you can use ini_set this at the begining of your php file 您可以在php文件的开头使用ini_set

ini_set('date.timezone', 'Europe/Paris');

To resolve warning about timezone you have to uncoment in you php.ini and set default time zone: 要解决有关时区的警告,您必须不输入php.ini并设置默认时区:

date.timezone= date.timezone =Europe/Paris

Also check your web server configuration -> link 还要检查您的Web服务器配置-> 链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM