Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

Including extensions
Welcome, Guest. Please login or register.
December 02, 2008, 08:59:48 AM
11304 Posts in 1248 Topics by 498 Members
Latest Member: katCheeme
Experts Round Table Network  |  Webservers  |  Apache  |  Including extensions « previous next »
Pages: [1]
Author Topic: Including extensions  (Read 1485 times)
ScottInTexas

Offline Offline

Posts: 9


« on: June 23, 2007, 12:14:11 PM »

I am running PHP 4 on a windows xp machine.  I tried editing the php.ini file so I could include the mcrypt.dll.   My directory for extensions says "extension_dir = ../php/extensions" and I have uncommented the extension=php_mcrypt.dll line.  When I run a php file this error occurs

Fatal error: Call to undefined function: mcrypt_get_key_size() in c:\phpdev5\www\alaskaerrands\register.php on line 101

Can anyone tell me if this function is NOT available in PHP 4 and if not then how do I change this line?

$cryptKey = substr($fieldHash,0,mcrypt_get_key_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB));

I got this from the article here about secure forms.
Logged

Thanks,
Scott
The Answer is 42
rdivilbiss
Governing Council Member
*
Offline Offline

Posts: 414



WWW
« Reply #1 on: June 23, 2007, 05:27:57 PM »

For Windows you path should be like this:

extension_dir = "c:\php\ext" (windows style)

rather than ../../ext  (unix style)

Also, I often either put the path to PHP, the EXT folder and MYSQL stuff in the PATH environment variable of the Windows server, or alternatively you can simply copy the dll to C:\windows\system32.

I'd try the last one first, because it does not require a reboot.


« Last Edit: June 23, 2007, 05:35:36 PM by rdivilbiss » Logged

Rod
rdivilbiss
Governing Council Member
*
Offline Offline

Posts: 414



WWW
« Reply #2 on: June 23, 2007, 05:52:04 PM »

Also php_mcrypt.dll requires libmcrypt.dll which I also put in windows\system32




« Last Edit: June 23, 2007, 05:58:04 PM by rdivilbiss » Logged

Rod
rdivilbiss
Governing Council Member
*
Offline Offline

Posts: 414



WWW
« Reply #3 on: June 24, 2007, 05:32:00 PM »

And if you never get mcrypt to work, you can do it with Brutuslib*.


https://www.cafesong.com/ert/login_form/login1.php

https://www.cafesong.com/ert/login_form/login_form_examples_rev.zip <-- has a revised formFunctions using Brutuslib* instead of mcrypt.


Regards,
Rod


* Brutuslib 1.1, freeware synchronous encryption library based on elementary functions only (c) 2004-2006 Jan Drda <yan@yan.cz>, last change April 2006
Logged

Rod
Pages: [1]
« previous next »
    Jump to: