Sto provando a migrare la mia applicazione PHP su un server Ubuntu, ma senza successo. Qualsiasi aiuto sarebbe apprezzato.Errore di Doctrine: "Apertura fallita richiesta '/tmp/__CG__Source.php'"
Prima ho installato Doctrine correttamente in/jorrit/myapp, seguendo la prima parte del manuale di Doctrine Getting Started (fino a "Generazione dello schema del database"). In secondo luogo ho inserito i miei script PHP (che usano Doctrine) nella cartella/jorrit/myapp.
Quando provo ad eseguire il mio script PHP nella CLI, ottengo questo messaggio di errore:
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
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
bootstrap.php si presenta così:
<?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' => 'pdo_mysql',
'host' => 'xx',
'user' => 'xx',
'password' => 'xx',
'dbname' => 'xx',
'profiler' => 'false'
);
// obtaining the entity manager
$entityManager = EntityManager::create($dbParams, $config);
?>
Le prime righe del mio script PHP :
L'applicazione funziona correttamente nel mio ambiente di sviluppo (Windows). La cartella/tmp esiste ed è accessibile. Il database viene migrato correttamente ed esiste. Non ho cambiato nulla nella cartella del venditore.
Qualche idea? Grazie in anticipo per il vostro aiuto.
Il problema si verifica solo con $ isDevMode = falsi –