|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67818 crack-0.[3|4] will not build; config.h not found; function_entry; PG(safe_mode)
Submitted: 2014-08-11 02:27 UTC Modified: 2017-10-24 06:19 UTC
Avg. Score:4.1 ± 1.1
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:4 (57.1%)
From: rmf at scr dot be Assigned:
Status: Suspended Package: crack (PECL)
PHP Version: 5.6.x OS: OS X 10.10, Ubuntu 14.04-15.10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-08-11 02:27 UTC] rmf at scr dot be
PHP Version: PHP 5.6.0RC2 (cli) (built: Jul 23 2014 12:57:42) 

The current 0.4 build of PECL:crack does not build because of the "closed" but never fixed report @

It also doesn't build because of old incorrect type names for current PHP releases:
crack-0.4/crack.c:41:1: error: unknown type name 'function_entry'

It also doesn't build on any release of PHP that has safe mode completely removed:
crack-0.4/crack.c: In function 'php_crack_checkpath':
/usr/include/php5/main/php_globals.h:32:29: error: 'struct _php_core_globals' has no member named 'safe_mode'
 # define PG(v) (core_globals.v)

I have fixed the above errors and incremented the version from 0.4 to 0.4.1. No API changes. The fixed package archive can be found here:

If there is a better way for me to submit these changes, please advise.

Test script:
wget -O crack-0.4.tgz
tar xzf crack-0.4.tgz
cd crack-0.4/

Expected result:
Build process completed successfully
Installing '/usr/lib/php5/20131226/'
install ok: channel://
configuration option "php_ini" is not set to php.ini location
You should add "" to php.ini

Actual result:
/bin/bash /home/rmf/crack-0.4/libtool --mode=compile cc -I/home/rmf/crack-0.4/libcrack/include -I. -I/home/rmf/crack-0.4 -DPHP_ATOM_INC -I/home/rmf/crack-0.4/include -I/home/rmf/crack-0.4/main -I/home/rmf/crack-0.4 -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 /home/rmf/crack-0.4/crack.c -o crack.lo 
libtool: compile:  cc -I/home/rmf/crack-0.4/libcrack/include -I. -I/home/rmf/crack-0.4 -DPHP_ATOM_INC -I/home/rmf/crack-0.4/include -I/home/rmf/crack-0.4/main -I/home/rmf/crack-0.4 -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 /home/rmf/crack-0.4/crack.c  -fPIC -DPIC -o .libs/crack.o
/home/rmf/crack-0.4/crack.c:41:1: error: unknown type name 'function_entry'
 function_entry crack_functions[] = {
/home/rmf/crack-0.4/crack.c:42:2: warning: braces around scalar initializer [enabled by default]
  PHP_FE(crack_opendict,   NULL)


/home/rmf/crack-0.4/crack.c: In function 'php_crack_checkpath':
/usr/include/php5/main/php_globals.h:32:29: error: 'struct _php_core_globals' has no member named 'safe_mode'
 # define PG(v) (core_globals.v)
/home/rmf/crack-0.4/crack.c:99:6: note: in expansion of macro 'PG'
  if (PG(safe_mode)) {
/home/rmf/crack-0.4/crack.c:109:36: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
   if (!php_checkuid(filename, "r", CHECKUID_CHECK_FILE_AND_DIR)) {
/home/rmf/crack-0.4/crack.c:109:36: note: each undeclared identifier is reported only once for each function it appears in


FTBS-issue-67818.patch (last revision 2016-11-29 09:20 UTC by malorent dot ext at orange dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-07 20:01 UTC]
Apparently, the crack extension is looking for an active
maintainer. If you're interested, I suggest you send an email to
the Internals list[1].

[1] see <>
 [2015-04-24 22:42 UTC] Steve dot Cleveland at gmail dot com
Your link is broken.  Can you provide a new one?
 [2015-10-26 17:51 UTC]
-Assigned To: +Assigned To: rmf
 [2015-10-26 17:53 UTC]
-Operating System: OS X 10.10 DP 5 and Ubuntu 14.04 +Operating System: OS X 10.10, Ubuntu 14.04-15.10 -PHP Version: 5.6.0RC3 +PHP Version: 5.6.x
 [2015-10-26 17:53 UTC]
Latest fix can be found here:

Once I work through the wonder that is gaining access to VC and PECL, I'll get this live...
 [2015-10-26 17:55 UTC]
-: rfrawley at scribenet dot com +: rmf at scr dot be
 [2017-10-24 06:17 UTC]
-Status: Assigned +Status: Open -Assigned To: rmf +Assigned To:
 [2017-10-24 06:19 UTC]
-Status: Open +Status: Suspended
 [2017-10-24 06:19 UTC]
pecl/crack have not had a release for 12 years, so I'm gonna suspend this report, any future new maintainer can re-open this report
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 19:01:31 2024 UTC