Jump to content

Calling userland functions from within an extensio


darioglz

Recommended Posts

Hi all,

 

I've just finished a PHP extension and now I need to

know how to call a userland PHP function from it. I

need to use Headers() to be able to download a binary file

that is generated by my extension. So far I've used

this function from the php-script that uses my

extension, but I'd like to embed this functionallity

into it.

 

I've searched the php-sources to see the

implementation of headers(), but the function that

seems to do the job (at SAPI.h):

 

SAPI_API int sapi_header_op(
   sapi_header_op_enum op,
   void *arg
   TSRMLS_DC);

 

...fails at link time complaining about an undefined

symbol related to sapi_header_op_enum (which is also

declared in that header). Do I need a SAPI *.so or

*.a module?

 

Thanks in advance.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.