Emcrypted data insert into sql database issue

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Emcrypted data insert into sql database issue

Postby Elethian » 07. February 2008 16:08

Hi all ,

Hoping to find an answer/solution to this one fast. I have certain data that needs to be encrypted. The encryption is working fine , but importing that data into an SQL database doesn`t seem to work.

It seems that from the 11.000+ records only 750 are being imported.
The same data not encrypted goes in without any issues.

I am suspecting it is because of weird characters in the encrypted string. Is there a function available to have the data imported into the database , or do i have setup my database incorrect. I am using a longtext field to enter the value in.

Gonna keep looking around and experimenting , cause i hope to have the answer soon , kinda time critical project i am working on.

Anywayz allready thnx for the help to those who reply.
Elethian
 
Posts: 4
Joined: 31. January 2008 18:59

Postby sari42 » 07. February 2008 16:38

try a blob field for encrypted data
Last edited by sari42 on 07. February 2008 16:42, edited 2 times in total.
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby Elethian » 07. February 2008 16:39

tried blob as well , still only inserts certain records(same ammount succesfull as when using longtext field)
Elethian
 
Posts: 4
Joined: 31. January 2008 18:59

Postby sari42 » 07. February 2008 16:43

p.s.
or store encode64($yourEncryptedString)
- but it's a waste of space.
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby Elethian » 07. February 2008 17:06

Thnx , just found that one on the internet. Seems to be besides waste of space also tripling execution time of the script :).

But it will have to do till i find a faster way.
Elethian
 
Posts: 4
Joined: 31. January 2008 18:59

Postby sari42 » 07. February 2008 20:04

if the offending char is "#0" try and str_replace it with a special token
or search for a encrypt funktion that avoids such issues in the first place.
sari42
 
Posts: 800
Joined: 27. November 2005 18:28


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 226 guests