[PHP] Re: post & redirect
if you redirect the browser to a new page, once that new page loads up, any POST or GET variables from the previous page will be replaced with the new "redirected to" page. Jem777 wrote: If I submit a post and then, serverside, I redirect the request to another page, do the post variables still live in the new page? Thanks, Jem777 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Images - Converting TIFF Format?
http://www.imagemagick.org/script/index.php The Disguised Jedi wrote: Is there a quick way to convert a TIFF format picture to a GIF quickly? I can only find support for GIFs in PHP, but maybe I'm missing something. I have a client running a photography business, and I have designed an image watermark and resizing engine, and a server to check the request, serve the file, and then delete it. I mainly made this to help him run the site himself, since he isn't very good with Photoshop, and can't watermark the images (I shouldn't say that...he probably could, but not very fastbut anyway...). This is all working fine and dandy, but the system will only accept GIF format. His images are all raw scans in TIFF format. This means that he has to open the image in Photoshop, resize it, and convert it to a GIF. I think he can do this himself, but I'd like to make it even simpler, which is why I'm writing. I need a quick way, preferably in PHP, but it doesn't have to be, to convert large batches of TIFF format images to GIF. Does anyone know of a way to do this? Thanks for reading, and for your responses in advance... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mailing lists
Sonic Mail Pro is very usable, and very easy to setup. I have some very non-technical clients using it effectively. http://www.sensationdesigns.com/products/scripts/smpro/index.php Clive Zagno wrote: Hi does anyone use any cool php mailing list software. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Last visitors (SOLVED?)
just do a select limit 11 display up to 11... if less then 11, you might want to display them anyways. you should be able to deal with up to a million + records, so select will stay quick, esp if you make the right fields indexed. you can take care of purging via crons... you might find you want the history in the end... -m Ryan A wrote: Hey! I think I solved this: select 11 latest visitors count to see if it returned 11 records, if (count == 11){ get the oldest (of the 11) visitors time delete everything from that record and older than that } else{} Pros: max 2 queries If i am missing anything or you see any problem in my logic, please point it out. Thanks, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mcrypt_generic_init(): Iv size incorrect
So this solution does work, however it doesn't answer the question as to why this is occurring in the first place. Rather then finding a work around for it, I'd like to know why PHP / mcrypt is throwing the error. Is it an issue in the library itself? Tom Rogers wrote: Hi, Saturday, April 9, 2005, 3:35:21 AM, you wrote: MH> I have an odd php issue with mcrypt. MH> I'm getting a lot of this type of error, but only sometimes: MH> mcrypt_generic_init(): Iv size incorrect; supplied length: 0, needed: 32 MH> (note, the "supplied length: 0" is not always the same. sometimes it is MH> 1, 16, etc). MH> It doesn't seem to affect the decoding of the file, but it is throwing a MH> notice in to my error log. I've tried doing this: MH> @mcrypt_generic_init($this->td, $key, $iv) MH> but that doesn't stop it from throwing an error. MH> The only thing I can think is that I have MH> mcrypt_module_close($this->td) MH> commented out because my code was dying with it... MH> System: MH> Linux w/ Apache 1.3.31 MH> PHP Version 4.3.4 MH> libmcrypt version 2.5.7 MH> Suggestions? I do this to set a zero iv $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); $key = substr($secret, 0, mcrypt_enc_get_key_size ($td)); $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv); mcrypt_generic_init ($td, $key, $iv); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mcrypt_generic_init(): Iv size incorrect
I get the following error when I try your suggestion: Unknown error type: [8] Undefined variable: iv Code: $key = md5($this->_cypherkey); $key = substr($key, 0, mcrypt_enc_get_key_size($this->td)); $iv_size = mcrypt_enc_get_iv_size($this->td); #$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $iv = pack("a".$iv_size,$iv); Tom Rogers wrote: Hi, Saturday, April 9, 2005, 3:35:21 AM, you wrote: MH> I have an odd php issue with mcrypt. MH> I'm getting a lot of this type of error, but only sometimes: MH> mcrypt_generic_init(): Iv size incorrect; supplied length: 0, needed: 32 MH> (note, the "supplied length: 0" is not always the same. sometimes it is MH> 1, 16, etc). MH> It doesn't seem to affect the decoding of the file, but it is throwing a MH> notice in to my error log. I've tried doing this: MH> @mcrypt_generic_init($this->td, $key, $iv) MH> but that doesn't stop it from throwing an error. MH> The only thing I can think is that I have MH> mcrypt_module_close($this->td) MH> commented out because my code was dying with it... MH> System: MH> Linux w/ Apache 1.3.31 MH> PHP Version 4.3.4 MH> libmcrypt version 2.5.7 MH> Suggestions? I do this to set a zero iv $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); $key = substr($secret, 0, mcrypt_enc_get_key_size ($td)); $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv); mcrypt_generic_init ($td, $key, $iv); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mcrypt_generic_init(): Iv size incorrect
Do you do this on the encryption or the decryption section or both? Tom Rogers wrote: Hi, Saturday, April 9, 2005, 3:35:21 AM, you wrote: MH> I have an odd php issue with mcrypt. MH> I'm getting a lot of this type of error, but only sometimes: MH> mcrypt_generic_init(): Iv size incorrect; supplied length: 0, needed: 32 MH> (note, the "supplied length: 0" is not always the same. sometimes it is MH> 1, 16, etc). MH> It doesn't seem to affect the decoding of the file, but it is throwing a MH> notice in to my error log. I've tried doing this: MH> @mcrypt_generic_init($this->td, $key, $iv) MH> but that doesn't stop it from throwing an error. MH> The only thing I can think is that I have MH> mcrypt_module_close($this->td) MH> commented out because my code was dying with it... MH> System: MH> Linux w/ Apache 1.3.31 MH> PHP Version 4.3.4 MH> libmcrypt version 2.5.7 MH> Suggestions? I do this to set a zero iv $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); $key = substr($secret, 0, mcrypt_enc_get_key_size ($td)); $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv); mcrypt_generic_init ($td, $key, $iv); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mcrypt_generic_init(): Iv size incorrect
I have an odd php issue with mcrypt. I'm getting a lot of this type of error, but only sometimes: mcrypt_generic_init(): Iv size incorrect; supplied length: 0, needed: 32 (note, the "supplied length: 0" is not always the same. sometimes it is 1, 16, etc). It doesn't seem to affect the decoding of the file, but it is throwing a notice in to my error log. I've tried doing this: @mcrypt_generic_init($this->td, $key, $iv) but that doesn't stop it from throwing an error. The only thing I can think is that I have mcrypt_module_close($this->td) commented out because my code was dying with it... System: Linux w/ Apache 1.3.31 PHP Version 4.3.4 libmcrypt version 2.5.7 Suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php