On 24.02.2011 21:53, Ronald Appelfelder wrote:
> Hi!
Hi!
> While playing with php5-midgard2 (PHP_API: apache2handler) I tried to change
> the ShareDir config variable but midgard2 did not honor this (at connect
> time):
>
> midgard_connection::get_instance()->open("sampleConfig");
>
> The same was true by setting the php ini directive "midgard.configuration".
>
> With the current implemention of the php5-midgard2 schema initialization at
> php module load time there seems to be no way to have separate schemas per
> virtual host.
It's not possible with PHP. It's caused by fact that PHP classes are
registered as internal classes when PHP extension is loaded. In your
case this is Apache start. We experimented with registering user
classes, which could be registered per request (as pure PHP classes),
but it's been very very unstable.
I think, the scenario you describe could be implemented with AppServer.
Midgard PHP extension is very specific regarding GObject and PHP
classes. Setting different sharedir, could be done with environmental
variable (MIDGARD_ENV_GLOBAL_SHAREDIR). But, still, all GObject classes
registered from xml files will be registered as internal PHP classes,
which means they are accessible from any process/request and they are
alive till main process is running.
Piotras
_______________________________________________
user mailing list
[email protected]
http://lists.midgard-project.org/mailman/listinfo/user