Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stedy6 opened this issue Aug 27, 2016 · 8 comments

Comments

Projects
None yet
5 participants
@stedy6
Copy link

commented Aug 27, 2016

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.

@maxfierke

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2016

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.

@stedy6

This comment has been minimized.

Copy link
Author

commented Aug 31, 2016

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?

@stedy6

This comment has been minimized.

Copy link
Author

commented Aug 31, 2016

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.

@stedy6

This comment has been minimized.

Copy link
Author

commented Aug 31, 2016

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

@stedy6

This comment has been minimized.

Copy link
Author

commented Aug 31, 2016

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

@Buhler24

This comment has been minimized.

Copy link

commented Aug 23, 2017

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.

@tomarprashant

This comment has been minimized.

Copy link

commented Sep 2, 2017

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.

@Serge928

This comment has been minimized.

Copy link

commented Jun 7, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.