[Fedora-php-devel-list] How to have a "cli" only extension

Remi Collet Fedora at FamilleCollet.com
Sun Aug 17 08:22:07 UTC 2008


Hi all,

I'm looking at the php-gtk extension
http://gtk.php.net/

This extension is a cli only extension (shouldn't be load into mod_php)

How can we configure it to load only for php-cli.

It seems that php only parse 1 directory for additionnal .ini file
PHP_CONFIG_FILE_SCAN_DIR (/etc/php.d)

I search and found than other disto use /etc/php-cli.d or /etc/php/cli.d
instead, but i don't find any solution to scan 2 directories...

A solution could be to have a simple wrapper, phpgtk

	#!/bin/sh
	exec /usr/bin/php -d extension=php_gtk2.so "$@"

Any other idea ? Where to search ?

Thanks,
Remi




More information about the php-devel mailing list