# Help calling optional functions in an apache module

- Thread: https://externals.io/message/13009
- Original archive: https://news-web.php.net/php.internals/13009
- Started by David Carter on 2004-09-27T13:11:05+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #13009 — David Carter — 2004-09-27T13:11:05+00:00

URL: https://externals.io/message/13009#13009

Hello all,

I'm writing a PHP module that's closely tied to a custom Apache 2
module. My goal is to allow the PHP module to run with reduced
functionality if the Apache module isn't loaded. It seems that using
Apache's optional function interface is the way to go, but I can't seem
to make it work. I have what I think are all the correct headers in
place, but I keep getting these compile errors:

/projects/phparm/trunk/phparm.c:86: error: `arm_application_get_ptr'
undeclared (first use in this function)
/projects/phparm/trunk/phparm.c:86: error:
`apr_OFN_arm_application_get_t' undeclared (first use in this function)

Although the correct header file is in place to get optional functions,
all the definitions are ignored. Is there a -D directive I need to get
this to work? Am I missing something fundamental? Do you need more info?

Please help!

TIA,
Dave

---

## #13011 — Paul Querna — 2004-09-27T15:38:43+00:00

URL: https://externals.io/message/13009#13011 · In reply to: #13009

David Carter wrote:
> /projects/phparm/trunk/phparm.c:86: error: `arm_application_get_ptr'
> undeclared (first use in this function)
> /projects/phparm/trunk/phparm.c:86: error:
> `apr_OFN_arm_application_get_t' undeclared (first use in this function)

Yes, the optional function is not declared properly if this happens.

> Although the correct header file is in place to get optional functions,
> all the definitions are ignored. Is there a -D directive I need to get
> this to work? Am I missing something fundamental? Do you need more info?

Source code would be nice :)

You will likely find more help on the Apache Modules List:
http://modules.apache.org/subscribe

-Paul Querna
