# [PATCH] Parse "-d / --define" for php-cgi / php-fastcgi

- Thread: https://externals.io/message/22727
- Original archive: https://news-web.php.net/php.internals/22727
- Started by dAniel hAhler on 2006-04-12T23:35:55+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #22727 — dAniel hAhler — 2006-04-12T23:35:55+00:00

URL: https://externals.io/message/22727#22727

Hello,

please find attached a tiny patch to parse "-d" and "--define" command line 
arguments for fastcgi/cgi sapi.

This allows overriding php.ini defaults in a very convient way in the
wrapper script that gets usually used (at least in a fastcgi/suexec setup).

The patch is against PHP_5_1, because AFAICS this functionality is already
in HEAD?!

Because 5.1.3 is about to get released, I don't think it gets added for it,
but please consider it for the 5.2 branch.

Thank you.

---

## #22731 — Dmitry Stogov — 2006-04-13T08:34:55+00:00

URL: https://externals.io/message/22727#22731 · In reply to: #22727

This patch willn't work for FastCGI.
It will alter ini entry only for first request, but then it will be restored
to previous value.
The proper patch is already applied to HEAD.

Thanks. Dmitry.

> -----Original Message-----
> From: dAniel hAhler [mailto:php@thequod.de] 
> Sent: Thursday, April 13, 2006 3:36 AM
> To: internals@lists.php.net
> Subject: [PHP-DEV] [PATCH] Parse "-d / --define" for php-cgi 
> / php-fastcgi
> 
> 
> Hello,
> 
> please find attached a tiny patch to parse "-d" and 
> "--define" command line 
> arguments for fastcgi/cgi sapi.
> 
> This allows overriding php.ini defaults in a very convient 
> way in the wrapper script that gets usually used (at least in 
> a fastcgi/suexec setup).
> 
> The patch is against PHP_5_1, because AFAICS this 
> functionality is already in HEAD?!
> 
> Because 5.1.3 is about to get released, I don't think it gets 
> added for it, but please consider it for the 5.2 branch.
> 
> Thank you.
