LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-24-2002, 05:14 AM   #1
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
Unhappy php and mcrypt


Dear friends,

I have Redhat 7.2 installed with apache and php installed by default. but I am getting the following error in a php file when viewed in browser at the client end.

=======================
// source code of php file
<?php
$key = "this is a very secret key";
$input = "Let us meet at 9 o'clock at the secret place.";

$encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);
?>
=======================

=======================
Error message at the client
=======================
Fatal error: Call to undefined function: mcrypt_ecb() in /home/httpd/html/test.php on line 4

---------------------------------------------------------------------------

Can any one help me in this regards

Mayank
 
Old 06-28-2002, 04:40 PM   #2
kop
LQ Newbie
 
Registered: Jul 2001
Posts: 24

Rep: Reputation: 15
Here's my random stab:

1) The libmcrypt library is not installed on your system. Look through your rpms on your cds before getting something off the web. ("locate libmcrypt" to see if it's installed.)

2) php was not linked with libmcrypt. I think is is, but... You'd have to install the srpm, modify the /usr/src/redhat/SPECS/php.spec file and then do a rpm -ba php.spec to get an rpm which is linked.

3) if you're messing with system passwords, you probably want to be using the crypt function instead.
 
Old 06-28-2002, 04:53 PM   #3
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
I would guess that is is #2. To check you can use phpinfo(). Do you have an mcrypt section?

--jeremy
 
Old 06-29-2002, 04:20 AM   #4
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Original Poster
Rep: Reputation: 30
Thanks

It was #2 only and now i have solved the problem as was told

Thanks


Mayank
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php mcrypt cookie - mysql query lemack Linux - Security 3 02-09-2005 09:21 AM
php-mcrypt? nigeledge Linux - Software 0 10-03-2004 09:39 AM
PHP Modules (IMAP, Mcrypt, and MCAL) grahammm Linux - Software 0 08-02-2004 02:47 AM
php mcrypt shared configuration option Pete Dogg Linux - Software 1 02-22-2004 12:00 PM
LDAP Account manager, PHP and mcrypt, and so on... HOWTO???? Satriani Linux - Software 2 11-04-2003 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration