PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used Open
Source general-purpose scripting language that is especially suited for
Web development and can be embedded into HTML. Its syntax draws upon C,
Java, and Perl, and is easy to learn. The main goal of the language is to
allow web developers to write dynamically generated webpages quickly, but
you can do much more with PHP.
===> The following configuration options are available for php80-8.0.30:
CLI=on: Build CLI version
CGI=on: Build CGI version
FPM=on: Build FPM version
EMBED=on: Build embedded library
PHPDBG=off: Interactive PHP debugger
DEBUG=off: Build with debugging support
DTRACE=on: Build with DTrace probes
IPV6=on: IPv6 protocol support
MYSQLND=on: Build with MySQL Native Driver
LINKTHR=on: Link thread lib (for threaded extensions)
ZTS=off: Force Zend Thread Safety (ZTS) build
===> Use 'make config' to modify these settings
Reason:
The default version of PHP has been switched from 8.0 to 8.1.
If you use binary packages you should make a list of php packages
before running 'pkg upgrade':
# pkg info \*php80\* > ~/installed-php-ports-list
After the upgrade, check with such list if all your php extensions
are still installed, and reinstall them if needed.
If you use mod_php80 you need to deinstall it and install mod_php81.
Port Moves
port moved to lang/php81 on 2023-12-31 REASON: Has expired: Security support ended on 2023-11-26
port moved here from lang/php74 on 2022-12-25 REASON: Has expired: Security support ended on 2022-11-22
*/php80*: Refactor codes
- Switch to system pcre2
- Remove no longer required CONFIGURE_ARGS
- Remove unnecessary patch from archivers/php80-phar
- Remove unnecessary patch from converters/php80-mbstring
- Add support for bdb:18 in databases/php80-dba
- Remove unnecessary introduction of configure flags in
databases/php80-odbc
- Remove unnecessary patch from devel/php80-readline
- Remove NOOP post-patch target from ftp/php80-ftp
- Remove unnecessary patch and NOOP OPTIONS TRUETYPE from
graphics/php80-gd
- Remove unnecessary patch from mail/php80-imap and remove the OPTION
for using CCLIENT as this has been marked DEPRECATED since there has
been no release in last 16 years
- Remove unnecessary patch from sysutils/php80-fileinfo
- Remove unnecessary patch from textproc/php80-simplexml
- Refactor patches for post-patch target in textproc/php80-enchant and
switch to enchant2 for dependencies
- Refactor patches for post-patch target in textproc/php80-xsl
lang/php80: Fix build with openssl3
This fix some additional errors on OSVERSION 1400093.
Approved by: portmgr (blanket)
Sponsored by: The FreeBSD Foundation
*/*: Fix typos on OPENSSL3 build fixes
On my previous OpenSSL 3 fixes there was an accidental typo. This commit
fixes all those typos.
Approved by: portmgr (blanket)
lang/php80: Mark IGNORE_SSL for 14
This was marked IGNORE_SSL for OpenSSL 3 and later in an earlier commit
as there is no upstream support for OpenSSL 3 however that was reverted
as it got delayed in merging the OpenSSL in the base. As we have a
proper OSVERSION now this patch fixes the OSVERSION logic.
Sponsored by: Bounce Experts
Sponsored by: The FreeBSD Foundation
lang/php80: Fix build with llvm16
It will take more time to merge OpenSSL 3 in the base so allow this to
build with llvm16 for now.
Sponsored by: The FreeBSD Foundation
lang/php80: Mark IGNORE_SSL for base
Considering that OpenSSL 3.0.9 will be merged at OSVERSION 1400089 mark
IGNORE_SSL for base ssl version. In case this happens later we will fix
the OSVERSION.
PR: 271656
Sponsored by: Bounce Experts
lang/php80: Mark IGNORE with openssl30 and later
php80 will not receive support for OpenSSL 3.0 or later from upstream.
Those who needs OpenSSL 3.0 or later and php should consider migrating
to lang/php81 or later.
Sponsored by: Bounce Experts
lang/php80: Mark DEPRECATED
- Upstream support ends on 2023-11-26. See for more details:
https://www.php.net/supported-versions.php
- Set EXPIRATION_DATE on 2023-12-31
- Use USES=localbase whenever possible
- Refactor old php74 codebase
Sponsored by: Bounce Experts
Mk/**ldap.mk: Convert USE_LDAP to USES=ldap
Convert the USE_LDAP=yes to USES=ldap and adds the following features:
- Adds the argument USES=ldap:server to add openldap2{4|5|6}-server as
RUN_DEPENDS
- Adds the argument USES=ldap<version> and replaces WANT_OPENLDAP_VER
- Adds OPENLDAP versions in bsd.default-versions.mk
- Adds USE_OPENLDAP/WANT_OPENLDAP_VER in Mk/bsd.sanity.mk
- Changes consumers to use the features
Reviewed by: delphij
Approved by: portmgr
Differential Revision: https://reviews.freebsd.org/D38233
www/mod_php8*: Fix build
USES=apache must be called before bsd.pre.port.mk however this was
overridden using an include clause. During my previous commit on
refactoring apache.mk these include blocks were deleted which causes
failure to the build of these port as USES=apache in preport.mk is never
called. This commit changes and refactors the code.
Fixes: 40843b1 Mk/Uses/apache.mk: Refactor after removal of older versions
Mk/Uses/apache.mk: Refactor after removal of older versions
apache22 and apache25 had been removed a long time ago however the
apache.mk file has never been refactored and is out of sync from the
file Mk/bsd.default-versions.mk. These changes refactors the removals of
the older versions. In addition:
- Move some keywords like USE_APACHE, USE_APACHE_BUILD, USE_APACHE_RUN
from SANITY_DEPRECATED to SANITY_UNSUPPORTED
- Remove apache versions from ports Makefiles as currently there is only
one available version in the tree. However the version checks are
still valid and should work flawlessly whenever a new version is
added. For example USES=apache:2.2+ are simply replaced with
USES=apache. As currently there are no other versions available for
test this could not be checked on it's own ground.
- Update FOO_USE=APACHE=yes to FOO_USES=apache
- Remove trailing whitespaces
Approved by: portmgr
Differential Revision: https://reviews.freebsd.org/D38113
lang/php80: Update version 8.0.24=>8.0.25
* GD:
- Fixed bug #81739: OOB read due to insufficient input validation in
imageloadfont(). (CVE-2022-31630)
* Hash:
- Fixed bug #81738: buffer overflow in hash_update() on long parameter
(CVE-2022-37454)
* Session:
- Fixed bug GH-9583 (session_create_id() fails with user defined save
handler that doesn't have a validateId() method).
* Streams:
- Fixed bug GH-9590 (stream_select does not abort upon exception or
empty valid fd set).
Approved by: tz (By private mail)
MFH: 2022Q4
Relnotes: https://www.php.net/ChangeLog-8.php#8.0.25
Sponsored by: Bounce Experts
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
lang/php80: Update version 8.0.20=>8.0.22
- STRIP Binaries [1]
CLI:
- Fixed potential overflow for the builtin server via the
PHP_CLI_SERVER_WORKERS environment variable.
Core:
- Fixed bug GH-8923 (error_log on Windows can hold the file write lock).
- Fixed bug GH-8995 (WeakMap object reference offset causing TypeError).
Date:
- Fixed bug #80047 (DatePeriod doesn't warn with custom
DateTimeImmutable).
DBA:
- Fixed LMDB driver hanging when attempting to delete a non-existing
(Only the first 15 lines of the commit message are shown above )
lang/php80: Update version 8.0.18=>8.0.19
* Core:
Fixed bug #8289 (Exceptions thrown within a yielded from iterator are
not rethrown into the generator).
* Date:
Fixed bug #7979 (DatePeriod iterator advances when checking if valid).
* FFI:
Fixed bug #8433 (Assigning function pointers to structs in FFI leaks).
* FPM:
Fixed bug #76003 (FPM /status reports wrong number of active processe)
Fixed bug #77023 (FPM cannot shutdown processes).
Fixed comment in kqueue remove callback log message.
* Iconv:
Fixed bug #8218 (ob_end_clean does not reset Content-Encoding header).
(Only the first 15 lines of the commit message are shown above )
textproc/libxml2: bump all LIB_DEPENDS consumers
This is a separate commit to facilitate easier cherry-picking for
quarterly.
PR: 262853, 262940, 262877, 263126
Approved by: fluffy (mentor)
textproc/libxml2: bump all dependencies
This should make sure that all dependent ports will pick
up the new version commited with a13ec21cd733f67a9fc0dc00ab45268bdc236246
pcre: fix runtime issues on powerpc
In sljitConfigInternal.h, pcre checks for existence of __builtin___clear_cache()
function.
LLVM provides that function for all platforms, even those that don't have
implemented flushing the cache.
This leads to runtime errors on e.g. powerpc (32-bit) with __clear_cache()
calling compilerrt_abort(), resulting in SIGABRT.
lang/php80: Update version 8.0.15=>8.0.16
Core:
Fixed bug #81430 (Attribute instantiation leaves dangling pointer).
Fixed bug #7896 (Environment vars may be mangled on Windows).
FFI:
Fixed bug #7867 (FFI::cast() from pointer to array is broken).
Filter:
Fix #81708: UAF due to php_filter_float() failing for ints.
FPM:
Fixed memory leak on invalid port.
MBString:
Fixed bug #7902 (mb_send_mail may delimit headers with LF only).
MySQLnd:
Fixed bug #7972 (MariaDB version prefix 5.5.5- is not stripped).
Sockets:
Fixed ext/sockets build on Haiku.
Fixed bug #7978 (sockets extension compilation errors).
Standard:
Fixed bug #7875 (mails are sent even if failure to log throws exception).
Approved by: tz (private email)
Sponsored by: Bounce Experts
lang/php8[01]: Unbreak with libressl*
lang/php8[01] builds fine with libressl*. Reverting previous partial
commit. Although it takes minor tweaking on unsetting TLS_SRP on
ftp/curl.
PR: 261903
Reported by: vishwin rozhuk.im@gmail.com
Approved by: tz (private email)
Sponsored by: Bounce Experts
lang/php8[01]: Make openssl as DEFAULT
After the 91fdbed776033fd4b210135429a171ab5fed549b commit fixing the
issue for MySQL80 introduced another problem for the ports that depends
on php8[01]-openssl port couldn't be built as the fix prevented
php8[01]-openssl from being installed as it's already built with
default php installation. As the problem has grown much bigger now and
php80 is currently the DEFAULT php version so we are switching the
behavior of php8[01] ports making the openssl module as default.
- Remove non-default OPTION MYSQL80 from lang/php8[01]
- Remove ports security/php8[01]-openssl
- Remove OPTION OPENSSL from lang/php8[01]-extensions
- Mark lang/php8[01] to IGNORE with libressl and libressl-devel
Although php builds fine with those most of the extensions do not
(Only the first 15 lines of the commit message are shown above )
lang/php??: make CONFLICTS_INSTALL visible to PHP module ports
The definition of CONFLICTS_INSTALL already included ${PKGNAMESUFFIX},
but in a block that was conditional on ${PKGNAMESUFFIX} not being
defined, defying the purpose.
After this change all ports that refer to the lang/php?? interpreter
ports get an automatic CONFLICTS_INSTALL definition that prevents the
installation of the same module for multiple interpreter versions.
This change adds correct CONFLICTS_INSTALL definitions to hundreds of
PHP ports that previously lacked any such definition.
PHP modules can override this generated CONFLICTS_INSTALL definition
in their Makefiles, if required.
Approved by: portmgr (implicit)
lang/php80: Update from 8.0.14 to 8.0.15
Core:
Fixed bug #81656 (GCC-11 silently ignores -R).
Fixed bug #81585 (cached_chunks are not counted to real_size on
shutdown).
Filter:
Fixed FILTER_FLAG_NO_RES_RANGE flag.
Hash:
Fixed bug #7759 (Incorrect return types for hash() and hash_hmac()).
Fixed bug #7826 (Inconsistent argument name in hash_hmac_file and
hash_file).
MySQLnd:
Fixed bug where large bigints may be truncated.
OCI8:
Fixed bug #7765 (php_oci_cleanup_global_handles segfaults at second
call).
OPcache:
Fixed bug #81679 (Tracing JIT crashes on reattaching).
PDO_PGSQL:
Fixed error message allocation of PDO PgSQL.
Sockets:
Avoid void* arithmetic in sockets/multicast.c on NetBSD.
Spl:
Fixed bug #75917 (SplFileObject::seek broken with CSV flags).
Sponsored by: Bounce Experts
lang/php80: Update version 8.0.13=>8.0.14
- Refactor with OPTIONSNG
Changelog:
Core:
Fixed bug #81582 (Stringable not implicitly declared if __toString()
came from a trait).
Fixed bug #81591 (Fatal Error not properly logged in particular
cases).
Fixed bug #81626 (Error on use static:: in __сallStatic() wrapped to
Closure::fromCallable()).
Fixed bug #81631 (::class with dynamic class name may yield wrong
line number).
(Only the first 15 lines of the commit message are shown above )
Fix fetch for php*
- Primary hosting provider of php has introduced some sort of checking
which is blocking fetch although curl/wget works perfectly. fetch with
other --user-agent is also not working at the moment. An issue has been
opened with the upstream which can be found at:
https://github.com/php/web-php/issues/483
- Untill this is fixed add php Github distributions URL to MASTER_SITES
- Modify MASTER_SITES for php[73|74|80] and remove SUBDIR as it affects
DIST_SUBDIR
- Add DIST_SUBDIR as Github is IPv4 only which affects IPv6 only
builders. In case someone is running IPv6 only builders distcache will
pickup and serve.
- Although distinfo has been updated as we have added DIST_SUBDIR but
SHA256 and SIZE are unchanged. In case someone needs to verify those
are available from https://www.php.net/downloads
- We might have done some drastic changes but we are on the brink of
quarterly build and we do not want to start a new year and a new
quarter with BROKEN php and thousands of other ports.
PR: 260699
Reported by: chris@cretaforce.gr
Approved by: portmgr (blanket infrastructure)
Sponsored by: Bounce Experts
*/*: Remove redundant '-*' from CONFLICTS definitions
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Approved by: portmgr (blanket)
lang/php80: Upgrade from 8.0.12 to 8.0.13
Core:
Fixed bug #81518 (Header injection via default_mimetype /
default_charset).
Date:
Fixed bug #81500 (Interval serialization regression since 7.3.14 /
7.4.2).
DBA:
Fixed bug #81588 (TokyoCabinet driver leaks memory).
MBString:
Fixed bug #76167 (mbstring may use pointer from some previous request).
Opcache:
Fixed bug #81512 (Unexpected behavior with arrays and JIT).
PCRE:
Fixed bug #81424 (PCRE2 10.35 JIT performance regression).
XML:
Fixed bug #79971 (special character is breaking the path in xml
function). (CVE-2021-21707)
XMLReader:
Fixed bug #81521 (XMLReader::getParserProperty may throw with a valid
property).
Also include a patch to fix issue 259725:
dns_get_record fails when requested record doesn't exist
PR: 259725
Reported by: fsbruva@yahoo.com
Sponsored by: Bounce Experts
lang/php80: Upgrade from 8.0.11 to 8.0.12
Changelog:
CLI:
Fixed bug #81496 (Server logs incorrect request method).
Core:
Fixed bug #81435 (Observer current_observed_frame may point to an old
(overwritten) frame).
Fixed bug #81380 (Observer may not be initialized properly).
DOM:
Fixed bug #81433 (DOMElement::setIdAttribute() called twice may remove
ID).
FFI:
Fixed bug #79576 ("TYPE *" shows unhelpful message when type is not
defined).
FPM:
Fixed bug #81026 (PHP-FPM oob R/W in root process leading to privilege
escalation) (CVE-2021-21703).
(Only the first 15 lines of the commit message are shown above )
lang/php80: Update from 8.0.8 to 8.0.9
Changelog:
Core:
Fixed bug #81145 (copy() and stream_copy_to_stream() fail for +4GB
files).
Fixed bug #81163 (incorrect handling of indirect vars in __sleep).
Fixed bug #81159 (Object to int warning when using an object as a string
offset).
Fixed bug #80728 (PHP built-in web server resets timeout when it can
kill the process).
Fixed bug #73630 (Built-in Weberver - overwrite
$_SERVER['request_uri']).
Fixed bug #80173 (Using return value of zend_assign_to_variable() is not
safe).
Fixed bug #73226 (--r[fcez] always return zero exit code).
Intl:
Fixed bug #72809 (Locale::lookup() wrong result with canonicalize
option).
Fixed bug #68471 (IntlDateFormatter fails for "GMT+00:00" timezone).
(Only the first 15 lines of the commit message are shown above )
lang/php80: Update from 8.0.5 to 8.0.6
PDO_pgsql:
Revert "Fixed bug #80892 (PDO::PARAM_INT is treated the same as
PDO::PARAM_STR)"
Sponsored by: Bounce Experts
lang/php80: Upgrade from 8.0.3 to 8.0.5
Changelog:
Core:
Fixed bug #75776 (Flushing streams with compression filter is broken).
Fixed bug #80811 (Function exec without $output but with $restult_code
parameter crashes).
Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space
available for static Thread Local Storage).
Changed PowerPC CPU registers used by Zend VM to work around GCC bug.
Old registers (r28/r29) might be clobbered by _restgpr routine used for return
from C function compiled with -Os.
Dba:
Fixed bug #80817 (dba_popen() may cause segfault during RSHUTDOWN).
DOM:
Fixed bug #66783 (UAF when appending DOMDocument to element).
FFI:
Fixed bug #80847 (CData structs with fields of type struct can't be
passed as C function argument).
(Only the first 15 lines of the commit message are shown above )
lang/php80: Adding MySQL 8.0 'caching_sha2_password' support
- Pet portlint
- Add non-default OPTION MYSQL80
This patch adds an OPTION for adding 'caching_sha2_password' (Default
Password mechanism in MySQL >= 8.0) in php80. If the OPTION MYSQL80 is
selected it will build openssl module with base PHP including mysqlnd.
This will also prevent php80-openssl module from being installed in the
future. php80-mysqli and php80-pdo_mysql will use mysqlnd.
PR: 252420
Reported by: sean@rogue-research.com
Approved by: tz
Sponsored by: Bounce Experts
Differential Revision: https://reviews.freebsd.org/D29491
lang/php80: Update from 8.0.2 to 8.0.3
Changelog:
Core:
Fixed #80706 (mail(): Headers after Bcc headers may be ignored).
DOM:
Fixed bug #80600 (DOMChildNode::remove() doesn't work on CharacterData
nodes).
Gettext:
Fixed bug #53251 (bindtextdomain with null dir doesn't return old
value).
MySQLnd:
Fixed bug #78680 (mysqlnd's mysql_clear_password does not transmit
null-terminated password).
Fixed bug #80713 (SegFault when disabling ATTR_EMULATE_PREPARES and
MySQL 8.0).
MySQLi:
Fixed bug #74779 (x() and y() truncating floats to integers).
(Only the first 15 lines of the commit message are shown above )
lang/php80: Fix "can't locate API module structure `php8_module' in file
/usr/local/libexec/apache24/libphp.so"
Because of the SHORTMODNAME an entry for php8_module was added to httpd.conf
when installing www/mod_php80.
This was an error, because the module is now simple named "php_module".
PR: 251411
Reported by: <freebsd-bugzilla@b-society.se>
Sponsored by: PHP Update Service
lang/php80: Update from 8.0.0 to 8.0.1
Core:
Fixed bug #80345 (PHPIZE configuration has outdated
PHP_RELEASE_VERSION).
Fixed bug #72964 (White space not unfolded for CC/Bcc headers).
Fixed bug #80391 (Iterable not covariant to mixed).
Fixed bug #80393 (Build of PHP extension fails due to configuration gap
with libtool).
Fixed bug #77069 (stream filter loses final block of data).
Fileinfo:
Fixed bug #77961 (finfo_open crafted magic parsing SIGABRT).
FPM:
Fixed bug #69625 (FPM returns 200 status on request without
SCRIPT_FILENAME env).
IMAP:
Fixed bug #80438 (imap_msgno() incorrectly warns and return false on
valid UIDs in PHP 8).
Fix a regression with valid UIDs in imap_savebody().
(Only the first 15 lines of the commit message are shown above )
lang/phph80: Upgrade from RC 5 to 8.0.0
PHP 8.0 comes with numerous improvements and new features such as:
Union Types
Named Arguments
Match Expressions
Attributes
Constructor Property Promotion
Nullsafe Operator
Weak Maps
Just In Time Compilation
And much much more...
Take a look at the PHP 8.0 Announcement Addendum for more information:
https://www.php.net/releases/8.0/
Sponsored by: PHP Update Service
Welcome PHP 8.0 RC 2 to the ports tree
There are many greater changes including:
- json is now part of core
- xmlrpc is removed
- More than 150 backward incompatible changes
Have a look at: https://github.com/php/php-src/blob/php-8.0.0RC2/UPGRADING
Reviewed by: ale, mfechner, Pascal Christen
Sponsored by: PHP Update Service
Differential Revision: https://reviews.freebsd.org/D26848