Skip to content

Commit e6b70f7

Browse files
Revert "2023.2 release code drop."
This reverts commit 3e4436f.
1 parent 3e4436f commit e6b70f7

13 files changed

Lines changed: 257 additions & 204 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[![Support](https://img.shields.io/badge/Support-Official-green.svg)](mailto:support@perforce.com)
22

3-
# p4php7
4-
P4PHP7 is a wrapper for the P4 C++ API in PHP.
3+
# p4php
4+
P4PHP is a wrapper for the P4 C++ API in PHP.

RELNOTES.txt

Lines changed: 100 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Release Notes for
22
P4PHP, Perforce's script API for PHP
33

4-
Version 2023.2
4+
Version 2020.2
55

66
Introduction
77

@@ -20,72 +20,99 @@ Introduction
2020

2121
--------------------------------------------------------------------------
2222

23-
Installation
24-
25-
Unix and Mac: Building the P4PHP Extension
23+
Unix and Mac: Building the P4PHP Extension
2624

27-
The official version of P4Python exists as source on:
28-
https://github.com/perforce/p4php
25+
To build P4PHP, you need the header files and libraries used by
26+
PHP and the "phpize" command-line utility. Both of these
27+
requirements can be met by installing PHP from source or by
28+
installing the development php packages (php-devel) appropriate
29+
for your operating system.
2930

30-
Instructions for building are in the build.md file which can be found
31-
here - https://github.com/perforce/p4php/blob/master/build.md
32-
31+
After you have obtained the required files and the phpize utility,
32+
perform the following steps:
3333

34-
Windows: Building the P4PHP DLL
34+
1. Download the Perforce P4PHP files.
35+
ftp://ftp.perforce.com/perforce/r20.2/bin.tools/p4php.tgz
36+
for the 2020.2 P4PHP.
3537

36-
For instructions how to build P4PHP on windows please contact
37-
support@perforce.com
38+
2. Download the Perforce C++ API from the Perforce FTP site at
39+
"ftp://ftp.perforce.com/perforce". The API archive is located
40+
in release and platform-specific subdirectories, choose one
41+
matching OpenSSL version available at target system and the
42+
C library, for example p4api-glibc2.12-openssl1.1.1.tgz.
3843

39-
--------------------------------------------------------------------------
44+
Note: 32-bit builds of P4PHP require a 32-bit version of the
45+
C++ API and a 32-bit version of PHP. 64-bit builds of
46+
P4PHP require a 64-bit version of the C++ API and a
47+
64-bit version of PHP.
4048

41-
Compatibility Statements
49+
3. Extract both archives into an empty directory.
4250

43-
Server Compatibility
51+
4. To build P4PHP, change to the p4php-<version> directory, and run
52+
the following commands:
4453

45-
You can use any release of P4PHP with any release of the Perforce server
46-
later than 2001.1 but it is recommended to use the 2023.2 release
54+
phpize
4755

48-
API Compatibility
56+
./configure --with-perforce=<path to Perforce C++ API>
4957

50-
This release of P4PHP requires the 2023.2 (2023.2/2519561) Perforce API.
51-
Older releases will not work and will fail to compile.
58+
make
5259

53-
OpenSSL compatibility
60+
5. To test your P4PHP build, run the following command:
5461

55-
The minimum version of OpenSSL libraries required is driven by the
56-
2023.2 server; the minimum version needed is 1.0.2. The latest 3.0.x or
57-
1.1.1 patch is recommended.
62+
make test
5863

59-
PHP compatibility
64+
Note: the test harness requires a copy of the Perforce server
65+
executable, p4d, be installed in the current working
66+
directory.
6067

61-
This release of P4PHP is compatible with PHP versions: 7.2.x - 8.2.x
68+
6. To install P4PHP, run the following command:
6269

63-
Platform compatibility
70+
make install
6471

65-
Though P4PHP is generally portable, this release is tested on the
66-
following platforms:
67-
68-
Linux
69-
Ubuntu 16.04, 18.04, 20.04, 22.04
70-
CentOS/Rocky Linux 7, 8
71-
Windows
72-
Server 2016
72+
Note: the installation typically needs to be performed as
73+
the root user.
7374

74-
Compiler compatibility
75+
7. To enable P4PHP, edit your "php.ini" file and add the following
76+
line:
77+
78+
extension=perforce.so;
79+
80+
Note: to locate your "php.ini" file, run the following command:
81+
82+
php --ini
83+
84+
Now run:
85+
86+
php -m
87+
88+
to confirm that the P4PHP module is being loaded.
89+
90+
8. To verify that P4PHP works, run the following command:
91+
92+
php --ri perforce
93+
94+
If the extension is correctly installed, P4PHP displays
95+
its version information.
96+
97+
SSL support
98+
-----------
99+
100+
Perforce Server 2020.2 supports SSL connections and the C++ API has
101+
been compiled with this support. This means that in order to build
102+
P4PHP, the underlying PHP framework must include OpenSSL.
103+
104+
--------------------------------------------------------------------------
105+
106+
Windows: Building the P4PHP DLL
75107

76-
To build P4PHP from source, you must use a version of PHP that has been
77-
compiled with the same compiler used to build the Perforce C++ API. For
78-
most platforms, use gcc/g++.
108+
For instructions how to build P4PHP on windows please contact support@perforce.com
79109

80-
Attempting to use a different compiler or a different version of the
81-
compiler causes linker errors due to differences in name handling.
82-
83110
--------------------------------------------------------------------------
84111

85112
Testing P4PHP
86113

87-
You can use the following small script to test P4PHP. Place it into a file
88-
named "p4php_info.php":
114+
You can use the following small script to test P4PHP. Place it
115+
into a file named "p4php_info.php":
89116

90117
<?php
91118
$p4 = new P4();
@@ -137,62 +164,52 @@ Testing P4PHP
137164

138165
--------------------------------------------------------------------------
139166

140-
Key to symbols used in change notes below.
141-
142-
* -- requires new P4PHP
143-
** -- requires P4PHP built with new P4API
144-
*** -- requires new p4d server program
167+
Compatibility Statements
145168

146-
--------------------------------------------------------------------------
169+
Server Compatibility
147170

148-
New functionality in 2023.2 (2023.2/2552260) (2024/02/06)
171+
You can use any release of P4PHP with any release of the
172+
Perforce server later than 2001.1
149173

150-
#2545331 (Job #119067) * **
151-
This release of P4PHP is built against P4API 2023.2 (2023.2/2519561)
174+
API Compatibility
152175

153-
--------------------------------------------------------------------------
176+
The 2020.2 release of P4PHP requires the 2020.2 Perforce API.
177+
Older releases will not work and will fail to compile.
154178

155-
New functionality in 2023.1 Patch 1 (2023.1/2541299) (2024/01/12)
156-
157-
(Job #118832) * **
158-
This release is built against P4API (2023.1/2513900),
159-
to address possible vulnerability: CVE-2023-5759.
179+
OpenSSL compatibility
160180

161-
--------------------------------------------------------------------------
181+
The minimum version of OpenSSL libraries required is driven
182+
by the 2020.2 server; the minimum version needed is 1.0.2.
162183

163-
New functionality in 2023.1 (2023.1/2469314) (2023/07/26)
184+
PHP compatibility
164185

165-
#2457062 (Job #116145) * **
166-
This release is built against latest P4API (2023.1/2442900)
186+
The 2020.2 release of P4PHP is compatible with PHP versions: 7.2.x - 8.0.x
167187

168-
#2468224, #2460254 (Job #114508) * **
169-
Added support for Windows builds for PHP 8.2
188+
Platform compatibility
170189

171-
--------------------------------------------------------------------------
190+
Though P4PHP is generally portable, this release is certified
191+
only on the following platforms:
172192

173-
New functionality in 2022.2 Patch 2 (2022.2/2541286) (2024/01/12)
174-
175-
(Job #118832) * **
176-
This release is built against P4API (2022.2/2531894),
177-
to address possible vulnerability: CVE-2023-5759.
193+
Linux 2.6 Intel (x86, x86_64)
194+
Windows 10, 2016, 2019
178195

179-
--------------------------------------------------------------------------
196+
Compiler compatibility
180197

181-
New functionality in 2022.2 Patch 1
198+
To build P4PHP from source, you must use a version of PHP that
199+
has been compiled with the same compiler used to build the
200+
Perforce C++ API. For most platforms, use gcc/g++.
182201

183-
#2389314, #2388708 (Job #113738) * **
184-
Added support for PHP 8.2
185-
186-
(Job #113737) * **
187-
This release is built against latest P4API (2022.2/2407422), which
188-
supports OpenSSL3
202+
Attempting to use a different compiler or a different version
203+
of the compiler causes linker errors due to differences in name
204+
handling.
189205

190206
--------------------------------------------------------------------------
191207

192-
New functionality in 2022.2
208+
Key to symbols used in change notes below.
193209

194-
#2371665 (Job #111053) * **
195-
Added support for PHP 8.1
210+
* -- requires new P4PHP
211+
** -- requires P4PHP built with new P4API
212+
*** -- requires new p4d server program
196213

197214
--------------------------------------------------------------------------
198215

@@ -439,4 +456,4 @@ Bugs fixed in 2010.1
439456

440457
#237983 (Job #38074) *
441458
Text output could be truncated if it contained null characters.
442-
This change makes handling of text output binary-safe.
459+
This change makes handling of text output binary-safe.

Version

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# These values identify the release and patchlevel represented by these sources.
2+
3+
# RELEASE = year Nth special ;
4+
# 'year' is the year of the release
5+
# 'Nth' is which release of the year (1 2 3)
6+
# 'special' is 'main' for mainline builds and 'beta' for beta builds.
7+
8+
# PATCHLEVEL = changeno ;
9+
# Of the source.
10+
11+
# SUPPDATE = yyyy mm dd ;
12+
# Of the build. The copyright date is derived from SUPPDATE.
13+
14+
RELEASE = 0 0 TEST ;
15+
PATCHLEVEL = 0 ;
16+
SUPPDATE = 0 0 0 ;

build.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
**Unix and Mac: Building the P4PHP Extension**
2+
3+
To build P4PHP, you need the header files and libraries used by
4+
PHP and the "phpize" command-line utility. Both of these
5+
requirements can be met by installing PHP from source or by
6+
installing the development php packages (php-devel) appropriate
7+
for your operating system.
8+
9+
After you have obtained the required files and the phpize utility,
10+
perform the following steps:
11+
12+
1. Download the Perforce P4PHP files.
13+
https://ftp.perforce.com/perforce/r23.1/bin.tools/p4php.tgz
14+
for the 2023.1 P4PHP.
15+
16+
2. Download the Perforce C++ API from the Perforce FTP site at
17+
"https://ftp.perforce.com/perforce". The API archive is located
18+
in release and platform-specific subdirectories, choose one
19+
matching OpenSSL version available at target system and the
20+
C library, for example p4api-glibc2.12-openssl1.1.1.tgz.
21+
22+
Note: 32-bit builds of P4PHP require a 32-bit version of the
23+
C++ API and a 32-bit version of PHP. 64-bit builds of
24+
P4PHP require a 64-bit version of the C++ API and a
25+
64-bit version of PHP.
26+
27+
3. Extract both archives into an empty directory.
28+
29+
4. To build P4PHP, change to the p4php-<version> directory, and run
30+
the following commands:
31+
32+
phpize
33+
34+
./configure --with-perforce=<path to Perforce C++ API>
35+
36+
make
37+
38+
5. To test your P4PHP build, run the following command:
39+
40+
make test
41+
42+
Note: the test harness requires a copy of the Perforce server
43+
executable, p4d, be installed in the current working
44+
directory.
45+
46+
6. To install P4PHP, run the following command:
47+
48+
make install
49+
50+
Note: the installation typically needs to be performed as
51+
the root user.
52+
53+
7. To enable P4PHP, edit your "php.ini" file and add the following
54+
line:
55+
56+
extension=perforce.so;
57+
58+
Note: to locate your "php.ini" file, run the following command:
59+
60+
php --ini
61+
62+
Now run:
63+
64+
php -m
65+
66+
to confirm that the P4PHP module is being loaded.
67+
68+
8. To verify that P4PHP works, run the following command:
69+
70+
php --ri perforce
71+
72+
If the extension is correctly installed, P4PHP displays
73+
its version information.
74+
75+
SSL support
76+
-----------
77+
78+
Perforce Server 2023.1 supports SSL connections and the C++ API has
79+
been compiled with this support. This means that in order to build
80+
P4PHP, the underlying PHP framework must include OpenSSL.
81+
82+
83+
**Windows: Building the P4PHP DLL**
84+
85+
For instructions how to build P4PHP on windows please contact support@perforce.com

config.w32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ if (PHP_PERFORCE != "no") {
1313
CHECK_LIB("libsupp.lib", "perforce", PHP_PERFORCE) &&
1414
CHECK_LIB("libeay32.lib", "perforce", PHP_PERFORCE) &&
1515
CHECK_LIB("ssleay32.lib", "perforce", PHP_PERFORCE) &&
16-
CHECK_LIB("Crypt32.lib", "perforce", PHP_PERFORCE) &&
1716
//CHECK_LIB("advapi32.lib", "perforce") &&
1817
//CHECK_LIB("oldnames.lib", "perforce") &&
1918
//CHECK_LIB("kernel32.lib", "perforce") &&

php_p4.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ PHP_METHOD(P4, run)
634634
cmdString << " " << Z_LVAL(args[i]);
635635
break;
636636
case IS_DOUBLE:
637-
cmdString << " " << static_cast<P4INT64>(Z_DVAL(args[i]));
637+
cmdString << " " << Z_DVAL(args[i]);
638638
break;
639639
case IS_TRUE:
640640
cmdString << " " << "TRUE";

0 commit comments

Comments
 (0)