As the title suggests, I am receiving an error when loading my website, Minecraft-Seeds.net It runs using the AV Arcade script, and has been running fine without any hitches for the past year and a half. Recently, the website has been giving me the memory error, and we have made absolutely no changes to the code and even restored previous backups of the website. Our visits have not gone up crazily to explain an increase in resource usage, as we have had a low month this month with around 300,000 visits.
The popular suggestion here Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php does not work, as my script has an actual issue which is causing it to use much more memory than I have.
I have looked through the code and am not sure as to where exactly I should begin looking. The mySQL queries appear to have LIMITs on them, so I'm not sure what is causing the error.
If you go to the website right now, it will give you the following place as the origin of the error:
/home/mineseed/public_html/config.php on line 39
This line of code is as follows$new_plays = 4;
And I have tried commenting it out, and it results in the error simply jumping around my site to line after line of code, with no clear solution in sight.
Any help is greatly appreciated.
EDIT I've added the config.php file
<?php
// mySQL information
$server = 'localhost'; // MySql server
$username = 'user'; // MySql Username
$password = 'pass'; // MySql Password
$database = 'database'; // MySql Database
// The following should not be edited
$con = mysql_connect("$server","$username","$password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("$database", $con);
//mysql_query("UPDATE ava_games SET height='300' WHERE height='0'") or die (mysql_error());
//
$sql = mysql_query("SELECT * FROM ava_settings");
$row = mysql_fetch_array($sql);
$site_name = $row['site_name'];
$site_description = $row['site_description'];
$site_keywords = $row['site_keywords'];
$site_url = $row['site_url'];
$seo_on = $row['seo_on'];
$template_url = $row['template_url'];
$max_results = $row['max_results'];
$image_height = $row['image_height'];
$image_width = $row['image_width'];
$adsense = $row['adsense'];
$cat_numbers = $row['cat_numbers'];
$email_on = $row['email_on'];
$add_to_site = $row['add_to_site'];
$plays = $row['plays'];
$language = $row['language'];
$featured = $row['featured_games'];
$play_limit = $row['play_limit'];
$adsense_id = $row['adsense_id'];
$new_plays = 4;
// Convert super globals
if (phpversion() >= '5.0.0')
{
$HTTP_POST_VARS = ($_POST);
$HTTP_GET_VARS = ($_GET);
}
?>