php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61779 Does not compile; "no member 'safe_mode'"
Submitted: 2012-04-19 20:30 UTC Modified: 2013-10-23 07:56 UTC
Votes:31
Avg. Score:4.5 ± 0.8
Reproduced:29 of 30 (96.7%)
Same Version:18 (62.1%)
Same OS:8 (27.6%)
From: krebs dot seb at googlemail dot com Assigned:
Status: Not a bug Package: zip (PECL)
PHP Version: 5.4.0 OS: Ubuntu 11.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: krebs dot seb at googlemail dot com
New email:
PHP Version: OS:

 

 [2012-04-19 20:30 UTC] krebs dot seb at googlemail dot com
Description:
------------
Doesn't compile when trying to install it from pecl

Test script:
---------------
sudo pecl install zip

Expected result:
----------------
Compiles

Actual result:
--------------
downloading zip-1.10.2.tgz ...
Starting to download zip-1.10.2.tgz (236,912 bytes)
.................................................done: 236,912 bytes
61 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
building in /tmp/pear/temp/pear-build-rootl6DEZA/zip-1.10.2
running: /tmp/pear/temp/zip/configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -
I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -
I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20100525
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for zip archive read/writesupport... yes, shared
checking for the location of libz... no
checking pcre install prefix... no
checking for the location of zlib... /usr
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-
linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain 
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootl6DEZA/zip-1.10.2/libtool --mode=compile 
cc  -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-
rootl6DEZA/zip-1.10.2/include -I/tmp/pear/temp/pear-build-rootl6DEZA/zip-
1.10.2/main -I/tmp/pear/temp/zip -I/usr/include/php5 -I/usr/include/php5/main -
I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -
I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c 
/tmp/pear/temp/zip/php_zip.c -o php_zip.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -
I/tmp/pear/temp/pear-build-rootl6DEZA/zip-1.10.2/include -I/tmp/pear/temp/pear-
build-rootl6DEZA/zip-1.10.2/main -I/tmp/pear/temp/zip -I/usr/include/php5 -
I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -
I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -
c /tmp/pear/temp/zip/php_zip.c  -fPIC -DPIC -o .libs/php_zip.o
In file included from /tmp/pear/temp/zip/php_zip.c:31:0:
/tmp/pear/temp/zip/php_zip.h:48:0: warning: "OPENBASEDIR_CHECKPATH" redefined 
[enabled by default]
/usr/include/php5/main/fopen_wrappers.h:42:0: note: this is the location of the 
previous definition
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_extract_file':
/tmp/pear/temp/zip/php_zip.c:185:3: warning: passing argument 6 of 
'php_basename' from incompatible pointer type [enabled by default]
/usr/include/php5/ext/standard/php_string.h:128:13: note: expected 'size_t *' 
but argument is of type 'unsigned int *'
/tmp/pear/temp/zip/php_zip.c:187:7: error: 'struct _php_core_globals' has no 
member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:187:7: error: 'CHECKUID_CHECK_FILE_AND_DIR' 
undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c:187:7: note: each undeclared identifier is reported 
only once for each function it appears in
/tmp/pear/temp/zip/php_zip.c:241:6: error: 'struct _php_core_globals' has no 
member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_add_file':
/tmp/pear/temp/zip/php_zip.c:291:6: error: 'struct _php_core_globals' has no 
member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:291:6: error: 'CHECKUID_CHECK_FILE_AND_DIR' 
undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_glob':
/tmp/pear/temp/zip/php_zip.c:532:6: error: 'struct _php_core_globals' has no 
member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:532:6: error: 'CHECKUID_CHECK_FILE_AND_DIR' 
undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_pcre':
/tmp/pear/temp/zip/php_zip.c:594:6: error: 'struct _php_core_globals' has no 
member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:594:6: error: 'CHECKUID_CHECK_FILE_AND_DIR' 
undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_get_property_ptr_ptr':
/tmp/pear/temp/zip/php_zip.c:840:3: error: too few arguments to function 
'std_hnd->get_property_ptr_ptr'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_read_property':
/tmp/pear/temp/zip/php_zip.c:883:3: error: too few arguments to function 
'std_hnd->read_property'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_has_property':
/tmp/pear/temp/zip/php_zip.c:932:3: error: too few arguments to function 
'std_hnd->has_property'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_object_new':
/tmp/pear/temp/zip/php_zip.c:1044:51: error: 'zend_class_entry' has no member 
named 'default_properties'
/tmp/pear/temp/zip/php_zip.c: In function 'zif_zip_open':
/tmp/pear/temp/zip/php_zip.c:1147:6: error: 'struct _php_core_globals' has no 
member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:1147:6: error: 'CHECKUID_CHECK_FILE_AND_DIR' 
undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'c_ziparchive_open':
/tmp/pear/temp/zip/php_zip.c:1436:6: error: 'struct _php_core_globals' has no 
member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:1436:6: error: 'CHECKUID_CHECK_FILE_AND_DIR' 
undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_add_from_pattern':
/tmp/pear/temp/zip/php_zip.c:1636:10: warning: passing argument 6 of 
'php_basename' from incompatible pointer type [enabled by default]
/usr/include/php5/ext/standard/php_string.h:128:13: note: expected 'size_t *' 
but argument is of type 'unsigned int *'
/tmp/pear/temp/zip/php_zip.c: In function 'zm_startup_zip':
/tmp/pear/temp/zip/php_zip.c:2580:43: warning: assignment from incompatible 
pointer type [enabled by default]
/tmp/pear/temp/zip/php_zip.c:2583:36: warning: assignment from incompatible 
pointer type [enabled by default]
/tmp/pear/temp/zip/php_zip.c:2584:35: warning: assignment from incompatible 
pointer type [enabled by default]
make: *** [php_zip.lo] Fehler 1
ERROR: `make' failed

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-25 14:00 UTC] bbialek at smartertravelmedia dot com
I have the same problem with PHP 5.4.2 and CentOS 5.8.  The compile fails on:

/tmp/pear/temp/zip/php_zip.c:187: error: ‘struct _php_core_globals’ has no member 
named ‘safe_mode’
 [2012-07-04 18:38 UTC] ihooor at gmail dot com
Fedora 17, php PHP 5.4.4
Have the same problem when try to install imagick:
/var/tmp/imagick/imagick_class.c:9534:2: error: 'struct _php_core_globals' has 
no member named 'safe_mode'
/var/tmp/imagick/imagick_class.c:9534:2: error: 'CHECKUID_CHECK_FILE_AND_DIR' 
undeclared (first use in this function)
/var/tmp/imagick/imagick_class.c:9534:2: error: 'CHECKUID_NO_ERRORS' undeclared 
(first use in this function)
make: *** [imagick_class.lo] Error 1
ERROR: `make' failed
 [2012-07-09 14:50 UTC] a dot koss at gmx dot net
