473,380 Members | 1,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,380 software developers and data experts.

MCRYPT

FD
I am having a big problem with the following line... it runs very well
on linux but I don't get why it doesn't work on winxp
$_SESSION['_mcrypt_iv'] =
mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAE L_256,
MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);

I am getting a warning
Warning: mcrypt_create_iv(): Cannot open source device in
C:\apache\htdocs\filename.php

any suggestion..

thanks

Jul 17 '05 #1
2 3937
FD wrote:
I am having a big problem with the following line... it runs very well
on linux but I don't get why it doesn't work on winxp
$_SESSION['_mcrypt_iv'] =
mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAE L_256,
MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);

I am getting a warning
Warning: mcrypt_create_iv(): Cannot open source device in
C:\apache\htdocs\filename.php

any suggestion..

thanks


Hi FD,

It means that the function cannot open the device /dev/urandom, while
you are referring to that by using MCRYPT_DEV_URANDOM as the second
parameter (source). Since you're trying this on Windows you don't have a
/dev/urandom, so the only option is to use MCRYPT_RAND (rand() function)
as the second parameter.
HTH.

--
http://www.phpforums.nl
Jul 17 '05 #2
FD
FD wrote:
I am having a big problem with the following line... it runs very well
on linux but I don't get why it doesn't work on winxp
$_SESSION['_mcrypt_iv'] =
mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAE L_256,
MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);

I am getting a warning
Warning: mcrypt_create_iv(): Cannot open source device in
C:\apache\htdocs\filename.php

any suggestion..

thanks

Well.. I've found the anwser myself... windows doesn't support
MCRYPT_DEV_URANDOM but MCRYPT_RANDOM
thanks anyway
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt McKay | last post by:
I've written a php page which allows users to type in a text string and a key, then choose from a dropdown menu of encryption/decryption cyphers, and a method (encrypt, decrypt). The whole thing...
3
by: Marek Muszak | last post by:
Hello, I try use mcrypt but I want to use key in bytes, not in string. Encrypt text will be decrypt in Delphi with function where key is 16byte not string. How can I do this. Thanks for any...
0
by: William Holroyd | last post by:
So I've got PHP to recognize mcrypt and pdflib in the phpinfo() output, but trying to use any of the functions fail with "...undefined function called..". There aren't any configurable files with...
1
by: BKDotCom | last post by:
I'm writing an app that will use blowfish encryption.. PHP's mcrypt will be used if available. if not, I'll use PHPmyadmin's blowfish.php library. The problem is I can't figure out what...
4
by: believein | last post by:
Hi all, I installed PHP thru the XAMPP package on my windows machine. The problem, I couldn't solve, is that the mcryppt funcs don't work. It return the following message: Call to undefined...
1
by: laredotornado | last post by:
Hello, My hosting company does not support the PHP mcrypt functions. Instead, they recomend using the command line, /usr/local/bin/mcrypt utility via PHP's exec method. Sadly, they do not provide...
5
by: sylvian stone | last post by:
Hi, I'm getting some strange errors that I cannot pin down: Warning: mcrypt_generic_init(): Iv size incorrect; supplied length: 7, needed: 8 in...... This is strange because the data is...
0
by: codearcher | last post by:
I have the latest version of XAMPP installed on Windows XP Pro SP2. I am trying to use mcrypt with rijnndael-128 on ecb: " $cr = mcrypt_module_open('rijndael-128','','ecb','') or...
0
by: E. Recio | last post by:
Long story short. I want to use Mac OS/X and PHP. I have a db with passwords stored under Linux using the crypt("foo", "$1$".$salt."$); scheme. This means that crypt should execute a CRYPT_MD5...
3
by: =?UTF-8?Q?Ahmad_=E3=8B=A1_Baitalmal?= | last post by:
Hi, I'm having a hard time getting python-mcrypt extension to build. I installed libmcrypt with --prefix=/usr and I checked that the library exists -rwxr-xr-x 1 root wheel 352K Sep 19...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.