benji87 Posted September 4, 2010 Share Posted September 4, 2010 Hi Guys, Been a while since I've been on the forums but I have a really bugging problem that I've never seen before. I have two websites one of which is http://www.get-xbox-kinect.co.uk which I have used the same php script for. The script fetches a link from the database when executed by the user clicking a external link. I have had reports from users saying that when they hit a link the external page loads up but at the same time an alert window appears saying 'not enough memory at line xx'. For some reason it seems to be a different line number for different users too. I can only confirm this happens in IE8 but I guess it will probably do the same thing in IE6 and 7 too. It is not an issue however in Firefox or Safari. Here is my exit link script <?php include('./globals.php'); $affiliate = $_GET['affil']; $user_ip = $_SESSION['user_ip']; date_default_timezone_set('Europe/London'); $date = date('D, d M Y H:i:s'); $entry_url = $_SESSION['referer']; $result = mysql_query("SELECT url FROM affiliate WHERE affiliate = '". $affiliate ."'") or die(mysql_error()); $row = mysql_fetch_array($result); $exitlink = $row[0]; if($user_ip == '00.00.000.00') { header("Location: " . $row["url"] . ""); } else { $result = mysql_query("UPDATE affiliate SET clicks = clicks +1 WHERE affiliate ='$affiliate'") or die(mysql_error()); mysql_query("INSERT INTO affiliate_clicks (affiliate, user_ip, date, entry_url) VALUES('$affiliate', '$user_ip', '$date', '$entry_url') ")or die(mysql_error()); header("Location: " . $row["url"] . ""); }; ?> Not sure if it actually has anything to do with this script or it's something else at play. I'm sure someone must have come across this problem before. Any help would be much appreciated! Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/ Share on other sites More sharing options...
pornophobic Posted September 4, 2010 Share Posted September 4, 2010 I think it's something else at play. Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/#findComment-1107168 Share on other sites More sharing options...
rwwd Posted September 4, 2010 Share Posted September 4, 2010 Hi there benji87, Pop error reporting on to see if there is anything being flagged up as an error at all? if($user_ip == '00.00.000.00') { header("Location: " . $row["url"] . ""); } else { $result = mysql_query("UPDATE `affiliate` SET `clicks` = 'clicks +1' WHERE `affiliate` = '".$affiliate."' ") or die(mysql_error()); mysql_query("INSERT INTO `affiliate_clicks` (`affiliate`, `user_ip`, `date`, `entry_url`) VALUES('".$affiliate."', '".$user_ip."', '".$date."', '".$entry_ur."') ")or die(mysql_error()); header("Location: " . $row["url"] . ""); exit;//kill the script here as there is nothing else going, but always good to put an exit after a header };//Whats this extra semi colon doing?? ?> I changed the concatenations too, so that it matches up with the top half of the script, other than that everything seems fine to me. Cheers, Rw Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/#findComment-1107169 Share on other sites More sharing options...
benji87 Posted September 4, 2010 Author Share Posted September 4, 2010 I've looked at the link pornophobic but I can't see how that would be connected as it's not opening up an additional program it's simply opening a link. rwwd I've updated my script with what you posted. The semi colon is to close the else statement? I'm still having the same issue though Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/#findComment-1107173 Share on other sites More sharing options...
pornophobic Posted September 4, 2010 Share Posted September 4, 2010 http://www.howtogeek.com/forum/topic/out-of-memory-at-line-56-explorervista http://en.allexperts.com/q/Microsoft-Internet-Explorer-1054/Message-memory-line-174.htm http://chikamuna.com/out-of-memory-at-line-93-110-82-109-85-facebook-error/ http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/80f2ddd2-1072-4305-9272-509c03b043f9 http://forums.techguy.org/web-email/591447-ie-out-memory-line-56-a.html It's an IE issue and it's not only when a new program is running, but it can happen when trying to use a program that's already running like it says on the KB article. Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/#findComment-1107175 Share on other sites More sharing options...
benji87 Posted September 4, 2010 Author Share Posted September 4, 2010 Thanks for all the articles. It's a real problem as I can't influence my users choice of browser etc and I need to fix the problem! As many users especially my target market may become concerned if an error like that pops up and are likely to close down the window and go elsewhere. Does anyone know of any fix I can try my end to stop this happening? Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/#findComment-1107178 Share on other sites More sharing options...
sasa Posted September 4, 2010 Share Posted September 4, 2010 error is in file jquery.min.js on line12 in IE8x64 try to move this file in head part Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/#findComment-1107179 Share on other sites More sharing options...
rwwd Posted September 4, 2010 Share Posted September 4, 2010 Hi there Benji87, The semi colon is to close the else statement? Not needed. if(conditions){ //case if true } else{ //case if false } if error reporting was on, you would have an error flagged stating "unxepected '";" on line whatever. Though the fix seem's be have been shown from the KB posts & tweeking the jquery stuff, not a script error as previously thought. Cheers, Rw Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/#findComment-1107199 Share on other sites More sharing options...
benji87 Posted September 4, 2010 Author Share Posted September 4, 2010 I fixed it guys. I needed to upgrade to the latest version of jquery. I was using an older version in order for a certain plugin to work. Quote Link to comment https://forums.phpfreaks.com/topic/212514-out-of-memory-on-line-xx-ie-issue/#findComment-1107233 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.