php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30100 Is there a possibility to load php modules per virtualhost directives?
Submitted: 2004-09-16 02:16 UTC Modified: 2004-09-17 23:48 UTC
From: php-answer at karolyi dot hu Assigned:
Status: Not a bug Package: Dynamic loading
PHP Version: 5.0.1 OS: Linux
Private report: No CVE-ID: None
 [2004-09-16 02:16 UTC] php-answer at karolyi dot hu
Description:
------------
I wonder if there is an option to load external php modules like gd, mysql and imap into php below a <VirtualHost> section with php_admin_value directives.

I think it could be possible, like dl()-ing from php scripts.

But as i've tried with "php_admin_value extension gd.so", it doesn't works at this moment.

Please report back if this is a solvable problem, because virtualhosting would be much more efficient if this option would work.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-16 05:48 UTC] rasmus@php.net
Why do you think it would be more efficient?  When you load in an extension it gets loaded into the Apache process which serves requests for all your virtual hosts anyway.  There would be no difference between doing it per-vhost at startup vs. just doing it from your php.ini.
 [2004-09-16 10:13 UTC] php-answer at karolyi dot hu
I want to restrict access to functions, without putting it in disable_functions.

In other view, this would cause lesser memory usage. Loading modules which the user won't use has no meaning.

Is it still a senseless question?

--
Regards,
Laszlo KAROLYI
 [2004-09-16 18:04 UTC] rasmus@php.net
it's not a senseless feature to want, it's just that per-vhost loading of shared libraries is a senseless implementation.  When you load a shared library it cannot in any way be restricted to a single vhost.  You could load and unload on every request, but that would destroy any sort of advantage you get from using the module version of PHP and you might as well use the CGI version and simply have different ini files on a per-vhost basis to get that functionality.
 [2004-09-17 23:48 UTC] php-answer at karolyi dot hu
Okay, thanks in advance.

By the way, it would be great in the future use if an option would exist which switches off a module's functions per virtualhost.

I know i'm getting annoying, but this option would be really great.

Greets,
Laszlo KAROLYI
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 15:01:28 2024 UTC