Home > Backend Development > PHP Problem > How to install php patch

How to install php patch

藏色散人
Release: 2023-03-07 12:00:01
Original
3408 people have browsed it

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.

How to install php patch

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
Copy after login

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
Copy after login

setting -p0 will not modify the entire filename, -p1 will give

u/howard/src/blurfl/blurfl.c
Copy after login

without the leading slash, -p4 will give Out

blurfl/blurfl.c
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template