Jump to content

PHP4 custom extension problems on Redhat 4.4


TiddlyPom

Recommended Posts

I am trying to get a simple PHP wrapper extension for a custom two-phase-commit library (tpc) that is itself a wrapper for the Ingres II library.  (Just replicates all activities on identical Ingres II servers - don't ask I didn't write it!) 

 

The target environment is Redhat Linux Enterprise 4.4 (32/64 bit)

 

The biggest pain seems to be that my shared object library depends in turn on the Ingres shared object libraries.

 

I have managed to get a shared object extension built having followed the PHP4/5 examples and it works beautifully if I use the command line PHP e.g.

 

$ php test.php

 

produces the expected HTML result.  However if I try and use it under Apache/mod_php then it tries to serve the test.php file as a document rather than running the code.  Having hunted through the Apache error logs, I discovered that the "child process has died" - presumably a SEGFAULT in my code.

 

My code seem to fail as soon as I use any of my PHP extensions that call the Ingres libraries.

 

I have tried static linking of /opt/Ingres/IngresII/ingres/lib/libingres.a with my shared object.

I have put apache in the ingres group, turned SELinux off, added all the libraries to /etc/profile $PATH and $LD_LIBRARY_PATH, added environment variables to /etc/sysconfig/httpd and everything I can think of.

 

Help!

 

If there anything that I can do to give me a better idea of what is going wrong?

The shared object library that I am wrapping does not check whether the user is authorized on Ingres  ::) but segfaults instead.  Both my own user and root were registered users in Ingres and (of course) worked fine.

 

When I altered the apache user to be able to login and mirrored the httpd environment variables, I got the same results.

 

On adding the apache user as a user to Ingres, it all worked fine.

 

I am adding some extra Ingres calls to make user that the user that httpd is running under is authorized in Ingres although this should be in the TPC library  ::)

 

Sorry and thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.