Fatal error: Allowed memory size of 8388608 bytes exhausted.

Discussion in 'Co-op Advertising Network' started by Nintendo, Nov 2, 2005.

  1. #1
    Some times I get...

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4096001 bytes) in /home/virtual/site2/fst/var/www/html/ad_network_427.php on line 18

    while some times the ads do show up!

    The ad_network_ads_427.txt file is 90K.

    The bottom of the php file that I'm adding the code to looks like

    <P><B>
    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network_427.php');
    	echo $ad_network;
    ?>
    </B></center>
      </body>
    </html>
    
    <?php
    	}
    }
    
    ?>
    
    Code (php):
    when it's added, a wiki script. Would adding eight megs of memory get rid of the error? The weird thing is that some times it works and some times it doesn't, while it always works when it comes through perl on SSI pages!
     
    Nintendo, Nov 2, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    There is nothing in the ad_network PHP script that would use anywhere remotely close to that much. Maybe SSI itself is causing memory usage weirdness or something...
     
    digitalpoint, Nov 2, 2005 IP
  3. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #3
    It was the line mentioned in the error that was causing it.

    Changing line 18 from

    $string = fread($handle, 4096000);
    to
    $string = fread($handle, 2096000);

    got rid of the error. I think the original number was making it try to allocate too much memory even though it didn't even need close to that much!
     
    Nintendo, Nov 3, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Hmmmm... strange. I'm going to have a look at that. I didn't think PHP allocated the full amount if it didn't need it.
     
    digitalpoint, Nov 3, 2005 IP
  5. sixty6

    sixty6 Well-Known Member

    Messages:
    1,748
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    190
    #5
    Hey shawn I did the same change that nintendo mentioned and it still showed an error. Here is what nintendo said:

    Well instead of placing:
    $string = fread($handle, 2096000);

    I placed:
    $string = fread($handle, 209600); <----- With a 0 removed

    But then I noticed that my weight went down on my account, is there any way you can fix that?
     
    sixty6, Feb 7, 2006 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    Try lowering the number even more. If that doesn't fix it, give your server more memory for php, like 16 megs.
     
    Nintendo, Feb 7, 2006 IP
  7. sixty6

    sixty6 Well-Known Member

    Messages:
    1,748
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    190
    #7
    Nintendo, I said the problem was fixed, but the weight in my account went down by some points. So now it isn't a server problem, it's a co-op advertising problem :)
     
    sixty6, Feb 7, 2006 IP
  8. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #8
    er your server doesn't effect your weight, PR, Google listings...do!!!! :D

    To try to prove that effected it, add the 0 back and see if it goes back up.
     
    Nintendo, Feb 7, 2006 IP
  9. sixty6

    sixty6 Well-Known Member

    Messages:
    1,748
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    190
    #9
    If I add the 0, it shows that error!! Stop messing with me nino!
     
    sixty6, Feb 7, 2006 IP
  10. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #10
    How much weight do you get for

    redscowl-bluesingsky.us ??!!!

    New site, and just a few hundred pages indexed, shouldn't generate very much weight, if any!!!
     
    Nintendo, Feb 7, 2006 IP
  11. sixty6

    sixty6 Well-Known Member

    Messages:
    1,748
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    190
    #11
    actually i only got around 2 to 3 hundred in weight, it keeps changing all the time. It should go up soon, since I am going to add the code to more sites!
     
    sixty6, Feb 7, 2006 IP
  12. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #12
    Bah!!!!! That's good for a one month old site, so don't complain about it droping!!! sheese!!!!! :D
     
    Nintendo, Feb 7, 2006 IP
  13. sixty6

    sixty6 Well-Known Member

    Messages:
    1,748
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    190
    #13
    lol, I'm sorry nintendo, but for us poor people, we do appreciate our 100 weight! Unlike you..
     
    sixty6, Feb 7, 2006 IP
  14. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #14
    I got domains that are much older that have....ZERO weight!!! grrrr!!!!
     
    Nintendo, Feb 7, 2006 IP
  15. sixty6

    sixty6 Well-Known Member

    Messages:
    1,748
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    190
    #15
    They probably have all that Blackhat, so they got banned from Google!! lol
     
    sixty6, Feb 7, 2006 IP
  16. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #16
    :D:D But, but, but, it's not like it's wrong to have them be duplicate content, right. :D:D
     
    Nintendo, Feb 7, 2006 IP
  17. sixty6

    sixty6 Well-Known Member

    Messages:
    1,748
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    190
    #17
    of course not nintendo, Google will give PR10 to websites with duplicate content for sure! I mean what kind of SEO expert are you if you didn't know that?
     
    sixty6, Feb 7, 2006 IP