php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67819 crack-0.[3|4] will not build; config.h not found; function_entry; PG(safe_mode)
Submitted: 2014-08-11 02:28 UTC Modified: 2014-08-11 21:20 UTC
From: rfrawley at scribenet dot com Assigned:
Status: Closed Package: crack (PECL)
PHP Version: 5.6.0RC3 OS: OS X 10.10 DP 5 and Ubuntu 14.04
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: rfrawley at scribenet dot com
New email:
PHP Version: OS:

 

 [2014-08-11 02:28 UTC] rfrawley at scribenet dot com
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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-11 21:18 UTC] rfrawley at scribenet dot com
-Status: Open +Status: Closed
 [2014-08-11 21:18 UTC] rfrawley at scribenet dot com
Duplicate of https://bugs.php.net/bug.php?id=67819
 [2014-08-11 21:20 UTC] rfrawley at scribenet dot com
Oops - duplicate of https://bugs.php.net/bug.php?id=67818
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 21 03:01:23 2020 UTC