php-windows Digest 30 Nov 2005 16:51:58 -0000 Issue 2840
Topics (messages 26551 through 26554):
Re: Decryption
26551 by: Kevin Smith
Re: Custom PHP extensions not woring on windows 2003 server
26552 by: Armando
26553 by: David Felton
26554 by: Jim McDonald
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
I think this will solve your problems, here is real working code.
class ENCRYPTION
{
var $KEY = "NEED_A_DECENT_KEY";
//Encrypt Function
function encrypt($string)
{
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256,
MCRYPT_MODE_ECB), MCRYPT_RAND);
$passcrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->KEY,
$string, MCRYPT_MODE_ECB, $iv);
$encoded = base64_encode($passcrypt);
return $encoded;
}
//Decrypt Function
function decrypt($string)
{
$decoded = base64_decode($string);
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256,
MCRYPT_MODE_ECB), MCRYPT_RAND);
$decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->KEY,
$decoded, MCRYPT_MODE_ECB, $iv);
return trim($decrypted);
}
}
DvDmanDT wrote:
.. What exactly are you trying to do? If you are trying to decrypt user
input, then no, it's not going to work.. You'll have to read the input
first, then pass that to mcrypt_decrypt, then write that to your outfile..
smime.p7s
Description: S/MIME Cryptographic Signature
--- End Message ---
--- Begin Message ---
Here's my piece: I was running MySQL 4.0.2x and PHP 5.0.1. Upgraded
MySQL to 5.0.15 and found PHP no longer working (Apache 2.0.5x).
Upgraded PHP to 5.0.5 and copied the included libmysql.dll to the
system32 directory and everything appears to be running just fine.
To note, I used the zipped packages rather than the ones with the built
in installers. Was fairly straightforward and only took about 15 minutes
to upgrade both. Cheers.
Armando
Charlie Wong wrote:
I experimented with an install of PHP 5.1 and had the same problem. It
would not load the mysql extension. I had to revert back to PHP 4.3
(which is having it's own problems).
David Felton wrote:
During my Googling I've read a lot about people having problems with
Mysql and PHP 5, due to the built in support for MySQl being removed.
I don't think this is the same issue. Thanks.
-----Original Message-----
From: Nico [mailto:[EMAIL PROTECTED]
Sent: 29 November 2005 4:21
To: David Felton
Subject: Re: [PHP-WIN] Custom PHP extensions not woring on windows 2003
server
2005/11/29, David Felton <[EMAIL PROTECTED]>:
Application popup: Warning : Unknown(): Unable to load dynamic
library 'c:\php\extensions\php_SCOGPAAK.dll' - The specified module
could not be found.
It's not your specific extensions. It happens me too with my XP with
some standart dll (but not with all !!!)
i.e. mail of S. Kang at 28/10 :
"PHP-WIN] PHP 5.1 no longer connect to MySQL 5.0.15 using php_mysql.dll?"
I dont have the solution yet, but if someone have it, i'm interesting
too ;-)
Maybe your version of Apache AND/OR PHP ?
i tried with Apache 2.0.54 and PHP4.41, 5.0.5, and since this morning
with 5.1.1 the same...
--
nico
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************
--- End Message ---
--- Begin Message ---
> Here's my piece: I was running MySQL 4.0.2x and PHP 5.0.1. Upgraded
> MySQL to 5.0.15 and found PHP no longer working (Apache 2.0.5x).
> Upgraded PHP to 5.0.5 and copied the included libmysql.dll to the
> system32 directory and everything appears to be running just fine.
Please don't thread-jack. The problem I'm having is loading a custom extension
on windows 2003 server that works fine on windows 2000.
I can see a perfectly good thread a few posts below this that is related to
using MySQL with PHP 5.
If anyone has had experience with the extension issue I'd love to hear from you.
Thanks.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************
--- End Message ---
--- Begin Message ---
If other extensions are loading, like php_curl or whatever, then I'm
assuming that your environment PATH is set to include c:\php. Other
than obvious permission issues, if you are running IIS, it wouldn't hurt
to make sure that the dll is allowed.
-----Original Message-----
From: David Felton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 29, 2005 9:37 AM
To: [email protected]
Subject: Custom PHP extensions not woring on windows 2003 server
Hi guys. I have a custom-written PHP extension which is working great on
my windows 2000 test server. When I try and run it on the windows 2003
server production server the extension faisl to load. I get a message
along the lines of
Application popup: Warning : Unknown(): Unable to load dynamic library
'c:\php\extensions\php_SCOGPAAK.dll' - The specified module could not be
found.
In the event viewer. The standard extensions that come with PHP work
fine however.
Can anyone shed any light on this?
Many thanks.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************
--- End Message ---