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

RuntimeException on PHP 5.5 with OPCache #7

Open
ossinkine opened this issue Aug 6, 2014 · 2 comments
Open

RuntimeException on PHP 5.5 with OPCache #7

ossinkine opened this issue Aug 6, 2014 · 2 comments

Comments

@ossinkine
Copy link
Contributor

On first request the page is loaded successfully. But second time (page already in cache) fatal error is thrown:

RuntimeException: google\protobuf\FileOptions class does not find in .../vendor/protocolbuffers/protoc-gen-php/proto/autoload.php on line 55

Temporary solution:
Add to OPCache blacklist (opcache.blacklist_filename) the following line:

**/vendor/protocolbuffers/protoc-gen-php/proto/autoload.php
@gsnoff
Copy link

gsnoff commented Oct 16, 2014

I'm getting the same results when autoload.php contains extension registry, i. e. it was generated from proto definition which has extensions. I believe it's due to C function zend_lookup_class() (used in file extension_registry.c in php-protocolbuffers) not performing autoload functions supplied by spl_autoload_register().

gsnoff added a commit to gsnoff/php-protocolbuffers that referenced this issue Oct 31, 2014
The string buffer pointed to by message_class_name appears to be managed by the php engine, since duplicate strings (e.g. literal class names) are being stored in the same place. Assuming it is much safer to increment the pointer variable itself rather than mess up with the buffer's contents.
Might fix chobie/protoc-gen-php#7
@webmaster777
Copy link

I can confim Protagores' version fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants