# php engine as shared library?

- Thread: https://externals.io/message/26014
- Original archive: https://news-web.php.net/php.internals/26014
- Started by Dirk on 2006-10-10T18:03:27+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

---

## #26014 — Dirk — 2006-10-10T18:03:27+00:00

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

Hi!
I didn't find a better place to ask...

I would like to know what I'd have to do to link a small server written
in C against a _shared_(!) libphp(!)...

I had a look at php-cli and mod_php but both seem to link everything
static which isn't what I want... I also had a look at the options of
the configure script...

..but ended up subscribing here...


How do I compile the whole php engine as a shared lib? It must work
somehow... Why else would there be something like php-config?


Please, somebody, lemme know what todo/read...

Thanks,
Dirk

---

## #26015 — Ilia Alshanetsky — 2006-10-10T18:15:22+00:00

URL: https://externals.io/message/26014#26015 · In reply to: #26014

Embed sapi is probably what you are looking for.




> Hi!
> I didn't find a better place to ask...
>
> I would like to know what I'd have to do to link a small server  
> written
> in C against a _shared_(!) libphp(!)...
>
> I had a look at php-cli and mod_php but both seem to link everything
> static which isn't what I want... I also had a look at the options of
> the configure script...
>
> ..but ended up subscribing here...
>
>
> How do I compile the whole php engine as a shared lib? It must work
> somehow... Why else would there be something like php-config?
>
>
> Please, somebody, lemme know what todo/read...
>
> Thanks,
> Dirk
>
> -- 
> 
> 
>
>

Ilia Alshanetsky
