Re: [PHP-GTK-DEV] Question about where to put the gtk.ini file for php(5)-gtk?
[email protected] (Elizabeth M Smith) Wed, 06 Jan 2010 15:54:38 -0500
| Newsgroups | php.gtk.dev |
|---|---|
| Message-ID | <[email protected]> |
Joop Boonen wrote:
> All,
>
> I have a question. I'm building the php(5)-gtk package. But when I put the
> gtk.ini in /etc/php5/conf.d which is the "--with-config-file-scan-dir".
> php programs like cacti that are accessed via apache don't run any more.
> As it also want to start up gtk but it fails because it doesn't have a
> display. Which is logical and also wanted.
>
> As the gtk.ini file should only be in cli (and not apache etc), I'm
> wondering how this issue could be best handled?
>
> Is there a way to put two directories in --with-config-file-scan-dir like
> --with-config-file-scan-dir=%{php_sysconf}/conf.d
> %{php_sysconf}/$sapi/conf.d
>
> Regards,
>
> Joop.
>
>
>
Easiest thing to do is to simply name your ini file php-cli.ini
Then only the cli SAPI loads it
see also Bob's rantings on the subject ;)
http://oops.opsat.net/doc/gtk/configure-php.html
Bottom line - best way to do things is to have a php-gtk specific ini,
loaded only when you run php-gtk apps that doesn't use config-scan-dir
magic but is specifically pointed to (with -c)
Thanks,
Elizabeth