Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4970

PHP tutorial doesn't work with Thrift v0.12.0+

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: Tutorial
    • Labels:
      None

      Description

      THRIFT-4474 made PSR-4 the default loader, but the tutorial doesn't seem to be updated. It works with neither -gen php nor -gen php:classmap, as follows:

      thrift$ cd tutorial
      thrift/tutorial$ ../compiler/cpp/thrift -r -gen php:server tutorial.thrift
      thrift/tutorial$ php/PhpServer.php
      PHP Fatal error:  Interface 'tutorial\CalculatorIf' not found in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php on line 55
      Fatal error: Interface 'tutorial\CalculatorIf' not found in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php on line 55
      thrift/tutorial$ php/PhpClient.php
      PHP Fatal error:  Uncaught Error: Class 'Thrift\Transport\TSocket' not found in /home/sekikn/repos/thrift/tutorial/php/PhpClient.php:49
      Stack trace:
      #0 {main}
        thrown in /home/sekikn/repos/thrift/tutorial/php/PhpClient.php on line 49
      
      thrift/tutorial$ rm -rf gen-php
      thrift/tutorial$ ../compiler/cpp/thrift -r -gen php:classmap,server tutorial.thrift
      thrift/tutorial$ php/PhpServer.php
      
      PHP Fatal error:  Uncaught Error: Class 'Thrift\Transport\TBufferedTransport' not found in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php:125
      Stack trace:
      #0 {main}
        thrown in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php on line 125
      Fatal error: Uncaught Error: Class 'Thrift\Transport\TBufferedTransport' not found in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php:125
      Stack trace:
      #0 {main}
        thrown in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php on line 125
      thrift/tutorial$ php/PhpClient.php
      PHP Fatal error:  Uncaught Error: Class 'Thrift\Transport\TSocket' not found in /home/sekikn/repos/thrift/tutorial/php/PhpClient.php:49
      Stack trace:
      #0 {main}
        thrown in /home/sekikn/repos/thrift/tutorial/php/PhpClient.php on line 49
      

        Attachments

          Activity

            People

            • Assignee:
              sekikn Kengo Seki
              Reporter:
              sekikn Kengo Seki

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                  Issue deployment