Alexey Zakhlestin schrieb:
>> 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.
>
> That's the way it works now and there isn't clean solution for
> apache2handler case.
>
> There are 2 alternative approaches, though, which can solve the situation:
>
> 1) Currently, the recommended way for running Midgard applications is via AiP
> https://github.com/indeyets/appserver-in-php
> That is definitely the way to go, if your applications are based on
> MidgardMVC
Too match other things to learn at the moment.
> 2) You can use fastcgi to connect application to apache
This has solved my problem. Here my Apache-FcgidWrapper Script:
#!/bin/sh
APP_HOME=/srv/www/fastcgi_example
export MIDGARD_ENV_GLOBAL_CONFDIR=$APP_HOME
export MIDGARD_ENV_GLOBAL_SHAREDIR=$APP_HOME/share
export PHPRC=/etc/php5/fastcgi
exec /usr/bin/php-cgi -d extension=midgard2.so
> In both cases, you will be able to have separate php.ini files for
> your projects,
> projects will be running in different processes and you can even setup them to
> be run by different user-accounts.
Thank you.
Ronald
_______________________________________________
user mailing list
[email protected]
http://lists.midgard-project.org/mailman/listinfo/user