Debian Squeeze && PHP 5.4.4

running: make
/bin/bash /tmp/pear/temp/pear-build-rootgF7LAY/phar-2.0.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/phar -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootgF7LAY/phar-2.0.0/include -I/tmp/pear/temp/pear-build-rootgF7LAY/phar-2.0.0/main -I/tmp/pear/temp/phar -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/phar/util.c -o util.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/phar -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootgF7LAY/phar-2.0.0/include -I/tmp/pear/temp/pear-build-rootgF7LAY/phar-2.0.0/main -I/tmp/pear/temp/phar -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/phar/util.c  -fPIC -DPIC -o .libs/util.o
/tmp/pear/temp/phar/util.c: In function 'phar_mount_entry':
/tmp/pear/temp/phar/util.c:205: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/phar/util.c:205: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/phar/util.c:205: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/phar/util.c:205: error: for each function it appears in.)
/tmp/pear/temp/phar/util.c: In function 'phar_find_in_include_path':
/tmp/pear/temp/phar/util.c:274: warning: assignment discards qualifiers from pointer target type
/tmp/pear/temp/phar/util.c: In function 'phar_open_archive_fp':
/tmp/pear/temp/phar/util.c:854: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/phar/util.c:854: error: 'CHECKUID_ALLOW_ONLY_FILE' undeclared (first use in this function)
/tmp/pear/temp/phar/util.c: In function 'phar_add_virtual_dirs':
/tmp/pear/temp/phar/util.c:2218: warning: assignment discards qualifiers from pointer target type
make: *** [util.lo] Error 1
ERROR: `make' failed
 [2012-10-24 15:56 UTC] qwerty at mailinator dot com
RHE4, php 5.2.0
pecl install zip fails as below

running: make
/bin/sh /tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/libtool --mode=compile gcc  -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/include -I/tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/main -I/tmp/pear/temp/zip -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/zip/php_zip.c -o php_zip.lo
mkdir .libs
 gcc -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/include -I/tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/main -I/tmp/pear/temp/zip -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/zip/php_zip.c  -fPIC -DPIC -o .libs/php_zip.o
/tmp/pear/temp/zip/php_zip.c: In function `php_zip_extract_file':
/tmp/pear/temp/zip/php_zip.c:163: error: `CWD_EXPAND' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c:163: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/zip/php_zip.c:163: error: for each function it appears in.)
/tmp/pear/temp/zip/php_zip.c: At top level:
/tmp/pear/temp/zip/php_zip.c:715: error: initializer element is not constant
/tmp/pear/temp/zip/php_zip.c:715: error: (near initialization for `zip_functions[0].fname')
/tmp/pear/temp/zip/php_zip.c:715: error: syntax error before "ZEND_RAW_FENTRY"
/tmp/pear/temp/zip/php_zip.c:715: error: syntax error before ')' token
/tmp/pear/temp/zip/php_zip.c:716: warning: initialization makes integer from pointer without a cast
/tmp/pear/temp/zip/php_zip.c:716: error: initializer element is not constant
/tmp/pear/temp/zip/php_zip.c:716: error: (near initialization for `zip_functions[0]')
/tmp/pear/temp/zip/php_zip.c:716: warning: initialization from incompatible pointer type
/tmp/pear/temp/zip/php_zip.c:716: error: syntax error before ')' token
/tmp/pear/temp/zip/php_zip.c:717: warning: initialization from incompatible pointer type
/tmp/pear/temp/zip/php_zip.c:717: warning: initialization makes integer from pointer without a cast
/tmp/pear/temp/zip/php_zip.c:717: error: initializer element is not constant
/tmp/pear/temp/zip/php_zip.c:717: error: (near initialization for `zip_functions[1]')
/tmp/pear/temp/zip/php_zip.c:717: error: initializer element is not constant
/tmp/pear/temp/zip/php_zip.c:717: error: (near initialization for `zip_functions[2]')
/tmp/pear/temp/zip/php_zip.c:718: error: syntax error before '{' token
/tmp/pear/temp/zip/php_zip.c:1112: warning: initialization discards qualifiers from pointer target type
/tmp/pear/temp/zip/php_zip.c: In function `zm_startup_zip':
/tmp/pear/temp/zip/php_zip.c:2586: warning: assignment discards qualifiers from pointer target type
make: *** [php_zip.lo] Error 1
ERROR: `make' failed
 [2013-02-20 10:27 UTC] huwence at gmail dot com
same problem with PHP 5.4.11 and Ubuntu 12.10
 [2013-03-06 06:40 UTC] eugene at zhegan dot in
Same trouble on Solaris 11.0 and PHP 5.4.11.
 [2013-03-06 07:46 UTC] eugene at zhegan dot in
pecl zip extension is unmaintained, and is broken with 5.4.x; use bundled zip 
with --enable-zip.
 [2013-10-23 07:56 UTC] remi@php.net
-Status: Open +Status: Not a bug
 [2013-10-23 07:56 UTC] remi@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

zip extension is included in php tree.

And latest 1.12.2 build with 5.3 and 5.4.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 01:01:31 2024 UTC