IT Community - Software Programming, Web Development and Technical Support

PHP Error

This is a discussion on PHP Error within the PHP Programming forums, part of the Web Development category; hi, while implementing captcha for my site i have get this error Call to undefined function mcrypt_module_open() i want to ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 08-06-2007, 03:36 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default PHP Error

hi,
while implementing captcha for my site i have get this error
Call to undefined function mcrypt_module_open()

i want to know more on MCRYPT.
is there anything to be installed for implementing this?

Can you help me regards this?
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-06-2007, 10:28 AM
ragavraj ragavraj is offline
D-Web Programmer
 
Join Date: Feb 2007
Posts: 92
ragavraj is on a distinguished road
Default Re: PHP Error

Hi

In php lot of Encryption method available. Mcrypt is one kind Encryption method

You must enable following library in your server

Quote:
These functions work using mcrypt. To use it, download libmcrypt-x.x.tar.gz from MCrypt and follow the included installation instructions. Windows users will find all the needed compiled mcrypt binaries at Index of /php/win32/mcrypt.

As of PHP 5.0.0 you will need libmcrypt Version 2.5.6 or greater.

If you linked against libmcrypt 2.4.x or higher, the following additional block algorithms are supported: CAST, LOKI97, RIJNDAEL, SAFERPLUS, SERPENT and the following stream ciphers: ENIGMA (crypt), PANAMA, RC4 and WAKE. With libmcrypt 2.4.x or higher another cipher mode is also available; nOFB.


You need to compile PHP with the --with-mcrypt[=DIR] parameter to enable this extension. DIR is the mcrypt install directory. Make sure you compile libmcrypt with the option --disable-posix-threads.
if you enable this library you can avoid a this kind of error

Thanks
R.Rajan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-07-2007, 12:31 AM
sivaramakrishnan sivaramakrishnan is offline
D-Web Programmer
 
Join Date: Feb 2007
Posts: 74
sivaramakrishnan is on a distinguished road
Thumbs up Re: PHP Error

Hi,

We must install the MCRYPT package after that to enable MCRYPT in PHP,I given below the steps.

wget http://kent.dl.sourceforge.net/sourc...t-2.5.7.tar.gz
tar -pxzf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure --disable-posix-threads
make
make install
cd ..

In PHP to enable mycrypt

wget http://in2.php.net/distributions/php-5.2.3.tar.gz
tar -pxz php-5.2.3.tar.gz
cd php-5.2.3
./configure --with-mcrypt
make
make install


Regards,
sivaraman.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-07-2007, 12:47 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: PHP Error

Hi Siva,
Thankx for the valuable installation procedure for MCRYPT. I think it can help me lot to configure it in my server. I have to create captcha for my registration page. thats y i need this.

And more, i need to install some fonts for creating string image with PHP. Is there any procedure available?
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-07-2007, 01:09 AM
ragavraj ragavraj is offline
D-Web Programmer
 
Join Date: Feb 2007
Posts: 92
ragavraj is on a distinguished road
Default Re: PHP Error

Hi Jeyaseelan
You can use the following function for string image

Code:
imagettftext ($vImgSource, $vFontSize, 0, $vX0, $Y1, $vFontColor, $vFontName, 'TEXT HERE');
$vFontName //#-- You can give font name like FRSTGRDR.TTF but this font available in Your server.... then only you can write a text,no need to install this font just put a font in separate folder and give a path this is enough..

Thanks
R.Rajan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-07-2007, 01:17 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: PHP Error

hi siva,
How can we install MCRYPT in Windows server for PHP? i think what you gave that works fine in Linux based server. i want to install MCRYPT in Windows XP with IIS web server, PHP 5.0 and MySql 5.0. Please help me to install this.

Thanks in advance
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-07-2007, 01:32 AM
sivaramakrishnan sivaramakrishnan is offline
D-Web Programmer
 
Join Date: Feb 2007
Posts: 74
sivaramakrishnan is on a distinguished road
Thumbs up Re: PHP Error

Hi,

Installation of mcrypt extensions on Windows

After installing PHP and a web server on Windows, you will probably want to install some extensions for added functionality. You can choose which extensions you would like to load when PHP starts by modifying your php.ini. You can also load a module dynamically in your script using dl().

The DLLs for PHP extensions are prefixed with php_.

Many extensions are built into the Windows version of PHP. This means additional DLL files, and the extension directive, are not used to load these extensions. The Windows PHP Extensions table lists extensions that require, or used to require, additional PHP DLL files. Here's a list of built in extensions:

In PHP 4 (updated PHP 4.3.11): BCMath, Caledar, COM, Ctype, FTP, MySQL, ODBC, Overload, PCRE, Session, Tokenizer, WDDX, XML and Zlib

In PHP 5 (updated PHP 5.0.4), the following changes exist. Built in: DOM, LibXML, Iconv, SimpleXML, SPL and SQLite. And the following are no longer built in: MySQL and Overload.

To Download mycrypt from http://files.edin.dk/php/win32/mcrypt/libmcrypt.dll and copy to C:\php\extensions\php_mcrypt.dll

The default location PHP searches for extensions is C:\php4\extensions in PHP 4 and C:\php5 in PHP 5. To change this setting to reflect your setup of PHP edit your php.ini file:

You will need to change the extension_dir setting to point to the directory where your extensions lives, or where you have placed your php_*.dll files. For example:

extension_dir = C:\php\extensions

Enable the extension(s) in php.ini you want to use by uncommenting the extension=php_*.dll lines in php.ini. This is done by deleting the leading ; from the extension you want to load.

// change the following line from ...
;extension=php_mcrypt.dll

// ... to
extension=php_mcrypt.dll

After that check the phpinfo.php

Regards,
sivaraman.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-08-2007, 08:53 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: PHP Error

Hi Siva,
I hope that you have provided enough information to know the better captcha installation for windows server for PHP.

Thank you
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: command line error MIDL1001 : cannot open input file wincodec.idl midl Mramesh C# Programming 0 02-18-2008 11:07 PM
Why do I get Error message "Unable to Start Debugging" Error Message? a.deeban ASP and ASP.NET Programming 5 09-25-2007 12:22 AM
.Debugging php ..What does this mean " Parse error: parse error, unexpected....... oxygen PHP Programming 1 07-26-2007 03:41 AM
error nssukumar Flash Actionscript Programming 1 07-25-2007 04:51 AM
I get the error "The page cannot be displayed" and an HTTP 502 Proxy Error. Why? kingmaker ASP and ASP.NET Programming 1 07-20-2007 04:43 AM


All times are GMT -7. The time now is 02:52 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0