Repository navigation
Conversation
Girgias
left a comment
There was a problem hiding this comment.
I'm not sure all the cosmetic changes make sense.
| ; Set to 1 if running under IIS. Default is zero. | ||
| ; https://php.net/fastcgi.impersonate | ||
| ;fastcgi.impersonate = 1 | ||
| ;fastcgi.impersonate = "1" |
There was a problem hiding this comment.
Is this a boolean INI setting or not? If not it may make sense to convert it to one.
There was a problem hiding this comment.
According to the documentation this is string. Once it becomes bool I will fix this in the future PR.
There was a problem hiding this comment.
The documentation, especially for INI settings, is not the source of truth. The source code is.
There was a problem hiding this comment.
OK, thanks for the input. I'm gonna look up all of the directives inside the source code.
|
|
||
| ;;;;;;;;;;;;;;;;;;;;;; | ||
| ; Dynamic Extensions ; | ||
| ; dynamic extensions ; |
There was a problem hiding this comment.
I don't get these changes, this is using Title Case for "section" titles, which seems adequate?
There was a problem hiding this comment.
Yeah, I get the point. However in the curent master there is:
- ; About this file ; (First letter of the first word is uppercase)
- ; Quick Reference ; (First letter of each word is uppercase)
- ; php.ini Options ; (First letter of the second word is uppercase – yes, I know php.ini is a file name)
What's the right convention then?
| ;;;;;;;;;;;;;;;;;;; | ||
|
|
||
| [CLI Server] | ||
| [cli server] |
There was a problem hiding this comment.
Ditto, these are "section" titles
There was a problem hiding this comment.
Again, in the current master we've got:
[intl]
[filter]
[mail function] – all lowercase
[Session] – first letter uppercase
[ODBC] – all caps
[MySQLi] but [mysqlnd]
[Pcre]
[bcmath]
Isn't it much simpler to go with lowercase all the way?
There was a problem hiding this comment.
These are extension names so these are proper nouns. Having said that, some of them look incorrect.
- https://www.pcre.org/ should be PCRE
- https://www.php.net/manual/en/book.bc.php & https://github.com/php/php-src/blob/master/ext/bcmath/CREDITS should be BC Math
- filter should probably be Filter https://www.php.net/manual/en/book.filter.php
| ; Maximum number of links (persistent + non-persistent). -1 means no limit. | ||
| ; Maximum number of links (persistent + non-persistent). -1 means no limit. |
There was a problem hiding this comment.
Double space after a FULL STOP is a convention for English, it is not mandatory but I'm not sure I see the problem with it.
There was a problem hiding this comment.
In the php.ini of the current master there are 169 situations where one sentence is followed by another one in the same line. In 44 cases they are separated by double space, in other 125 cases single space is used. Which is why I went for single space.
There was a problem hiding this comment.
I don't know if this is worth standardizing. A lot of people (especially older generations) prefer double spaces. You're just going to start a debate on which way is more correct.
| ;mysqli.allow_local_infile = On | ||
| ;mysqli.allow_local_infile = 1 |
There was a problem hiding this comment.
Does this have more options than On/Off?
There was a problem hiding this comment.
Ditto, documentation is not the source of truth.
| mysqli.allow_persistent = On | ||
| mysqli.allow_persistent = 1 |
| ; Detect broken persistent links always with pg_pconnect(). | ||
| ; Auto reset feature requires a little overheads. | ||
| ; https://php.net/pgsql.auto-reset-persistent | ||
| pgsql.auto_reset_persistent = Off |
| ; Log PostgreSQL backends Notice message or not. | ||
| ; Unless pgsql.ignore_notice=0, module cannot log notice message. | ||
| ; Unless pgsql.ignore_notice = 0, module cannot log notice message. | ||
| ; https://php.net/pgsql.log-notice | ||
| pgsql.log_notice = 0 |
|
I tried something similar few years ago in #7643 but was not successful. I still think a cleanup is due on these files but I don't like the changes in this particular PR. |
Yeah, these things are difficult to standarize as – for instance – half of the people prefer double space between sentences and the other half – single space. But the current situation is that there are multiple conventions used inside a single file, which I belive is even worse than having a bad standarization. |
|
I would recommend splitting this into several PRs. There are several changes here that I would welcome but many that I disagree with. It would also be easier to review. For example, "equals signs are surrounded by spaces," could be a PR on its own. |
|
I went through all all of the directives in the source code to check their data types. One thing I noticed is that I couldn't find declarations of the following ones:
Are they still part of PHP? |
STD_PHP_INI_ENTRY("session.trans_sid_tags", "a=href,area=href,frame=src,form=", PHP_INI_ALL, OnUpdateSessionTags, url_adapt_session_ex, php_basic_globals, basic_globals)
STD_PHP_INI_ENTRY("session.trans_sid_hosts", "", PHP_INI_ALL, OnUpdateSessionHosts, url_adapt_session_hosts_ht, php_basic_globals, basic_globals)
STD_PHP_INI_ENTRY("url_rewriter.tags", "form=", PHP_INI_ALL, OnUpdateOutputTags, url_adapt_session_ex, php_basic_globals, basic_globals)
STD_PHP_INI_ENTRY("url_rewriter.hosts", "", PHP_INI_ALL, OnUpdateOutputHosts, url_adapt_session_hosts_ht, php_basic_globals, basic_globals)I believe the two firsts are deprecated tough.. |
|
OK, so I'm gonna take step-by-step approach in tidying up php.ini, As @kamil-tekiela suggested. Therefore I'm closing this one. |
This PR fixes #17266. It does some cosmetic changes to php.ini file (dev and prod). Currently inside php.ini there are lot of inconsistencies. This is an attempt to fix those. Main changes are:
SMTPinside mail function is nowsmtp),url_rewriter.hosts = ""),On/Off,[]and;;are written in all-lowercase convention,