Skip to content

Commit

Permalink
Revert "2023.2 release code drop."
Browse files Browse the repository at this point in the history
This reverts commit 3e4436f.
  • Loading branch information
hjain-perforce committed Feb 7, 2024
1 parent 3e4436f commit e6b70f7
Show file tree
Hide file tree
Showing 13 changed files with 257 additions and 204 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Support](https://img.shields.io/badge/Support-Official-green.svg)](mailto:support@perforce.com)

# p4php7
P4PHP7 is a wrapper for the P4 C++ API in PHP.
# p4php
P4PHP is a wrapper for the P4 C++ API in PHP.
183 changes: 100 additions & 83 deletions RELNOTES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Release Notes for
P4PHP, Perforce's script API for PHP

Version 2023.2
Version 2020.2

Introduction

Expand All @@ -20,72 +20,99 @@ Introduction

--------------------------------------------------------------------------

Installation

Unix and Mac: Building the P4PHP Extension
Unix and Mac: Building the P4PHP Extension

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

Instructions for building are in the build.md file which can be found
here - https://github.com/perforce/p4php/blob/master/build.md

After you have obtained the required files and the phpize utility,
perform the following steps:

Windows: Building the P4PHP DLL
1. Download the Perforce P4PHP files.
ftp://ftp.perforce.com/perforce/r20.2/bin.tools/p4php.tgz
for the 2020.2 P4PHP.

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

--------------------------------------------------------------------------
Note: 32-bit builds of P4PHP require a 32-bit version of the
C++ API and a 32-bit version of PHP. 64-bit builds of
P4PHP require a 64-bit version of the C++ API and a
64-bit version of PHP.

Compatibility Statements
3. Extract both archives into an empty directory.

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

You can use any release of P4PHP with any release of the Perforce server
later than 2001.1 but it is recommended to use the 2023.2 release
phpize

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

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

OpenSSL compatibility
5. To test your P4PHP build, run the following command:

The minimum version of OpenSSL libraries required is driven by the
2023.2 server; the minimum version needed is 1.0.2. The latest 3.0.x or
1.1.1 patch is recommended.
make test

PHP compatibility
Note: the test harness requires a copy of the Perforce server
executable, p4d, be installed in the current working
directory.

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

Platform compatibility
make install

Though P4PHP is generally portable, this release is tested on the
following platforms:

Linux
Ubuntu 16.04, 18.04, 20.04, 22.04
CentOS/Rocky Linux 7, 8
Windows
Server 2016
Note: the installation typically needs to be performed as
the root user.

Compiler compatibility
7. To enable P4PHP, edit your "php.ini" file and add the following
line:

extension=perforce.so;

Note: to locate your "php.ini" file, run the following command:

php --ini

Now run:

php -m

to confirm that the P4PHP module is being loaded.

8. To verify that P4PHP works, run the following command:

php --ri perforce

If the extension is correctly installed, P4PHP displays
its version information.

SSL support
-----------

Perforce Server 2020.2 supports SSL connections and the C++ API has
been compiled with this support. This means that in order to build
P4PHP, the underlying PHP framework must include OpenSSL.

--------------------------------------------------------------------------

Windows: Building the P4PHP DLL

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

Attempting to use a different compiler or a different version of the
compiler causes linker errors due to differences in name handling.

--------------------------------------------------------------------------

Testing P4PHP

You can use the following small script to test P4PHP. Place it into a file
named "p4php_info.php":
You can use the following small script to test P4PHP. Place it
into a file named "p4php_info.php":

<?php
$p4 = new P4();
Expand Down Expand Up @@ -137,62 +164,52 @@ Testing P4PHP

--------------------------------------------------------------------------

Key to symbols used in change notes below.

* -- requires new P4PHP
** -- requires P4PHP built with new P4API
*** -- requires new p4d server program
Compatibility Statements

--------------------------------------------------------------------------
Server Compatibility

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

#2545331 (Job #119067) * **
This release of P4PHP is built against P4API 2023.2 (2023.2/2519561)
API Compatibility

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

New functionality in 2023.1 Patch 1 (2023.1/2541299) (2024/01/12)

(Job #118832) * **
This release is built against P4API (2023.1/2513900),
to address possible vulnerability: CVE-2023-5759.
OpenSSL compatibility

--------------------------------------------------------------------------
The minimum version of OpenSSL libraries required is driven
by the 2020.2 server; the minimum version needed is 1.0.2.

New functionality in 2023.1 (2023.1/2469314) (2023/07/26)
PHP compatibility

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

#2468224, #2460254 (Job #114508) * **
Added support for Windows builds for PHP 8.2
Platform compatibility

--------------------------------------------------------------------------
Though P4PHP is generally portable, this release is certified
only on the following platforms:

New functionality in 2022.2 Patch 2 (2022.2/2541286) (2024/01/12)

(Job #118832) * **
This release is built against P4API (2022.2/2531894),
to address possible vulnerability: CVE-2023-5759.
Linux 2.6 Intel (x86, x86_64)
Windows 10, 2016, 2019

--------------------------------------------------------------------------
Compiler compatibility

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

#2389314, #2388708 (Job #113738) * **
Added support for PHP 8.2

(Job #113737) * **
This release is built against latest P4API (2022.2/2407422), which
supports OpenSSL3
Attempting to use a different compiler or a different version
of the compiler causes linker errors due to differences in name
handling.

--------------------------------------------------------------------------

New functionality in 2022.2
Key to symbols used in change notes below.

#2371665 (Job #111053) * **
Added support for PHP 8.1
* -- requires new P4PHP
** -- requires P4PHP built with new P4API
*** -- requires new p4d server program

--------------------------------------------------------------------------

Expand Down Expand Up @@ -439,4 +456,4 @@ Bugs fixed in 2010.1

#237983 (Job #38074) *
Text output could be truncated if it contained null characters.
This change makes handling of text output binary-safe.
This change makes handling of text output binary-safe.
16 changes: 16 additions & 0 deletions Version
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# These values identify the release and patchlevel represented by these sources.

# RELEASE = year Nth special ;
# 'year' is the year of the release
# 'Nth' is which release of the year (1 2 3)
# 'special' is 'main' for mainline builds and 'beta' for beta builds.

# PATCHLEVEL = changeno ;
# Of the source.

# SUPPDATE = yyyy mm dd ;
# Of the build. The copyright date is derived from SUPPDATE.

RELEASE = 0 0 TEST ;
PATCHLEVEL = 0 ;
SUPPDATE = 0 0 0 ;
85 changes: 85 additions & 0 deletions build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
**Unix and Mac: Building the P4PHP Extension**

To build P4PHP, you need the header files and libraries used by
PHP and the "phpize" command-line utility. Both of these
requirements can be met by installing PHP from source or by
installing the development php packages (php-devel) appropriate
for your operating system.

After you have obtained the required files and the phpize utility,
perform the following steps:

1. Download the Perforce P4PHP files.
https://ftp.perforce.com/perforce/r23.1/bin.tools/p4php.tgz
for the 2023.1 P4PHP.

2. Download the Perforce C++ API from the Perforce FTP site at
"https://ftp.perforce.com/perforce". The API archive is located
in release and platform-specific subdirectories, choose one
matching OpenSSL version available at target system and the
C library, for example p4api-glibc2.12-openssl1.1.1.tgz.

Note: 32-bit builds of P4PHP require a 32-bit version of the
C++ API and a 32-bit version of PHP. 64-bit builds of
P4PHP require a 64-bit version of the C++ API and a
64-bit version of PHP.

3. Extract both archives into an empty directory.

4. To build P4PHP, change to the p4php-<version> directory, and run
the following commands:

phpize

./configure --with-perforce=<path to Perforce C++ API>

make

5. To test your P4PHP build, run the following command:

make test

Note: the test harness requires a copy of the Perforce server
executable, p4d, be installed in the current working
directory.

6. To install P4PHP, run the following command:

make install

Note: the installation typically needs to be performed as
the root user.

7. To enable P4PHP, edit your "php.ini" file and add the following
line:

extension=perforce.so;

Note: to locate your "php.ini" file, run the following command:

php --ini

Now run:

php -m

to confirm that the P4PHP module is being loaded.

8. To verify that P4PHP works, run the following command:

php --ri perforce

If the extension is correctly installed, P4PHP displays
its version information.

SSL support
-----------

Perforce Server 2023.1 supports SSL connections and the C++ API has
been compiled with this support. This means that in order to build
P4PHP, the underlying PHP framework must include OpenSSL.


**Windows: Building the P4PHP DLL**

For instructions how to build P4PHP on windows please contact support@perforce.com
1 change: 0 additions & 1 deletion config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if (PHP_PERFORCE != "no") {
CHECK_LIB("libsupp.lib", "perforce", PHP_PERFORCE) &&
CHECK_LIB("libeay32.lib", "perforce", PHP_PERFORCE) &&
CHECK_LIB("ssleay32.lib", "perforce", PHP_PERFORCE) &&
CHECK_LIB("Crypt32.lib", "perforce", PHP_PERFORCE) &&
//CHECK_LIB("advapi32.lib", "perforce") &&
//CHECK_LIB("oldnames.lib", "perforce") &&
//CHECK_LIB("kernel32.lib", "perforce") &&
Expand Down
2 changes: 1 addition & 1 deletion php_p4.cc
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ PHP_METHOD(P4, run)
cmdString << " " << Z_LVAL(args[i]);
break;
case IS_DOUBLE:
cmdString << " " << static_cast<P4INT64>(Z_DVAL(args[i]));
cmdString << " " << Z_DVAL(args[i]);
break;
case IS_TRUE:
cmdString << " " << "TRUE";
Expand Down
Loading

0 comments on commit e6b70f7

Please sign in to comment.