Article ID: 117997, created on Oct 16, 2013, last review on May 11, 2014

  • Applies to:
  • H-Sphere 3.6.2

Symptoms

Cannot compile PECL zip for PHP 5.4.x.

# make
/bin/sh /root/zip-1.10.2/libtool --mode=compile cc  -I. -I/root/zip-1.10.2 -DPHP_ATOM_INC -I/root/zip-1.10.2/include -I/root/zip-1.10.2/main -I/root/zip-1.10.2 -I/hsphere/shared/php54/include/php -I/hsphere/shared/php54/include/php/main -I/hsphere/shared/php54/include/php/TSRM -I/hsphere/shared/php54/include/php/Zend -I/hsphere/shared/php54/include/php/ext -I/hsphere/shared/php54/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/zip-1.10.2/php_zip.c -o php_zip.lo
mkdir .libs
 cc -I. -I/root/zip-1.10.2 -DPHP_ATOM_INC -I/root/zip-1.10.2/include -I/root/zip-1.10.2/main -I/root/zip-1.10.2 -I/hsphere/shared/php54/include/php -I/hsphere/shared/php54/include/php/main -I/hsphere/shared/php54/include/php/TSRM -I/hsphere/shared/php54/include/php/Zend -I/hsphere/shared/php54/include/php/ext -I/hsphere/shared/php54/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/zip-1.10.2/php_zip.c  -fPIC -DPIC -o .libs/php_zip.o
In file included from /root/zip-1.10.2/php_zip.c:31:
/root/zip-1.10.2/php_zip.h:48:1: warning: "OPENBASEDIR_CHECKPATH" redefined
In file included from /hsphere/shared/php54/include/php/main/php.h:398,
                 from /root/zip-1.10.2/php_zip.c:25:
/hsphere/shared/php54/include/php/main/fopen_wrappers.h:42:1: warning: this is the location of the previous definition
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_extract_fileБ─≥:
/root/zip-1.10.2/php_zip.c:185: warning: passing argument 6 of Б─≤php_basenameБ─≥ from incompatible pointer type
/root/zip-1.10.2/php_zip.c:187: error: Б─≤struct _php_core_globalsБ─≥ has no member named Б─≤safe_modeБ─≥
/root/zip-1.10.2/php_zip.c:187: error: Б─≤CHECKUID_CHECK_FILE_AND_DIRБ─≥ undeclared (first use in this function)
/root/zip-1.10.2/php_zip.c:187: error: (Each undeclared identifier is reported only once
/root/zip-1.10.2/php_zip.c:187: error: for each function it appears in.)
/root/zip-1.10.2/php_zip.c:241: error: Б─≤struct _php_core_globalsБ─≥ has no member named Б─≤safe_modeБ─≥
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_add_fileБ─≥:
/root/zip-1.10.2/php_zip.c:291: error: Б─≤struct _php_core_globalsБ─≥ has no member named Б─≤safe_modeБ─≥
/root/zip-1.10.2/php_zip.c:291: error: Б─≤CHECKUID_CHECK_FILE_AND_DIRБ─≥ undeclared (first use in this function)
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_globБ─≥:
/root/zip-1.10.2/php_zip.c:532: error: Б─≤struct _php_core_globalsБ─≥ has no member named Б─≤safe_modeБ─≥
/root/zip-1.10.2/php_zip.c:532: error: Б─≤CHECKUID_CHECK_FILE_AND_DIRБ─≥ undeclared (first use in this function)
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_pcreБ─≥:
/root/zip-1.10.2/php_zip.c:594: error: Б─≤struct _php_core_globalsБ─≥ has no member named Б─≤safe_modeБ─≥
/root/zip-1.10.2/php_zip.c:594: error: Б─≤CHECKUID_CHECK_FILE_AND_DIRБ─≥ undeclared (first use in this function)
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_get_property_ptr_ptrБ─≥:
/root/zip-1.10.2/php_zip.c:840: error: too few arguments to function Б─≤std_hnd->get_property_ptr_ptrБ─≥
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_read_propertyБ─≥:
/root/zip-1.10.2/php_zip.c:883: error: too few arguments to function Б─≤std_hnd->read_propertyБ─≥
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_has_propertyБ─≥:
/root/zip-1.10.2/php_zip.c:932: error: too few arguments to function Б─≤std_hnd->has_propertyБ─≥
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_object_newБ─≥:
/root/zip-1.10.2/php_zip.c:1044: error: Б─≤zend_class_entryБ─≥ has no member named Б─≤default_propertiesБ─≥
/root/zip-1.10.2/php_zip.c: In function Б─≤zif_zip_openБ─≥:
/root/zip-1.10.2/php_zip.c:1147: error: Б─≤struct _php_core_globalsБ─≥ has no member named Б─≤safe_modeБ─≥
/root/zip-1.10.2/php_zip.c:1147: error: Б─≤CHECKUID_CHECK_FILE_AND_DIRБ─≥ undeclared (first use in this function)
/root/zip-1.10.2/php_zip.c: In function Б─≤c_ziparchive_openБ─≥:
/root/zip-1.10.2/php_zip.c:1436: error: Б─≤struct _php_core_globalsБ─≥ has no member named Б─≤safe_modeБ─≥
/root/zip-1.10.2/php_zip.c:1436: error: Б─≤CHECKUID_CHECK_FILE_AND_DIRБ─≥ undeclared (first use in this function)
/root/zip-1.10.2/php_zip.c: In function Б─≤php_zip_add_from_patternБ─≥:
/root/zip-1.10.2/php_zip.c:1636: warning: passing argument 6 of Б─≤php_basenameБ─≥ from incompatible pointer type
/root/zip-1.10.2/php_zip.c: In function Б─≤zm_startup_zipБ─≥:
/root/zip-1.10.2/php_zip.c:2580: warning: assignment from incompatible pointer type
/root/zip-1.10.2/php_zip.c:2583: warning: assignment from incompatible pointer type
/root/zip-1.10.2/php_zip.c:2584: warning: assignment from incompatible pointer type
make: *** [php_zip.lo] Error 1

Cause

PECL zip extension is unmaintained, since at least safe mode was dropped in 5.4 and PECL zip module still references the corresponding functions.

Resolution

Use the bundled extension (see /hsphere/shared/php54/lib/php/extensions/no-debug-non-zts-20100525/zip.so).

Search Words

Cannot compile PECL zip for PHP 5.4

PHP5.4 cannot compile new modules

e5eac925e853cc7ef3f6055683c98fbb 6311ae17c1ee52b36e68aaf4ad066387 f213b9fa8759d57bee5d547445806fe7 2e39a5e5b1423cc126cf735bac076008

Email subscription for changes to this article
Save as PDF