What directory structure do you have your generated code in?

The PHP generation does typically require that you do a bit of file-moving 
afterwards, because require_once/include_once statements in PHP are always 
relative to where the PHP interpreter is invoked from.

The generated PHP code assumes that you have defined $GLOBALS['THRIFT_ROOT'] as 
an absolute path to the root of the Thrift code, and that generated code goes 
in $GLOBALS['THRIFT_ROOT'].'/packages/<name-of-thrift-file>/';

-----Original Message-----
From: richard ng [mailto:[email protected]] 
Sent: Monday, March 08, 2010 11:31 PM
To: [email protected]
Subject: problem with php thrift server : Class 'CalculatorProcessor' not found

Hi all,

I try to build php thrift server base on tutorial example, i generate php
code via command

thrift -r --gen php  tutorial.thrift

but when i run php thrift server, i say error :

Fatal error: Class 'CalculatorProcessor' not found in

And i can not found this class in generated files by thrift command above.
Whereas, i can found class when generate thrift code in cpp or java.

Please advice me.

Thanks all.

Reply via email to