# about dl() in php6

- Thread: https://externals.io/message/46766
- Original archive: https://news-web.php.net/php.internals/46766
- Started by hack988 hack988 on 2010-01-17T11:46:30+00:00
- Messages: 3
- 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

---

## #46766 — hack988 hack988 — 2010-01-17T11:46:30+00:00

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

In Online document about dl function
http://www.php.net/manual/en/function.dl.php
This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of
PHP 6.0.0. Relying on this feature is highly discouraged.


It's mean we can't Loads a PHP extension at runtime sine version 5.3.0
and higher version or it has another way to load extension at runtime?

---

## #46768 — Alexey Zakhlestin — 2010-01-17T11:56:28+00:00

URL: https://externals.io/message/46766#46768 · In reply to: #46766

> In Online document about dl function
> http://www.php.net/manual/en/function.dl.php
> This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of
> PHP 6.0.0. Relying on this feature is highly discouraged.
> 
> 
> It's mean we can't Loads a PHP extension at runtime sine version 5.3.0
> and higher version or it has another way to load extension at runtime?

it is disabled in mod_php and similar SAPIs. It is still available in CLI and CGI
see http://www.php.net/manual/en/function.dl.php#function.dl.notes

---

## #46769 — hack988 hack988 — 2010-01-17T13:17:35+00:00

URL: https://externals.io/message/46766#46769

Thanks Alexey Zakhlestin ,I'm kown very well all answer in your replies.

2010/1/17 Alexey Zakhlestin <indeyets@gmail.com>:
>
> 
>
> > […]
>
> yes. you can't use `dl()` in server-modules.
> the reasoning for this is quite simple. server-processes are persistent and if you load something via `dl()` it stays in server-process even after request is finished.
> which can lead to security problems, as other users of the server will have this user-loaded extension too.
>
> to load extensions in such environments you need to use php.ini
>
> > […]
>
> yes, you can. these are restarted after each request, so it is safe
>
> > […]
>
> no problem.
> remember to use "reply to all" when writing to mailing-lists in future, or lists won't get your replies.
>
>
> > […]
