php.net |  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
Votes:7
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rmf at scr dot be
New email:
PHP Version: OS:

 

 [2014-08-11 02:27 UTC] rmf at scr dot be
Description:
------------
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 @ https://bugs.php.net/bug.php?id=56609&edit=2

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: 

https://static.scribenet.com/crack-0.4.1.tgz

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



Test script:
---------------
wget http://pecl.php.net/get/crack -O crack-0.4.tgz
tar xzf crack-0.4.tgz
cd crack-0.4/
phpize
./configure
make

Expected result:
----------------
Build process completed successfully
Installing '/usr/lib/php5/20131226/crack.so'
install ok: channel://pecl.php.net/crack-0.4.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=crack.so" 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

Patches

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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-07 20:01 UTC] cmb@php.net
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 <http://php.net/mailing-lists.php>
 [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] rmf@php.net
-Assigned To: +Assigned To: rmf
 [2015-10-26 17:53 UTC] rmf@php.net
-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] rmf@php.net
Latest fix can be found here: https://static.scribenet.com/rmf/crack-0.4.1.tar.xz

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] rmf@php.net
-: rfrawley at scribenet dot com +: rmf at scr dot be
 [2017-10-24 06:17 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: rmf +Assigned To:
 [2017-10-24 06:19 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-10-24 06:19 UTC] kalle@php.net
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: Sun Dec 22 01:01:30 2024 UTC