|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-07-10 09:23 UTC] spam2 at rhsoft dot net
Description: ------------ it's nice that you can disable certificate-verification for file_get_contents stream_context_create() and pass the context as param BUT BECAUSE EVERY function in php supports the stream-wrappers this is completly inconsistent (https://bugs.php.net/bug.php?id=68344) and not useable in real life applications which may run as clone in testing environments you hardly want to place stream_context_create() all over your codebase and HONESTLY if 3rd party libraries are part of the game YOU CAN NOT DO that in many cases and so you NEED a GLOBAL configuration parameter to disable the verification via per-directory, php.ini or inside the application like if($config['debug_mode']) ini_set('peer_verification', 0); it's unbelieveable that after the 5.4 disaster changing the default charset with no global option and re-write and re-test some undret thousand LOC now ith 5.6 "default_charset" two major releases that fallout was fixed while in the same major release the major mistake was repeated with peer verification PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 16:00:02 2025 UTC |
It seems to me that there are two not necessarily related issues: a) the possibility to change default stream context options without touching application code b) the ability to disable peer certificate validation for extensions not regading default stream context options, respectively to make those extension regard the default stream context options I suggest to address these issues with separate tickets. a) might already be solvable by setting auto_prepend_file[1] appropriately. If that is not viable, a special ini setting might be in order, but I wouldn't make it PHP_INI_ALL for security reasons. [1] <http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file>