Re: Fatal Error: Allocated memory size problem...

From: Date: Tue, 06 Mar 2007 07:23:47 +0000
Subject: Re: Fatal Error: Allocated memory size problem...
References: 1 2 3  Groups: php.windows 
Request: Send a blank email to php-windows+get-27559@lists.php.net to get a copy of this message
Hartleigh Burton wrote:
You were in the right area thats for sure. I had a look through where the script was ending a bit closer... there is a function i use to make the sql query safe for inserts if magic quotes is not on thats something like this... function WalkAddSlashes(&$item, $key) { if(!is_array($item)) { $item = addslashes($item); $item = str_replace("\"",""",$item); } }
I'm happy you solved your problem, but I think it's worth pointing out that your function is flawed if the intention is to make the data safe for inclusion in a MySQL query. Addslashes() doesn't do anywhere near enough, you should be using mysql_real_escape_string() instead. -Stut

« previous php.windows (#27559) next »