OfficeStack / OpenSkedge

A flexible employee scheduling application built upon Symfony2 and Doctrine. Designed for companies and organizations with fluid shifts.
126 stars 38 forks source link

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

Open kjetilrong opened 8 years ago

kjetilrong commented 8 years ago

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 commented 8 years ago

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.

kjetilrong commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

Buhler24 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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