How to install the PHP patch: first go to the root directory of the PHP5.4 source code; then run "patch -p0 < /path/to/patch.patch"; finally compile this patch version of PHP. Can.
Recommended: "PHP Video Tutorial"
Specific questions:
I need to install this patch in php code:
https://bugs.php.net/patch-display.php?bug_id=44522&patch=uploads_larger_than_2g_HEAD_v2&revision=latest
My php version: 5.4.10
Installation method:
Required Have the source and patch files before you can patch them. Very simple.
Go to the root directory of the php 5.4 source code
Run patch -p0
If an error is displayed, pass patch -R < /path/to/patch.patch Undo. And adjust the -p num value. Go to step 2. Here -p is the minimum prefix containing num leading slashes for each file name in the patch file. A sequence of one or more adjacent slashes is considered a single slash. This controls how file names in patch files are handled in case the file is saved in a different directory than the person who sent the patch. For example, assuming the filename in the patch file is
/u/howard/src/blurfl/blurfl.c
setting -p0 will not modify the entire filename, -p1 will give
u/howard/src/blurfl/blurfl.c
without the leading slash, -p4 will give Out
blurfl/blurfl.c
Not specifying -p at all will just give you blurfl.c. Whatever you end up using will look in the current directory or the directory specified by the -d option. The number after
-p can be determined by the following method. After
, you need to compile this patched version of php. Compilation instructions are included in the php source directory. To build it in unix, use the README.UNIX-BUILD-SYSTEM file; for windows, use the README.WIN32-BUILD-SYSTEM file.
The above is the detailed content of How to install php patch. For more information, please follow other related articles on the PHP Chinese website!