Hi,
The following patch adds new INI directive for CGI SAPI.
It may enable/disable check for shebang line (#! /usr/bin/php) and as result
improve performance of FastCGI.
I set the default value for this directive to 1 (that means check file on
each request) to not break previous behavior.
However may be it is better to set default value to 0. That means break
previous behavior but improve performance by default.
Any suggestions?
Thanks. Dmitry.
-----Original Message-----
From: Dmitry Stogov [mailto:dmitry@php.net]
Sent: Tuesday, November 14, 2006 1:32 PM
To: php-cvs@lists.php.net
Subject: [PHP-CVS] cvs: php-src /sapi/cgi cgi_main.cdmitry Tue Nov 14 10:32:11 2006 UTC
Modified files:
/php-src/sapi/cgi cgi_main.c
Log:
cgi.* and fastcgi.* directives are moved to INI subsystem.
The new directive cgi.check_shebang_line can be used to
ommiting checnk for "#! /usr/bin/php" line.
I think people who want the performance can disable the check, but we
should not break BC, certainly not at a patch level release.
Hi,
The following patch adds new INI directive for CGI SAPI.
It may enable/disable check for shebang line (#! /usr/bin/php) and
as result
improve performance of FastCGI.I set the default value for this directive to 1 (that means check
file on
each request) to not break previous behavior.
However may be it is better to set default value to 0. That means
break
previous behavior but improve performance by default.Any suggestions?
Thanks. Dmitry.
-----Original Message-----
From: Dmitry Stogov [mailto:dmitry@php.net]
Sent: Tuesday, November 14, 2006 1:32 PM
To: php-cvs@lists.php.net
Subject: [PHP-CVS] cvs: php-src /sapi/cgi cgi_main.cdmitry Tue Nov 14 10:32:11 2006 UTC
Modified files:
/php-src/sapi/cgi cgi_main.c
Log:
cgi.* and fastcgi.* directives are moved to INI subsystem.
The new directive cgi.check_shebang_line can be used to
ommiting checnk for "#! /usr/bin/php" line.<dmitry-20061114103211.txt>
--
Ilia Alshanetsky
I think people who want the performance can disable the check, but we should
not break BC, certainly not at a patch level release.
I agree there.
Derick
Hello Dmitry,
i thought we were avoiding new inisettings. And also having a new INI
option takes some time. So is the result really faster?
best regards
marcus
Tuesday, November 14, 2006, 11:42:08 AM, you wrote:
Hi,
The following patch adds new INI directive for CGI SAPI.
It may enable/disable check for shebang line (#! /usr/bin/php) and as result
improve performance of FastCGI.
I set the default value for this directive to 1 (that means check file on
each request) to not break previous behavior.
However may be it is better to set default value to 0. That means break
previous behavior but improve performance by default.
Any suggestions?
Thanks. Dmitry.
-----Original Message-----
From: Dmitry Stogov [mailto:dmitry@php.net]
Sent: Tuesday, November 14, 2006 1:32 PM
To: php-cvs@lists.php.net
Subject: [PHP-CVS] cvs: php-src /sapi/cgi cgi_main.cdmitry Tue Nov 14 10:32:11 2006 UTC
Modified files:
/php-src/sapi/cgi cgi_main.c
Log:
cgi.* and fastcgi.* directives are moved to INI subsystem.
The new directive cgi.check_shebang_line can be used to
ommiting checnk for "#! /usr/bin/php" line.
Best regards,
Marcus
i thought we were avoiding new inisettings. And also having a new INI
option takes some time. So is the result really faster?
Saves FS access per request. New INI cost is minimal. Now, I think
avoiding INI makes most sense for INIs that change app behavior. This
INI changes almost nothing except for allowing you to make things faster
by removing check you don't use or alternatively enable check for some
legacy script which uses #! where it really has no meaning but it always
worked that way.
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/
Hello Stanislav,
why not use a command-line switch for itinstead an INI option?
best regards
marcus
Tuesday, November 14, 2006, 10:53:26 PM, you wrote:
i thought we were avoiding new inisettings. And also having a new INI
option takes some time. So is the result really faster?
Saves FS access per request. New INI cost is minimal. Now, I think
avoiding INI makes most sense for INIs that change app behavior. This
INI changes almost nothing except for allowing you to make things faster
by removing check you don't use or alternatively enable check for some
legacy script which uses #! where it really has no meaning but it always
worked that way.Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/
Best regards,
Marcus
Hello,
Hello Stanislav,
why not use a command-line switch for itinstead an INI option?
An ini setting is perfectly valid in this case, it can/should be set
to off in 5.2.x and enabled in head. A command line options is really
a bad alternative.
--Pierre
why not use a command-line switch for itinstead an INI option?
Because FCGI can't use command-line switches in many situations. And
even if it's allowed it's usually harder to set and easier to miss.
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/
The following patch adds new INI directive for CGI SAPI.
It may enable/disable check for shebang line (#! /usr/bin/php) and as
result
improve performance of FastCGI.I set the default value for this directive to 1 (that means check file
on
each request) to not break previous behavior.
However may be it is better to set default value to 0. That means
break
previous behavior but improve performance by default.
For sure, default to non-BC-breaking setting of 1.
That shouldn't even be a question. :-)
Is another .ini setting worth 4% increase in performance?
Not to me, but I'm not the guy that needs 4% CGI improvement on any
servers I run :-)
But another .ini setting doesn't bother me as it does some, so I'm
fine with that.
Killing shebang entirely in 6.0 --- I dunno... Seems like there's
probably a lot of cron jobs out there relying on it, that nobody will
think of when you ask them, but as soon as you pull the plug, you're
gonna get a zillion complaints...
And as far as not including it in the php.ini, that seems to me like
it would cause more problems than solutions. It ends up seeming to
php.ini readers like an "Undocumented Feature" or something, and you
just generate more questions than adding one more setting to php.ini
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?