Jump to content

Out of memory on line XX IE Issue


benji87

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.