Doc #78998 [NEW]: Fatal error: Undefined class constant 'EM_AES_256'
| From: | shariefjamiel at gmail dot com | Date: | Thu, 19 Dec 2019 10:55:41 +0000 |
| Subject: | Doc #78998 [NEW]: Fatal error: Undefined class constant 'EM_AES_256' | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-17147@lists.php.net to get a copy of this message | ||
From: shariefjamiel at gmail dot com
Operating system: ubuntu 18.04 - php 7.2.15
PHP version: Irrelevant
Package: Zip Related
Bug Type: Documentation Problem
Bug description:Fatal error: Undefined class constant 'EM_AES_256'
Description:
------------
Here and other places says this works on PHP 7.2 and above, when infact
it only works on 7.3 and above.
- https://www.php.net/manual/en/zip.constants.php
- https://www.php.net/manual/en/ziparchive.setencryptionname.php
Test script:
---------------
$archive = new ZipArchive();
if ($archive->open('foo.zip', ZipArchive::CREATE)!==true) {
exit("cannot open $filename");
}
$value = ZipArchive::EM_AES_256; // error
$archive->setEncryptionName('foo', ZipArchive::EM_AES_256, 'foo'); //
also doesnt work
--
Edit bug report at https://bugs.php.net/bug.php?id=78998&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78998&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78998&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78998&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78998&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78998&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78998&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78998&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78998&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78998&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78998&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78998&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78998&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78998&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78998&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78998&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78998&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78998&r=mysqlcfg