phpmanager icon indicating copy to clipboard operation
phpmanager copied to clipboard

php.ini modifications in PHP 7.2

Open arcticlinux opened this issue 6 years ago • 3 comments

What I'd really like is an option to stop doing any modification to php.ini unless I request it.

Some notes:

  1. adds cgi.fix_pathinfo=1

Relatively harmless, but cgi.fix_pathinfo=1 is already the default

; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://php.net/cgi.fix-pathinfo
;cgi.fix_pathinfo=1

2, extension dir

I would prefer this to be extension_dir = "ext" as per the default, so I don't have to keep changing it between php versions while maintaining my php.ini settings

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
; extension_dir = "ext"

3, Extension syntax in PHP 7.2 The extension syntax has changed in 7.2 so extension=php_curl.dll becomes extension=curl

I already have this enabled in my php.ini file in the new syntax, and registration goes and writes new config lines at the bottom of the file.

arcticlinux avatar May 03 '19 23:05 arcticlinux

The third one has been discussed in #30.

I will review the first and the second to see what changes I can make.

lextm avatar May 03 '19 23:05 lextm

They are relatively minor, I'd rather just have it not change anything, but still warn me as it does when I copy the version I have under source control on top and let me decide.

arcticlinux avatar May 04 '19 00:05 arcticlinux

The original code was written when PHP 5.x was the mainstream, so I consider your advice a chance to clean up the code base for PHP 7.x. There are also new options we might add to the list, but since I am not a daily PHP user, it takes a while for me to digest the documentation.

lextm avatar May 04 '19 05:05 lextm

Since the old syntax continues to work, close this issue right now. Will migrate if PHP stops supporting the old syntax.

lextm avatar Nov 20 '22 05:11 lextm

The extension syntax is still an issue, because if I use the new syntax, PHP Manager still adds the old syntax, and then PHP crashes. I have to manually remove the old syntax every time

strider72 avatar Nov 22 '22 20:11 strider72