OpenSkedge icon indicating copy to clipboard operation
OpenSkedge copied to clipboard

You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.

Open kjetilrong opened this issue 8 years ago • 8 comments

when i try to use the command: php app/console doctrine:database:create

i get this error: [Doctrine\Common\Annotations\AnnotationException]
You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.

im using ubuntu 16.04 and i guess this is an php7 issue? How could i solve this.

kjetilrong avatar Aug 27 '16 07:08 kjetilrong

Yeah, the opcache may be setup on your machine to strip comments, which are needed because Doctrine stores some configuration in annotations in comments. You should just be able to add either of those lines to your php.ini to fix that issue.

maxfierke avatar Aug 29 '16 14:08 maxfierke

those options is not applicable for php7. But to solve this problem i had to replace the Doctrine Annotations directory with a version found here: https://github.com/doctrine/annotations/releases/tag/v1.2.5.

Then i got i new error message.. Would Openskedge run on PHP7?

kjetilrong avatar Aug 31 '16 11:08 kjetilrong

I got it running, had to edit the composer.json file. trial an error brought me to this: "php": ">=5.3.10,!=5.3.16", "symfony/symfony": "2.5.", "doctrine/data-fixtures": "1.0.@dev", "doctrine/doctrine-fixtures-bundle": "dev-master", "doctrine/migrations": "dev-master", "doctrine/doctrine-migrations-bundle": "dev-master", "doctrine/orm": ">=2.5.0,<2.6-dev", "doctrine/doctrine-bundle": "1.5.", "twig/extensions": "1.0.@dev", "symfony/assetic-bundle": "2.3.", "symfony/swiftmailer-bundle": "2.3.", "symfony/monolog-bundle": "2.3.", "sensio/distribution-bundle": "2.3.", "sensio/framework-extra-bundle": "2.3.", "sensio/generator-bundle": "2.3.", "jms/security-extra-bundle": "1.5.", "jms/di-extra-bundle": "1.4.", "kriswallsmith/assetic": "1.1.@dev", "pagerfanta/pagerfanta": "1.0.", "white-october/pagerfanta-bundle": "dev-master", "symfony/proxy-manager-bridge": "2.3.*", "symfony/icu": "1.1.

kjetilrong avatar Aug 31 '16 12:08 kjetilrong

Strange.. every page works but one. The /app.php/users returns: The server returned a "500 Internal Server Error" And i cant find anything in the error.log

kjetilrong avatar Aug 31 '16 15:08 kjetilrong

Changed to "doctrine/orm": ">=2.4.0,<2.5-dev", in composer.json and the users page also loaded.

kjetilrong avatar Aug 31 '16 16:08 kjetilrong

I am so glad to have found this discussion as I was also getting this error (and a headache from the brick wall). Thank-you for posting it publicly.

I tried several other suggestions for similar problems that I found elsewhere, but replacing the Doctrine Annotations solved this issue for me. It looks like most of the changes that you recommended for the composer.json file have been changed on the version I installed, but I still had to replace the Doctrine Annotations as you described above.

Buhler24 avatar Aug 23 '17 17:08 Buhler24

can someone suggest what folder do i need to replace for Doctrine. I Downloaded the new Annotations folder from the above URL as per stedy6 Aug31.
So do i replace the entire /Openskedge/vendor/doctrine folder or /Openskedge/vendor/doctrine/annotations/lib ? can you please put the command here..i will really ..really appreciate.

tomarprashant avatar Sep 02 '17 14:09 tomarprashant

/var/www/html/openskedge/vendor/doctrine/annotations for me, basically inside your openskedge folder then vendor ...

Serge928 avatar Jun 07 '18 12:06 Serge928