在“Message.proto”中找不到类“Google \ Protobuf \ Internal \ Message”

PHP Fatal error: Class 'Google\Protobuf\Internal\Message' not found in /app/generated_files/message.php on line 13我正在与协议缓冲区的项目工作,我编译了一个原始文件后,我似乎无法包括它既不运行它因为它不断给我这个确切的错误: PHP Fatal error: Class 'Google\Protobuf\Internal\Message' not found in /app/generated_files/message.php on line 13

message.php我有一个.proto文件自动生成的文件,它包括Google\Protobuf\Internal\Message

在阅读protobuf github的问题时 ,我发现一个人有同样的问题,他认为这是composer php的错。 但在我的情况下,这不是问题因为我没有使用composer php。

我使用pecl来安装协议缓冲区,并且我有位于/etc/php5/apache2/XXXXXXXXX的库protobuf.so 。 我还在php.ini的最后一行添加了extension=protobuf.so

请记住,即时通讯使用docker,因此它可能是不同的,但我仍然怀疑。

Interesting Posts