我尝试使用composer在我的synology NAS上安装DSM 6.2.3-25426 Update 3。
PHP 7.3作为php版本。
我按照symfony入门指南中的步骤进行了操作,除了需要稍微更改php配置之外,一切似乎都安装得很顺利。
但是,在安装symfony演示应用程序之后,我无法让它运行。我在浏览器中使用synology的网络地址进行测试,如下所示:http://192.168.x.x:8000,但浏览器超时。我已经在nas上运行了Apache2.4,但是我想使用推荐的symfony use服务器进行开发。
有什么想法吗?
这是我在这里的第一个帖子,希望我正确地遵循了帖子的指示。
*Tailing Web Server log file (/root/.symfony/log/0680ffe11c930b95313342ec04d46c96d69954df.log)
Tailing PHP log file (/root/.symfony/log/0680ffe11c930b95313342ec04d46c96d69954df/7daf403c7589f4927632ed3b6af762a992f09b78.log)
[OK] Web server listening
The Web server is using PHP CLI 7.3.16
https://127.0.0.1:8000
[Web Server ] Mar 16 16:46:14 |DEBUG | PHP Reloading PHP versions
[Web Server ] Mar 16 16:46:15 |DEBUG | PHP Using PHP version 7.3.16 (from .php-version from current dir: /volume1/web/symfdemo/.php-version)
[Application] Mar 16 15:31:54 |INFO | PHP Deprecated: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Symfony\Bundle\SwiftmailerBundle\Command\SendEmailCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Symfony\Bundle\SwiftmailerBundle\Command\DebugCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Symfony\Bundle\SwiftmailerBundle\Command\NewEmailCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Sensio\Bundle\GeneratorBundle\Command\GenerateCommandCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineCrudCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Sensio\Bundle\GeneratorBundle\Command\GenerateBundleCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineEntityCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Sensio\Bundle\GeneratorBundle\Command\GenerateControllerCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Application] Mar 16 15:31:54 |INFO | PHP User Deprecated: Auto-registration of the command "Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineFormCommand" is deprecated since Symfony 3.4 and won't be supported in 4.0. Use PSR-4 based service discovery instead.
[Web Server ] Mar 16 16:46:15 |INFO | PHP listening path="/volume1/@appstore/PHP7.3/usr/local/bin/php" php="7.3.16" port=42752*发布于 2021-03-17 00:51:45
这看起来像是使用symfony serve启动了服务器,该页面的缺省设置是https://127.0.0.1:8000。上面控制台的输出还显示了监听的位置。
假设您的代码将移出开发,我还应该更清楚地说明下一步。您需要仔细研究Symfony Webserver Configurations,并评估使用Apache (或Nginx)的最佳选择。
发布于 2021-03-17 03:55:25
很抱歉我说得不清楚...在synology nas上安装symfony之后,我安装了symfony演示应用程序,并且无法从我的客户端开发机器通过浏览器访问它。原来我太专注于安装过程了,以至于忘了打开8000端口的防火墙……叹息!
https://stackoverflow.com/questions/66659183
复制相似问题