Note that there are some explanatory texts on larger screens.

plurals
  1. PODoctrine error: "Failed opening required '/tmp/__CG__Source.php' "
    text
    copied!<p>I am trying to migrate my PHP application to an Ubuntu server, but without succes. Any help would be appreciated.</p> <p>First I installed Doctrine successfully into /jorrit/myapp, following the first part of Doctrine's <a href="http://docs.doctrine-project.org/en/latest/tutorials/getting-started.html" rel="noreferrer">Getting Started</a> manual (till "Generating the Database Schema"). Secondly I placed my PHP scripts (which use Doctrine) in folder /jorrit/myapp.</p> <p>When I try to run my PHP script in the CLI, I get this error messages:</p> <blockquote> <p>PHP Warning: require(/tmp/__CG__Source.php): failed to open stream: No such file or directory in /jorrit/myapp/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 200</p> <p>PHP Fatal error: require(): Failed opening required '/tmp/__CG__Source.php' (include_path='.:/usr/share/php:/usr/share/pear') in /jorrit/myapp/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 200</p> </blockquote> <p>Bootstrap.php looks like this:</p> <pre><code>&lt;?php // bootstrap.php use Doctrine\ORM\Tools\Setup; use Doctrine\ORM\EntityManager; require_once "vendor/autoload.php"; // Create a simple "default" Doctrine ORM configuration for Annotations $isDevMode = false; $config = Setup::createAnnotationMetadataConfiguration(array(__DIR__."/src"), $isDevMode); // the connection configuration $dbParams = array( 'driver' =&gt; 'pdo_mysql', 'host' =&gt; 'xx', 'user' =&gt; 'xx', 'password' =&gt; 'xx', 'dbname' =&gt; 'xx', 'profiler' =&gt; 'false' ); // obtaining the entity manager $entityManager = EntityManager::create($dbParams, $config); ?&gt; </code></pre> <p>The first lines of my PHP script:</p> <pre><code>&lt;?php require_once "bootstrap.php"; require_once 'classes.php'; $connection = $entityManager-&gt;getConnection(); </code></pre> <p>The application works fine in my development environment (Windows). The /tmp folder exists and is accessible. The database is migrated succesfully and exists. I did not change anything in the vendor folder.</p> <p>Any ideas? Thanks in advance for your help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload