0
votes

I'm Problems Using Doctrine does not Jelastic .

Displays the Problem:

"Warning: require_once ( /vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php " ) : failed to open stream : No such file or directory in /var/www/webroot/ROOT/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php on line 64 Fatal error: require_once (): Failed opening require ' /vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php ' ( include_path = ' .: / usr / share / pear ' ) in /var/www/webroot/ROOT/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php the line 64 .

Following url problem: http://temprafesta.jelasticls.com.br/

I have already installed the ZF2 + Composer via SSH and its dependencies. Occurred with success , but when I make an appointment with the Doctrine presents this error.

Could anyone help ?

Kind Regards, Allan .

2

2 Answers

0
votes

From the given error it's clear that the base path is not taken into account. Likely it's a bug in Doctrine. Have you been able to check out another version of Doctrine?

0
votes

Well, the file that emits that error is this one:

https://github.com/doctrine/annotations/blob/master/lib/Doctrine/Common/Annotations/AnnotationRegistry.php#L64

/**
 * Registers file.
 *
 * @param string $file
 *
 * @return void
 */
static public function registerFile($file)
{
    require_once $file;
}

I dont't know why someone would want to call this method, but there's only two scenarios: It's either Doctrine's code internally, or it's your code.

I've not found too many places where doctrine calls this function, but this one sounds like it's it:

https://github.com/doctrine/doctrine2/blob/664b6bf4c52c893011ec4b7b3c99e94399ed0316/lib/Doctrine/ORM/Configuration.php#L153

Now the question is: Why is __DIR__ being evaluated to /vendor/doctrine/orm/lib/Doctrine/ORM there? It doesn't make sense, unless PHP gets confused because of any fancy filesystem stuff. I'd recommend diving into this part and add some debug output there just to be sure everything works as expected there. I think it doesn't.