From:             
Operating system: Ubuntu 9.10
PHP version:      5.3.2
Package:          Compile Failure
Bug Type:         Bug
Bug description:Missing ifdefs / logic bug in crypt code cause compile errors

Description:
------------
In ext/standard/config.m4, the following line causes conditional definition
of the PHP_SHA256_CRYPT and PHP_SHA512_CRYPT constants:



if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" ||
test "$ac_cv_crypt_ext_des" = "no" || test "x$php_crypt_r" = "x0"; then



Because these symbols are used unconditionally in ext/standard/crypt.c,
this can cause PHP to fail to compile.



In the near-term, the compile bug can be fixed as follows:





#ifdef PHP_SHA256_CRYPT

   REGISTER_LONG_CONSTANT("CRYPT_SHA256", PHP_SHA256_CRYPT, CONST_CS |
CONST_PERSISTENT);

#endif

#ifdef PHP_SHA512_CRYPT

   REGISTER_LONG_CONSTANT("CRYPT_SHA512", PHP_SHA512_CRYPT, CONST_CS |
CONST_PERSISTENT);

#endif





However, the m4 logic should probably be revisited at some point.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=51435&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51435&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51435&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51435&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51435&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51435&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51435&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51435&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51435&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51435&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51435&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51435&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51435&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51435&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51435&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51435&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51435&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51435&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51435&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51435&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51435&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51435&r=mysqlcfg

Reply via email to