Thursday, October 10, 2002, 5:35:12 AM, you wrote:
SF> Found the problem with libmcrypt-2.5.3.  When I configured PHP using
SF> the --with-mcrypt option and the PHP configuration found libmcrypt without a
SF> problem.  After compiling and installing it.

SF> Once I fired up Apache.  I checked the PHP Info using phpinfo() function.
SF> The mcrypt showed up but there is no support ciphers (algorithms & modes).
SF> So, I had to use the php.ini as the PHP Manual stated on
SF> 'http://php.net/mcrypt'.  So, I added the two lines as shown in the clipping
SF> where libmcrypt was installed in.

SF> --clip--
SF> mcrypt.algorithms_dir = /usr/local/lib/libmcrypt
SF> mcrypt.modes_dir = /usr/local/lib/libmcrypt
SF> --clip--

SF> That is when PHP Info showed the 'mcrypt.algorithms_dir' and
SF> 'mcrypt.modes_dir' with data in it.  But the problem is I still get the
SF> error message when I tried any mcrypt function, the error message range from
SF> being unable to initalize the module to whatever the other error messages
SF> are.  I assumed there's a bug and filed a bug report to PHP but was rejected
SF> because I was told that I had the php.ini incorrect.  That doesn't make
SF> sense.  It took me a long time to find some clues to the problem.  What I
SF> found is that with any files in the "/usr/local/lib/libmcrypt" that end with
SF> *.a and *.la, they don't work.  There is no *.c and *.h files in that
SF> directory.

SF> I discovered that when I set the php.ini to point to the untarred libmcrypt
SF> directory where *.c and *.h are found in both
SF> '/usr/local/src4/libmcrypt-2.5.3/modules/algorithms' and
SF> '/usr/local/src4/libmcrypt-2.5.3/modules/modes'.  That's when the mcrypt
SF> function start working without a problem.  The problem is PHP doesn't work
SF> with the *.la and *.a files.  Again, I saw the OpenSSL directory where *.c
SF> and *.h files are found in both the algorithms and modes directory of the
SF> '/usr/local/ssl/include/openssl/' directory, it work just fine too.

SF> This had lead me to question of whether is there a bug in libmcrypt or php.
SF> You be the judge of it.  It would be so nice if this problem can be
SF> resolved.  I'm not sure if I'm allowed to use the open source code instead
SF> of the compiled codes.

You dont normally need to specify anything in php.ini for it to work
just make sure you have

--with-mcrypt=/usr/src/mcrypt-2.6.x (thats where it was untarred)

when you configure php. I have it working with nothing set in php.ini


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to