Server Failure From Error Log Filling 48 Gig Hard Drive

[color=black]We upgraded for [/color][color=black]Upgrade 4.0.3 - 4.1.1 a few days ago. We run cs cart on a VPS with 60 gig of HD space available. After the upgrade we had used 12 gigs with 48 gigs free. Within 2 days the HD filled up and server became unresponsive. The host server administrator said a script there was a 48GB error log.[/color]



[color=black]The error log was deleted and we disabled an addon we activated after the upgrade believing it the be the cause of the error. The HD filled up again and the server became unresponsive within 48 hours[/color]



[color=black]Our hosting service administrator identified the problem as….[/color]



[color=black]Quote[/color]:



[color=black]“[/color][color=black]It appears your site has some coding issues and the error log is getting flooded with errors when you run the php scripts. The error logs first entry was from 2 days ago. Since that time there have been X errors. Which is enough to consume 49GB of disk space.[/color]



[color=black]I have cleared the file and you can once again access the server. Below you will find the last errors written to the error log so you can correct those and stop the file from becoming an issue again.



[24-May-2014 12:15:02 America/Chicago] PHP Notice: Undefined variable: full_package_size in /home/signlett/public_html/app/Tygh/Shippings/Shippings.php on line 254

[24-May-2014 12:15:02 America/Chicago] PHP Notice: Undefined variable: full_package_size in /home/signlett/public_html/app/Tygh/Shippings/Shippings.php on line 254

[24-May-2014 12:15:02 America/Chicago] PHP Notice: Undefined variable: full_package_size in /home/signlett/public_html/app/Tygh/Shippings/Shippings.php on line 254

[24-May-2014 12:15:02 America/Chicago] PHP Notice: Undefined variable: full_package_size in /home/signlett/public_html/app/Tygh/Shippings/Shippings.php on line 254

[24-May-2014 12:15:02 America/Chicago] PHP Notice: Undefined variable: full_package_size in /home/signlett/public_html/app/Tygh/Shippings/Shippings.php on line 254

[24-May-2014 12:15:02 America/Chicago] PHP Notice: Undefined variable: full_package_size in /home/signlett/public_html/app/Tygh/Shippings/Shippings.php on line 254

[24-May-2014 12:15:02 America/Chicago] PHP Notice: Undefined variable: full_package_size in /home/signlett/public_html/app/Tygh/Shippings/Shippings.php on line 254”[/color]



[color=black]--------------------------------------------------------------------------------------------------------------------------------------[/color]



[color=black]Lines 250-254 show the following [/color]



[color=black]// Decrease the current product amount in the global package groups[/color]



[color=black] foreach ($package_products_pack as $cart_id => $amount) {[/color]



[color=black] $package_products['products'][$cart_id] -= $amount;[/color]



[color=black] }[/color]



[color=black] $package_products['amount'] -= $full_package_size;[/color]

------------------------------------------------------------------------------------------------------------------------



[color=black]Our site is currently running but not for long. We need this fixed asap. Any advice on how to fix this.[/color]

To fix the issue, please add the following line:



$full_package_size = 0;




before this one:



while ($package_products['amount'] > 0) {

Great… that looks like it fixed the problem. Thanks for the help.