A new RFC for PHP's proposed INI files have been added to the wiki. Below is
a direct link to the page.
http://wiki.php.net/rfc/newinis
Eric Lee Stewart
ericleestewart@gmail.com
Hi Eric.
A new RFC for PHP's proposed INI files have been added to the wiki. Below is
a direct link to the page.
http://wiki.php.net/rfc/newinis
I love the settings for production, but I think you reversed the meaning
of allow_call_time_pass_reference - if it is allowed no warning will be
issued. So, to make your intention of
; Default Value: On (Issue warnings)
; Development Value: On (Issue warnings)
; Production Value: Off (Suppress warnings)
work, you need to write that the other way around - 'Off' means 'issue
warnings'... It is:
Development Value: Off (Issue warnings)
Production Value: On (Suppress warnings)
In production session.bug_compat_42 is off, but according to the
"summary" you want it to be on for development (so that warnings about
it are shown, I assume). In the development php.ini the actual values
for both settings are off, though.
And I am not sure about register_argc_argv having different values in
both files. I understand ot being off in production for speed reasons,
but if it "just works" in development and "suddenly stops working" in
production... But that's a minor issues.
All in all like the proposed settings!
Regards,
Karsten
2009/2/10 Karsten Dambekalns karsten@typo3.org:
Hi Eric.
A new RFC for PHP's proposed INI files have been added to the wiki. Below
is
a direct link to the page.
http://wiki.php.net/rfc/newinisI love the settings for production, but I think you reversed the meaning of
allow_call_time_pass_reference - if it is allowed no warning will be issued.
So, to make your intention of
; Default Value: On (Issue warnings)
; Development Value: On (Issue warnings)
; Production Value: Off (Suppress warnings)work, you need to write that the other way around - 'Off' means 'issue
warnings'... It is:
Development Value: Off (Issue warnings)
Production Value: On (Suppress warnings)In production session.bug_compat_42 is off, but according to the "summary"
you want it to be on for development (so that warnings about it are shown, I
assume). In the development php.ini the actual values for both settings are
off, though.And I am not sure about register_argc_argv having different values in both
files. I understand ot being off in production for speed reasons, but if it
"just works" in development and "suddenly stops working" in production...
But that's a minor issues.All in all like the proposed settings!
Regards,
Karsten--
Regarding ...
"; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future."
This is no longer true. See http://docs.php.net/manual/en/ini.sections.php
I would suggest changing this to ...
"; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future. The exception to this rule is
; section headers starting with [HOST= and [PATH=
; See : http://www.php.net/manual/en/ini.sections.php"
Regards,
Richard Quadling.
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
2009/2/10 Richard Quadling rquadling@googlemail.com:
2009/2/10 Karsten Dambekalns karsten@typo3.org:
Hi Eric.
A new RFC for PHP's proposed INI files have been added to the wiki. Below
is
a direct link to the page.
http://wiki.php.net/rfc/newinisI love the settings for production, but I think you reversed the meaning of
allow_call_time_pass_reference - if it is allowed no warning will be issued.
So, to make your intention of
; Default Value: On (Issue warnings)
; Development Value: On (Issue warnings)
; Production Value: Off (Suppress warnings)work, you need to write that the other way around - 'Off' means 'issue
warnings'... It is:
Development Value: Off (Issue warnings)
Production Value: On (Suppress warnings)In production session.bug_compat_42 is off, but according to the "summary"
you want it to be on for development (so that warnings about it are shown, I
assume). In the development php.ini the actual values for both settings are
off, though.And I am not sure about register_argc_argv having different values in both
files. I understand ot being off in production for speed reasons, but if it
"just works" in development and "suddenly stops working" in production...
But that's a minor issues.All in all like the proposed settings!
Regards,
Karsten--
Regarding ...
"; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future."This is no longer true. See http://docs.php.net/manual/en/ini.sections.php
I would suggest changing this to ...
"; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future. The exception to this rule is
; section headers starting with [HOST= and [PATH=
; See : http://www.php.net/manual/en/ini.sections.php"Regards,
Richard Quadling.
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
Better grammar.
"; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future. The exceptions to this rule are
; section headers starting with [HOST= or [PATH=
; See : http://www.php.net/manual/en/ini.sections.php"
--
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
Eric Stewart wrote:
A new RFC for PHP's proposed INI files have been added to the wiki. Below is
a direct link to the page.
http://wiki.php.net/rfc/newinisEric Lee Stewart
ericleestewart@gmail.com
Eric,
Thanks for the work put into this. My comments follow.
Chris
The section on devel & prod setting differences looks nice but it does
become a maintenance task. Since diffing files is easy (and
relatively obvious), I'd suggest removing this section from the files.
You may want to keep it in the RFC text so reviewers can get a quick
idea of the intent of the differences. It's also not immediately
obvious from this section whether the given values are the defaults,
or what is set in each file, or set in the other file.
In the section on extensions. IIRC, you can now use absolute paths.
Change all "http://us2.php.net/manual/en/" to "http://www.php.net/manual/"
(Maybe the doc team can confirm whether to keep the "en")
oci8.events and oci8.old_oci_close_semantics are boolean, so we can
take this opportunity to change the 1 and 0 to On and Off.
--
Email: christopher.jones@oracle.com Tel: +1 650 506 8630
Twitter: http://twitter.com/ghrd Free PHP Book: http://tinyurl.com/UGPOM
Sorry to hijack, but ...
Christopher Jones wrote:
oci8.events and oci8.old_oci_close_semantics are boolean, so we can
take this opportunity to change the 1 and 0 to On and Off.
... I've never understood why writing On/Off is a good idea, when it is
not intuitive that the value returned from ini_get()
is of a different
content (not meaning, however).
Or has this changed in more recent versions?
markus@dev01:~$ php -dregister_globals=Off -r
'var_dump(ini_get("register_globals"));'
string(0) ""
markus@dev01:~$ php -dregister_globals=On -r
'var_dump(ini_get("register_globals"));'
string(1) "1"
markus@dev01:~$ php -dregister_globals=0 -r
'var_dump(ini_get("register_globals"));'
string(1) "0"
markus@dev01:~$ php -dregister_globals=1 -r
'var_dump(ini_get("register_globals"));'
string(1) "1"
markus@dev01:~$ php -v
PHP 5.2.5-3+lenny1 with Suhosin-Patch 0.9.6.2 (cli) (built: May 27 2008
21:47:08)
regards,
- Markus
Markus Fischer wrote:
Sorry to hijack, but ...
Christopher Jones wrote:
oci8.events and oci8.old_oci_close_semantics are boolean, so we can
take this opportunity to change the 1 and 0 to On and Off.... I've never understood why writing On/Off is a good idea,
It improves human readability of php.ini, making it clear that the
parameter value range is not numeric.
when it is not intuitive that the value returned from
ini_get()
is
of a different content (not meaning, however).
It could possibly be argued there is an inconsistency somewhere, but
then PHP type juggling and comparison have their own "charm".
Chris
--
Email: christopher.jones@oracle.com Tel: +1 650 506 8630
Twitter: http://twitter.com/ghrd Free PHP Book: http://tinyurl.com/UGPOM
Hi,
Some suggestions:
Links: Instead of forcing language to english, allow autodetection from
http headers.
Before:
http://www.php.net/manual/en/ini.core.php#ini.user-dir
After:
http://www.php.net/ini.core#ini.user-dir
Also some things I think are not appropriate:
extension_dir = "./"
enable_dl = On
Setting extension_dir to this value allows an attacker to execute code using dl()
. I believe at least enable_dl should be disabled on production systems.
Regarding register_argc_argv, you write:
; Development Value: On
; Production Value: Off
However it's off in both case (which seems better to me anyway). Just a matter of fixing comments?
For now that's everything that I saw, I'll take another look later :)
Mark
Le mardi 10 février 2009 à 08:17 -0800, Christopher Jones a écrit :
Eric Stewart wrote:
A new RFC for PHP's proposed INI files have been added to the wiki. Below is
a direct link to the page.
http://wiki.php.net/rfc/newinisEric Lee Stewart
ericleestewart@gmail.comEric,
Thanks for the work put into this. My comments follow.
Chris
The section on devel & prod setting differences looks nice but it does
become a maintenance task. Since diffing files is easy (and
relatively obvious), I'd suggest removing this section from the files.
You may want to keep it in the RFC text so reviewers can get a quick
idea of the intent of the differences. It's also not immediately
obvious from this section whether the given values are the defaults,
or what is set in each file, or set in the other file.In the section on extensions. IIRC, you can now use absolute paths.
Change all "http://us2.php.net/manual/en/" to "http://www.php.net/manual/"
(Maybe the doc team can confirm whether to keep the "en")oci8.events and oci8.old_oci_close_semantics are boolean, so we can
take this opportunity to change the 1 and 0 to On and Off.--
Email: christopher.jones@oracle.com Tel: +1 650 506 8630
Twitter: http://twitter.com/ghrd Free PHP Book: http://tinyurl.com/UGPOM
Am 10.02.2009 um 03:27 schrieb Eric Stewart:
A new RFC for PHP's proposed INI files have been added to the wiki.
Below is
a direct link to the page.
http://wiki.php.net/rfc/newinis
For -development, display_errors should definitely be on, and
error_reporting should be E_ALL
| E_STRICT.
auto_globals_jit shouldn't be on, IMO.
- David
Eric Stewart wrote:
A new RFC for PHP's proposed INI files have been added to the wiki. Below is
a direct link to the page.
http://wiki.php.net/rfc/newinis
Good work IMHO.
Similar to what Karsten Dambekalns wrote I think we should only have a
difference between devel and production for display/logging options, but
not for options changing the 'behaviour' of PHP.
So I'd propose
allow_call_time_pass_reference = Off (devel) / On (production)
display_errors = On (devel) / Off (production)
display_startup_errors = On (devel) / Off (production)
html_errors = On (devel) / Off (production)
session.bug_compat_warn = On (devel) / Off (production)
track_errors = On (devel) / Off (production)
but
output_buffering = 4096 ; Changes header()
/compression filter behaviour
register_argc_argv = Off ; Why should devel have access if prod doesn't?
request_order = GPCS ; Why should devel/production differ?
session.bug_compat_42 = Off ; Why should devel/production differ?
Apart from that I'd minimize the diff (there are minor white space
differences and an unnecessarily big difference in the introduction text).
Regards,
- Chris
Eric Stewart wrote:
A new RFC for PHP's proposed INI files have been added to the wiki.
Below is
a direct link to the page.
http://wiki.php.net/rfc/newinisGood work IMHO.
Similar to what Karsten Dambekalns wrote I think we should only have a
difference between devel and production for display/logging options,
but
not for options changing the 'behaviour' of PHP.So I'd propose
allow_call_time_pass_reference = Off (devel) / On (production)
display_errors = On (devel) / Off (production)
display_startup_errors = On (devel) / Off (production)
html_errors = On (devel) / Off (production)
session.bug_compat_warn = On (devel) / Off (production)
track_errors = On (devel) / Off (production)but
output_buffering = 4096 ; Changesheader()
/compression filter
behaviour
I think it makes sense to have it on in both.
register_argc_argv = Off ; Why should devel have access if prod
doesn't?
off in both.
request_order = GPCS ; Why should devel/production differ?
session.bug_compat_42 = Off ; Why should devel/production differ?
Agreed.
Ilia Alshanetsky
2009/2/11 Ilia Alshanetsky ilia@prohost.org:
Eric Stewart wrote:
A new RFC for PHP's proposed INI files have been added to the wiki. Below
is
a direct link to the page.
http://wiki.php.net/rfc/newinisGood work IMHO.
Similar to what Karsten Dambekalns wrote I think we should only have a
difference between devel and production for display/logging options, but
not for options changing the 'behaviour' of PHP.So I'd propose
allow_call_time_pass_reference = Off (devel) / On (production)
display_errors = On (devel) / Off (production)
display_startup_errors = On (devel) / Off (production)
html_errors = On (devel) / Off (production)
session.bug_compat_warn = On (devel) / Off (production)
track_errors = On (devel) / Off (production)but
output_buffering = 4096 ; Changesheader()
/compression filter behaviourI think it makes sense to have it on in both.
register_argc_argv = Off ; Why should devel have access if prod doesn't?
off in both.
request_order = GPCS ; Why should devel/production differ?
session.bug_compat_42 = Off ; Why should devel/production differ?Agreed.
Ilia Alshanetsky
--
One of the things about the 2 files is the amount of consistency between them.
The differences are scattered throughout the file.
Considering that these are our recommendations, would it not be
possible to have the differences at the top of the file and the
consistent ones below that.
[PHP]
; Here are the PHP's group recommended settings for development
foo=bar
; Now the rest of the settings which the PHP group have no explicit opinion on.
and
[PHP]
; Here are the PHP's group recommended settings for a production environment
foo=baz
; Now the rest of the settings which the PHP group have no explicit opinion on.
This way, the top few lines clearly indicate the areas where the PHP
group feel there should be distinct differences between a production
environment and a development environment.
This is how I've structured my ini files (for example, CLI has no HTML
highlighting output, whereas CGI/ISAPI does - just an example
difference). The rest of the settings are consistent between all the
SAPIs, so I have them further down the files.
Regards,
Richard.
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
Hi.
session.bug_compat_42 = Off ; Why should devel/production differ?
Because in dev a warning should be shown, but the warning setting only
has an effect if this setting is on (at least that way it is documented
in php.ini).
Regards,
Karsten
Hi Eric:
Thanks for the work.
I noticed the actual directives in the files are the same. I guess you
just focused on the Quick Reference section and getting the comments set
up the way you want.
Line 488 in prod and 483 in dev need to have the link commented out.
error_reporting: should be E_ALL
in production. Well written code
should not be generating notices, so notices indicate a problem that
needs fixing.
output_buffering: I agree with having it off in dev, since it encourages
cleaner programming practices. Relying on buffering can lead to getting
bitten when deploying to a server that has it off.
variables_order: They should be the same on dev and prod.
request_order: Seems like it should be the same.
track_errors: I like this on in all environments. Functions exist that
you need to get detailed error information but don't provide a way to get
at them in the code other than $php_errormsg. Your comment that it's
helpful for debugging dev servers undersells the this feature.
session.bug_compat_42 and session.bug_compat_warn: The grammar in your
comments needs cleaning up. Hmm, perhaps all of the comments do :), I
haven't looked. Anyway, the worst offense is the use of a double
negative: "It's not recommended that you do not use this feature on
production servers."
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
Hi Eric:
Thanks for the work.
I noticed the actual directives in the files are the same. I guess
you
just focused on the Quick Reference section and getting the comments
set
up the way you want.Line 488 in prod and 483 in dev need to have the link commented out.
error_reporting: should be
E_ALL
in production. Well written code
should not be generating notices, so notices indicate a problem that
needs fixing.
I think in dev environment it makes sense to set error reporting level
to E_ALL
| E_STRICT
Ilia Alshanetsky
Hey,
IMHO dev environment should be E_ALL
| E_STRICT
| E_DEPRECATED
Regards,
Hi Eric:
Thanks for the work.
I noticed the actual directives in the files are the same. I guess you
just focused on the Quick Reference section and getting the comments set
up the way you want.Line 488 in prod and 483 in dev need to have the link commented out.
error_reporting: should be
E_ALL
in production. Well written code
should not be generating notices, so notices indicate a problem that
needs fixing.I think in dev environment it makes sense to set error reporting level to
E_ALL
|E_STRICT
Ilia Alshanetsky
--
--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9215-8480
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Paulo - SP/Brazil
Hi
2009/2/11 Guilherme Blanco guilhermeblanco@gmail.com:
Hey,
IMHO dev environment should be
E_ALL
|E_STRICT
|E_DEPRECATED
E_DEPRECATED
is apart of E_ALL
(like Lukas just said), so I'd say:
; Development
error_reporting = E_ALL
| E_STRICT
(5.3)
error_reporting = E_ALL
(6.0+)
; Production
error_reporting = E_ALL
| ~E_DEPRECATED
Regards,
Hi Eric:
Thanks for the work.
I noticed the actual directives in the files are the same. I guess you
just focused on the Quick Reference section and getting the comments set
up the way you want.Line 488 in prod and 483 in dev need to have the link commented out.
error_reporting: should be
E_ALL
in production. Well written code
should not be generating notices, so notices indicate a problem that
needs fixing.I think in dev environment it makes sense to set error reporting level to
E_ALL
|E_STRICT
Ilia Alshanetsky
--
--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9215-8480
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Paulo - SP/Brazil--
--
Kalle Sommer Nielsen
Hi Eric:
Thanks for the work.
I noticed the actual directives in the files are the same. I guess
you
just focused on the Quick Reference section and getting the
comments set
up the way you want.Line 488 in prod and 483 in dev need to have the link commented out.
error_reporting: should be
E_ALL
in production. Well written code
should not be generating notices, so notices indicate a problem that
needs fixing.I think in dev environment it makes sense to set error reporting
level toE_ALL
|E_STRICT
Right. Currently E_DEPRECATED
is also part of E_ALL. Maybe it should
not. In dev env it should of course be enabled.
regards,
Lukas Kahwe Smith
mls@pooteeweet.org
Hi,
variables_order: They should be the same on dev and prod.
request_order: Seems like it should be the same.
Caution! I've read several times in this thread that request_order
should be set to something that also contains C. This is DANGEROUS.
request_order was specifically introduced to determine the order of
variable merging that leads to $_REQUEST, while variables_order defines
the variables that are assigned at all (and without register_globals
and with request_order, the _order is actually misleading).
So: request_order should ONLY be set to "GP" in order NOT to have
cookies popping up in $_REQUEST - else everybody who uses $_REQUEST is
vulnerable to CSRF.
Also, a recommendation for request_order only makes sense as "GP" (on
both production and developement machine) and setting variables order
to "GPCS".
Furthermore, the comment in the ini file that request_order is in there
for performance reasons is just PLAIN WRONG and gives the impression
that setting it to "GPCS" or empty will just cost a little performance -
where it clearly allows for CSRF if people use $_REQUEST.
Regards,
Christian