Re: PHP 4.0 as a servlet: How is the C++ runtime initialized across a JNI call?
| From: | Bill Stoddard | Date: | Thu, 04 Jan 2001 22:37:12 +0000 |
| Subject: | Re: PHP 4.0 as a servlet: How is the C++ runtime initialized across a JNI call? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-42994@lists.php.net to get a copy of this message | ||
Solved this one with a bit of help from Sam Ruby. I needed to compile -all-
of PHP with xlC_r (the C++) compiler (export CC=xlC_r, export CXX=xlC_r,
etc.). Oh, did I fail to mention this was on AIX?
Bill
> I am building PHP 4.0 for use as a servlet under Tomcat. When I attempt to
> run date.php via Tomcat, I get a segfault the first time I attempt to call
> 'new' to instantiate a C++ object. At first I thought the problem was caused
> by the specific class (istdiostream). Then I created a simple class as
> follows:
>
> class simple_class {
> private:
> int i;
> public:
> simple_class(int in) {
> i = in;
> }
> }
>
> Get a segfault when I attempt to create an instance of this class as well,
so
> the problem is not with the class, but somewhere in the runtime. I suspect
> the problem is that the C++ runtime is not being initialized. JNI is a C
> interface AFAIK so that implies the PHP code needs to do it. Looking for a
> string to pull so I can unravel this problem.
>
> Thanks,
> Bill
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>