English 中文(简体)
辛贝
原标题:Symfony2 projet not working in prod with JSMserializerbundle and DoctrineMongoDBBundle

我的假冒手法2在杰夫环境中无谓地工作。 当我转向生产环境时,问题就会出现。 当我打电话给拥有一系列实体的控制员,并把它编成序列,与联合后勤系统飞行员交火时,它便坠毁。 客户仍然收到答复,但json是空的,甚至不是“[]”。 当我看一看记录时,我可以读到这些错误:

    security.INFO: Populated SecurityContext with an anonymous Token [] []
    request.INFO: Matched route "employe_index" (parameters: "_controller": "PisteurWebRefugeManagerBundleCoreBundleControllerEmployeController::indexAction", "_route": "employe_index") [] []
    request.CRITICAL: DoctrineCommonAnnotationsAnnotationException: [Semantical Error] The annotation "@proxy" in method DoctrineMongoDBCursor::current() was never imported. Did you maybe forget to add a "use" statement for this annotation? (uncaught exception) at /home/wpdemo/symfony/vendor/doctrine-common/lib/Doctrine/Common/Annotations/AnnotationException.php line 52 [] []

我研究了山角的错误,我发现这两个专题:

https://github.com/doctrine/mongodb-odm/issues/255 https://github.com/schmittjoh/JMSSerializerBundle/issues/51

这些议题无助于我,我真心会理解这个问题。 任何人都有想法?

[EDIT] Here is my configs:

DEV:

imports:
    - { resource: config.yml }

framework:
    router:   { resource: "%kernel.root_dir%/config/routing_dev.yml" }
    profiler: { only_exceptions: false }

web_profiler:
    toolbar: true
    intercept_redirects: false

monolog:
    handlers:
        main:
            type:  stream
            path:  %kernel.logs_dir%/%kernel.environment%.log
            level: debug
        firephp:
            type:  firephp
            level: info

assetic:
    use_controller: true

PROD:

imports:
    - { resource: config.yml }

monolog:
    handlers:
        main:
            type:         fingers_crossed
            action_level: error
            handler:      nested
        nested:
            type:  stream
            path:  %kernel.logs_dir%/%kernel.environment%.log
            level: debug

[EDIT]

这是我指挥的:

php app/console cache:clear --env=prod --no-debug
php app/console cache:warmup
php app/console assets:install web
php app/console assetic:dump web --env=prod --no-debug
问题回答

在第一次用Capifony进行部署时,曾经有过类似的问题。 我只能通过人工清扫/切/提包件来解决这一问题。 不使用藏匿处:cle,但实际去除,

rm -rf app/cache/prod

我尚未发现,为什么<代码>cache:clear -env=prod有时正确无误地获得,这可能是一个许可问题。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签