Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22727 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92484 invoked by uid 1010); 12 Apr 2006 23:46:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92468 invoked from network); 12 Apr 2006 23:46:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Apr 2006 23:46:05 -0000 Received: from ([127.0.0.1:20658]) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with ECSTREAM id 83/5D-19715-C319D344 for ; Wed, 12 Apr 2006 19:46:05 -0400 X-Host-Fingerprint: 83.135.209.92 i5387D15C.versanet.de Received: from ([83.135.209.92:19735] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id F1/4D-19715-EDE8D344 for ; Wed, 12 Apr 2006 19:35:59 -0400 Message-ID: To: internals@lists.php.net Reply-To: php@thequod.de Date: Thu, 13 Apr 2006 01:35:55 +0200 Lines: 39 User-Agent: KNode/0.10.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart7345180.DxRZkkPLeK" Content-Transfer-Encoding: 7Bit X-Posted-By: 83.135.209.92 Subject: [PATCH] Parse "-d / --define" for php-cgi / php-fastcgi From: php@thequod.de (dAniel hAhler) --nextPart7345180.DxRZkkPLeK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit 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. --nextPart7345180.DxRZkkPLeK Content-Type: text/x-diff; name="php_cgi_parse_define.patch.txt" Content-Transfer-Encoding: 8Bit Content-Disposition: attachment; filename="php_cgi_parse_define.patch.txt" Index: sapi/cgi/cgi_main.c =================================================================== RCS file: /repository/php-src/sapi/cgi/cgi_main.c,v retrieving revision 1.267.2.13 diff -u -r1.267.2.13 cgi_main.c --- sapi/cgi/cgi_main.c 7 Apr 2006 13:45:23 -0000 1.267.2.13 +++ sapi/cgi/cgi_main.c 12 Apr 2006 23:33:53 -0000 @@ -1294,6 +1294,10 @@ zend_first_try { while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 1)) != -1) { switch (c) { + case 'd': /* define ini entries on command line */ + define_command_line_ini_entry(php_optarg); + break; + case 'h': case '?': no_headers = 1; --nextPart7345180.DxRZkkPLeK--