faqts : Computers : Programming : Languages : PHP : Common Problems : Encryption

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 9 people (67%) answered Yes
Recently 5 of 8 people (63%) answered Yes

Entry

I encode an attachment using "$encoded_attach = chunk_split(base64_encode($contents));" on a new ISP and it emails a corrupted file?

Dec 20th, 2000 00:46
Carl Rodakowski,


Finally found the answer to my own question....

I needed to set the following variable before executing the encryption:

set_magic_quotes_runtime(0);

The file was corrupted on the new ISP since they have this set to 1 on 
their system and the old ISP had it at 0.  This does not parse the 
encryped file with slashes for special characters.