Hi guys,

  I already posted this as a question on StackOverflow.


I am following the "Getting Started with Doctrine" tutorial step-by-step,
and I am almost finished with it. But surprisingly, near the end of it I am
encountering a strange problem.

I cannot get the `show_product.php` script  to work, even though the nearly 
identical
`show_product.php` script works like a charm.
When I try to use that `show_bug.php` script, no error message is given (even 
with
`ini_set(‘display_errors’, ‘On’);error_reporting(E_ALL);`) and no exception 
is thrown,
but "nothing" happens and the expected action is not taken.

With the help of my debugger, I was able to locate the problem more 
 precisely :
the compiler exits suddenly at line 211 of 
`vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php`

The content of this line is

    require $fileName;

and the value of $fileName is 
`/var/folders/n2/_p480vgx4dx4rkk0prvbsbsr0000gn/T/__CG__User.php`,
a non-existent file on my system.

Here is the backtrace stack :

    Doctrine\Common\Proxy\AbstractProxyFactory->getProxyDefinition()
    in vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory
.php
    
    Doctrine\Common\Proxy\AbstractProxyFactory->getProxy()
    in vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory
.php
    
    Doctrine\ORM\UnitOfWork->createEntity()
    in vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php
    
    Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateRowData()
    in vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/
SimpleObjectHydrator.php
    
    Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateAllData()
    in vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/
SimpleObjectHydrator.php
    
    Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll()
    in vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/
AbstractHydrator.php
    
    Doctrine\ORM\Persisters\BasicEntityPersister->load()
    in vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.
php
    
    {main}()
    in show_bug.php


I also tried adding a directory for temporary proxies, as suggested by an 
answer on
StackExchange, but this changed nothing. Here is the related content of the 
slightly
modified bootstrap.php file (after I created the Proxies directory and 
applied
chmod a+w to it)

<?php
// bootstrap.php
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;

require_once "vendor/autoload.php";

$paths = array("src/");
$isDevMode = false;

// the connection configuration
$dbParams = array(
    'driver'   => 'pdo_mysql',
    'user'     => 'root',
    'password' => 'root',
    'dbname'   => 'flea_database',
);

$config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode);
$proxyDir='Proxies';

$config -> setProxyDir($proxyDir); 

$entityManager = EntityManager::create($dbParams, $config);


-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to