简体   繁体   English

Symfony2参数或缓存问题

[英]Symfony2 Parameter Or cache Issue

I am using Symfony2 for my application and application working fine on windows but when i upload it to server(ubuntu 12.04 LTS) it gives following error : 我正在为我的应用程序使用Symfony2,并且应用程序在Windows上运行良好,但是当我将其上载到服务器(ubuntu 12.04 LTS)时,出现以下错误:

  **[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
  You have requested a non-existent parameter "user_show".**

I have search it to my whole application I have never used a parameter named "user_show" although it is one of my template name but I cant find why this error occurs. 我已经在整个应用程序中进行搜索,尽管它是我的模板名称之一,但我从未使用过名为“ user_show”的参数,但找不到导致此错误的原因。

I thought it is of cache issue for this I disable APC and Xcache on server but still the problem is same then I install xcache only still no effect . 我认为这是缓存问题,因为我在服务器上禁用了APCXcache ,但问题仍然相同,那么我安装xcache仍然没有效果。

Some one bundle use this parameter. 某个捆绑包使用此参数。 You should find all files, which contain "user_show". 您应该找到所有包含“ user_show”的文件。

Most likely you will need a file in "DependensyInjection" folder. 最有可能您将需要“ DependensyInjection”文件夹中的文件。

There you can found the paramener define. 在这里可以找到参数定义。 You should add this parameter in yours config.yml. 您应该将此参数添加到您的config.yml中。

  1. Clear cache php app/console ca:cl 清除缓存php app/console ca:cl
  2. Regenerate bootstrap.php.cache by php composer.phar update 通过php composer.phar update重新生成bootstrap.php.cache
  3. If your clearing apc from conslole it clears apc for console only so to do it globbaly try to: sudo service apache2 restart 如果从conslole清除apc,则仅将apc清除为控制台,因此要进行通俗易懂的尝试: sudo service apache2 restart

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

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