gpt4 book ai didi

apache - Symfony 3.1 : error when requesting app_dev. php 或 app.php

转载 作者:行者123 更新时间:2023-12-04 17:44:35 25 4
gpt4 key购买 nike

我在请求时得到这个 sorial/app_dev.php :

Not Found

The requested URL /app_dev.php/ was not found on this server.

并在请求时 sorial/app.php :

unregister(); $apcLoader->register(true); */ $kernel = new AppKernel('prod', false); $kernel->loadClassCache(); //$kernel = new AppCache($kernel); // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter //Request::enableHttpMethodParameterOverride(); $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response);



我在 Ubuntu 14.04 和 Apache 2.4

编辑:这是我的虚拟主机:
<VirtualHost *:80>
ServerName sorial
#ServerAlias sorial.es
DocumentRoot /var/www/sorial/web
DirectoryIndex app.php
#SetEnv SYMFONY__DATABASE__PASSWORD jander
<Directory /var/www/sorial/web/>
# Options Indexes FollowSymLinks MultiViews
AllowOverride All
#Order allow,deny
#allow from all
Require all granted
FallbackResource /index.php
# BEGIN EXPIRES
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 10 days"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/plain "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-icon "access plus 1 year"
</IfModule>
# END EXPIRES
</Directory>
</VirtualHost>

我的文档根目录在 /var/www/sorial/web .

事实是我的其他网站也有同样的问题。当我尝试禁用/启用时,问题开始了 env_mod使用 a2dismod env , 因为在添加变量 SetEnv 时(正如你在我的虚拟主机中看到的那样)我得到了

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.



重启apache时。

最佳答案

我终于解决了我的问题 像这样安装 php5 和 libapache2-mod-php5:sudo apt-get install php5 libapache2-mod-php5

关于apache - Symfony 3.1 : error when requesting app_dev. php 或 app.php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39927647/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com