<small id='JTAHs'></small><noframes id='JTAHs'>

    <i id='JTAHs'><tr id='JTAHs'><dt id='JTAHs'><q id='JTAHs'><span id='JTAHs'><b id='JTAHs'><form id='JTAHs'><ins id='JTAHs'></ins><ul id='JTAHs'></ul><sub id='JTAHs'></sub></form><legend id='JTAHs'></legend><bdo id='JTAHs'><pre id='JTAHs'><center id='JTAHs'></center></pre></bdo></b><th id='JTAHs'></th></span></q></dt></tr></i><div id='JTAHs'><tfoot id='JTAHs'></tfoot><dl id='JTAHs'><fieldset id='JTAHs'></fieldset></dl></div>
    • <bdo id='JTAHs'></bdo><ul id='JTAHs'></ul>
    <legend id='JTAHs'><style id='JTAHs'><dir id='JTAHs'><q id='JTAHs'></q></dir></style></legend>
    <tfoot id='JTAHs'></tfoot>

      Symfony Cache 学说/orm/Proxies 未能在第 209 行打开流/Proxy/AbstractPro

      时间:2024-08-09

        <tbody id='gDwgQ'></tbody>
      1. <i id='gDwgQ'><tr id='gDwgQ'><dt id='gDwgQ'><q id='gDwgQ'><span id='gDwgQ'><b id='gDwgQ'><form id='gDwgQ'><ins id='gDwgQ'></ins><ul id='gDwgQ'></ul><sub id='gDwgQ'></sub></form><legend id='gDwgQ'></legend><bdo id='gDwgQ'><pre id='gDwgQ'><center id='gDwgQ'></center></pre></bdo></b><th id='gDwgQ'></th></span></q></dt></tr></i><div id='gDwgQ'><tfoot id='gDwgQ'></tfoot><dl id='gDwgQ'><fieldset id='gDwgQ'></fieldset></dl></div>

          <small id='gDwgQ'></small><noframes id='gDwgQ'>

          <tfoot id='gDwgQ'></tfoot>
            <bdo id='gDwgQ'></bdo><ul id='gDwgQ'></ul>
              1. <legend id='gDwgQ'><style id='gDwgQ'><dir id='gDwgQ'><q id='gDwgQ'></q></dir></style></legend>
                本文介绍了Symfony Cache 学说/orm/Proxies 未能在第 209 行打开流/Proxy/AbstractProxyFactory.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试将 symfony 移动到共享主机.

                I'm try to move symfony to shared host.

                我将 symfony 结构移到/并且我的 web 文件夹是/public_html.

                I moved symfony structure to / and my web folder is /public_html.

                警告:需要(/home/user/app/cache/prod/doctrine/orm/Proxies/__CG__UserBundleEntityUser.php):无法打开流:/home/user/vendor/doctrine/common 中没有这样的文件或目录/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php 第 209 行

                Warning: require(/home/user/app/cache/prod/doctrine/orm/Proxies/__CG__UserBundleEntityUser.php): failed to open stream: No such file or directory in /home/user/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 209

                警告:需要(/home/user/app/cache/prod/doctrine/orm/Proxies/__CG__UserBundleEntityUser.php):无法打开流:/home/user/vendor/doctrine/common 中没有这样的文件或目录/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php 第 209 行

                Warning: require(/home/user/app/cache/prod/doctrine/orm/Proxies/__CG__UserBundleEntityUser.php): failed to open stream: No such file or directory in /home/user/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 209

                致命错误:require(): 无法打开所需的 '/home/user/app/cache/prod/doctrine/orm/Proxies/__CG__UserBundleEntityUser.php' (include_path='.:/opt/php55/lib/php') 在/home/user/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php 第 209 行

                Fatal error: require(): Failed opening required '/home/user/app/cache/prod/doctrine/orm/Proxies/__CG__UserBundleEntityUser.php' (include_path='.:/opt/php55/lib/php') in /home/user/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 209

                此错误仅发生在 prod 环境中.dev 环境中不会引发异常.

                This error occurs only in the prod environment. The exception is not thrown in the dev environment.

                我尝试了以下方法:

                rm -rf /app/cache + chmod 777
                app/console cache:warmup
                

                我使用 Symfony 2.8.3.以下目录存在于本地和服务器上:

                I use Symfony 2.8.3. The following directories are present locally and on the server:

                本地缓存:-/annotations,/twig,/vich_uploader +/doctrine,/translations

                LOCAL CACHE: - /annotations, /twig, /vich_uploader + /doctrine, /translations

                服务器缓存:-/annotations,/twig,/vich_uploader

                SERVER CACHE: - /annotations, /twig, /vich_uploader

                如果我将本地缓存上传到服务器,异常就会消失.

                If I upload my local cache to the server, the exception disappears.

                推荐答案

                您在尝试访问应用程序之前没有创建代理类.这通常由以下人员完成:

                You did not create the proxy classes before you tried to access your application. This is usually done by:

                app/console cache:warmup --env=prod
                

                prod 环境中默认禁用代理类的自动生成.您可以通过将其添加到您的配置来启用类似于 dev 环境的代理类的自动生成:

                The auto-generation of proxy-classes is disabled by default in the prod environment. You can enable automatic generation of proxy-classes similar to the dev environment by adding this to your config:

                app/config/config_prod.yml

                doctrine:
                    orm:
                        auto_generate_proxy_classes:  true # <- change to true
                        proxy_dir:            '%kernel.cache_dir%/doctrine/orm/Proxies'
                        proxy_namespace:      Proxies
                

                这篇关于Symfony Cache 学说/orm/Proxies 未能在第 209 行打开流/Proxy/AbstractProxyFactory.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在 ZF2 中创建具有依赖关系(依赖注入)的学说存储库 下一篇:具有数组值的 Doctrine DBAL setParameter()

                相关文章

                <small id='Vq4Uj'></small><noframes id='Vq4Uj'>

                  <bdo id='Vq4Uj'></bdo><ul id='Vq4Uj'></ul>
                <i id='Vq4Uj'><tr id='Vq4Uj'><dt id='Vq4Uj'><q id='Vq4Uj'><span id='Vq4Uj'><b id='Vq4Uj'><form id='Vq4Uj'><ins id='Vq4Uj'></ins><ul id='Vq4Uj'></ul><sub id='Vq4Uj'></sub></form><legend id='Vq4Uj'></legend><bdo id='Vq4Uj'><pre id='Vq4Uj'><center id='Vq4Uj'></center></pre></bdo></b><th id='Vq4Uj'></th></span></q></dt></tr></i><div id='Vq4Uj'><tfoot id='Vq4Uj'></tfoot><dl id='Vq4Uj'><fieldset id='Vq4Uj'></fieldset></dl></div>
                <tfoot id='Vq4Uj'></tfoot>
              2. <legend id='Vq4Uj'><style id='Vq4Uj'><dir id='Vq4Uj'><q id='Vq4Uj'></q></dir></style></legend>