Compiling php with crypt()
2024-05-04 22:55:10
供稿:网友
compiling php with crypt()
author:
daniel beulshausen
updated:
14.10.2000
this quick tutorial shall help you to compile php with support for the crypt() function, because it's not correct that if you use windows you can't use crypt().
it is however correct that libcrypt isn't available by default on windows, but you can use the libary from our download section.
extract the zip and move crypt.h to your include folder, and the needed libary (release or debug) to your libary folder (tools -> options -> folders).
load the php workspace, and add crypt.c (can be found in ext/standard/) to the php4dllts group (you can put crypt.c to function modules -> source files).
now edit the link options of the php4dllts project, and add libcrypt to the link libaries, note that we compiled a release and a debug libary, please use only release for the release builds, and the debug libary for debug builds!
now edit config.w32.h (located in main/), edit it and change the needed defines:
#define have_crypt 1
#define have_crypt_h 1
this should do the trick, and it'll build you php with the crypt() function.