PDA

View Full Version : Problem pls help me


netaxis
11-09-2005, 06:24 AM
Hi,

7 days back we launched a site ( 13 pages site, rendering image online and daily now there are 8,000+ image rendered ) and within one day google index the main and we got few traffic immd.. and also for few keywords in google we are in top 10 and top 1

now site is getting around less then 1000 per day

ok here is the problem

today 2 times my host disabled the site because i am using more resources on my reseller account

now site is disabled

site uses php and imagemagick or GD ( i am not sure imagemagick or GD )

does not use database

rendered images are stored in server ( every few hours i am deleteing from ftp but i know this can be done by script ) i dnt think so this causes the problem

if i optimize php code does this problem will be solved or i need to try dedicated server

how to optimize the code and how to know the loops in script

Please help
Jai

netaxis
11-09-2005, 06:55 AM
i have a folder name called " inc " in that there is prepend.inc.php

here is a code for that

<?
session_start();
error_reporting(E_ALL ^ E_NOTICE);
$base = dirname(__FILE__);
$libpath = "$base/lib";

// Config
$cfg = parse_ini_file("$base/../conf/config.ini", true);
if (!count($cfg)) { die("Cannot parse config.ini file"); };
foreach ($cfg as $cfgk=>$cfgv)
{
foreach ($cfgv as $cfgfk=>$cfgfv)
{
$cfgfk = strtolower($cfgfk);
$cfgf["{$cfgk}/{$cfgfk}"] = $cfgfv;
}
}
$cfg = array_merge($cfg, $cfgf);
?>



does any session problem here ?

mattis2k
11-10-2005, 11:41 PM
If you are rendering images on the fly using the GD then these images will be stored in memory, if you are getting loads of hits then you'll soon use up all the allocated memory for your domain..

Velox Letum
11-11-2005, 12:10 AM
I'd recommend outputting this images as files, then using staticly linked images on the page. If they need updated, then simply write a page to update to your specifications.