Problems with External Php Extensions

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am trying to build a simple PHP Extension which simply returns a
string object.

I have followed the tutorial found on
up until the deployment stage. Instead of deploying the compiled
module in the PHP Ini directory, I copied it in the same folder where
the test.php page is. Then I am loading the module using the dl()

By using the extension_loaded() method I am making sure that the
extension is loaded successfully, however when I try to execute the
GetMessage method found in the extension, the php compiler just
crashes. ie. it stops compiling and does not issue any form of error

I even tried to capture any exception thrown by calling the
GetMessage() function from within a Try Catch block, however no
exception is thrown, the compiler just crashes, or so it seems.

Any idea what I might be doing incorrectly? Since the Extension
compiles successfully and the module files are created without error,
can I consider that step done? Or can the problem reside in the
original source?

Any help would be greatly appreciated.

Thanks and Regards,

Re: Problems with External Php Extensions

Luke wrote:
Quoted text here. Click to load it

Compilers only catch syntax errors.  They won't catch things like access
violations or any of a million other runtime errors you might have.

You need to determine exactly where your problem lies.  My bet is on
your extension.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Problems with External Php Extensions

Quoted text here. Click to load it

There is no such thing as a "string object" in PHP.  In PHP, strings
are scalar...

Quoted text here. Click to load it

dl() is not a method (meaning, it doesn't belong to any object), it is
a function.

Have you read the documentation for dl()?  Are you sure that it is
allowed on your system to load an extension from the directory where
your scripts are located?


Site Timeline