php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8238 crypt() fails
Submitted: 2000-12-13 14:11 UTC Modified: 2001-03-09 20:48 UTC
From: max at the-triumvirate dot net Assigned:
Status: Closed Package: *Configuration Issues
PHP Version: 4.0 Latest CVS (13/12/2000) OS: linux 2.2.18 (RH6.2)
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: max at the-triumvirate dot net
New email:
PHP Version: OS:

 

 [2000-12-13 14:11 UTC] max at the-triumvirate dot net
When php is linked with openssl (specifically the -lcrypto library) crypt() fails to use the MD5 (12char $1$...$ salts) algorith and is only able to return DES crypted strings.

The configure command used to build php is:

PROG_SENDMAIL=/usr/local/sbin/sendmail \
CPPFLAGS="-I/usr/local/devel/gd/include \
          -I/usr/local/security/openssl/include \
          -I/usr/local/devel/zlib/include \
          -I/usr/local/devel/libpng/include \
          -I/usr/local/devel/gdbm/include" \
LIBS="-L/usr/local/devel/gd/lib \
      -L/usr/local/security/openssl/lib \
      -L/usr/local/devel/zlib/lib \
      -L/usr/local/devel/libpng/lib \
      -L/usr/local/devel/gdbm/lib \
      -L/usr/local/support/flex/lib" \
  ./configure \
    --prefix=/usr/local/services/apache-1.3.14 \
    --with-config-file-path=/usr/local/services/apache-1.3.14/conf \
    --with-apache=../apache-1.3.14 \
    --with-gnu-ld \
    --with-exec-dir=/usr/local/services/apache-1.3.14/exec \
    --with-mysql=/usr/local/services/mysql \
    --with-imap=/usr/local/devel/c-client \
    --with-gdbm=/usr/local/devel/gdbm \
    --with-zlib=/usr/local/devel/zlib \
    --with-gd=/usr/local/devel/gd \
    --with-jpeg-dir=/usr/local/devel/jpeg \
    --with-png-dir=/usr/local/devel/libpng \
    --with-zlib-dir=/usr/local/devel/zlib \
    --with-gettext=/usr/local/devel/gettext \
    --with-ldap=/usr/local/services/openldap \
    --with-imap-ssl \
    --enable-sockets \
    --enable-ftp \
    --enable-trans-sid \
    --enable-track-vars \
    --enable-url-includes

Removing -L.../openssl/lib and -I.../openssl/include allows for MD5 crypted strings.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-05 22:47 UTC] sniper@php.net
Why do you need to set those before configure? Why not adding the correct
install dirs for the different --with-options ? And I don't see any --with-openssl
in you configure line..

--Jani
 [2001-03-09 20:48 UTC] sniper@php.net
This should be fixed in CVS.

--Jani

 [2002-08-15 05:33 UTC] byg at cf1 dot ru
I encounter the same problem while moving to RH7.2.
The cause was in improperly installed OpenSSL.
It should be patched to disable built-in crypt function and all will be OK.jfyi.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC