|
I am just learning PHP. I purchased an auctin in PHP. I have my site on desktop and imported the database into mysql. iI downloaded a triad called wamps with apache,PHP and MySQL. Problem is when I try to view in desktop I get folowing errors. I reviewed postings and problem should be that I didnt put the open session tag before everything but I did as you can see. below the errors. I think it is either something to do with the <? or config or install.php but cant figuew out what.
Can anyone give me an idea how to get it running so I can start to learn to code?
thanks
ERRORS:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\wamp\www\1-fleamart\index.php:2) in c:\wamp\www\1-fleamart\index.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\wamp\www\1-fleamart\index.php:2) in c:\wamp\www\1-fleamart\index.php on line 3
Fatal error: Call to undefined function mysql_connect() in c:\wamp\www\1-fleamart\config\config.php on line 7
my CODE
<p align="center"><?
session_start();
if (!file_exists("config/config.php")) header ("Location: install.php");
if ($_GET['option']=="logout") {
session_destroy();
header("Location: index.php");
}
include_once ("config/config.php");
### do the cron job if selected to run from phpprobid
if ($setts['cron_job']==2) {
$manualCron = TRUE;
include_once ("cron/cron1.php");
}
$getFeatItems=mysql_query("SELECT * FROM probid_auctions WHERE
hpfeat='Y' AND active=1 AND closed=0 AND deleted!=1 ORDER BY rand() LIMIT 0,".$layout['max_feat_hp']." ");
$nbFeatItems=mysql_num_rows($getFeatItems);
if ($layout['nb_feat_hp']>0) {
$j=floor($nbFeatItems/$layout['nb_feat_hp']);
$j++;
} else $notfeat="Y";
$fct=0;
$id = array();
$name = array();
$pic = array();
$maxbid = array();
$enddate = array();
$currency = array();
while ($hpFeatured=mysql_fetch_array($getFeatItems)) {
$id[$fct] = $hpFeatured['id'];
$name[$fct] = $hpFeatured['itemname'];
$pic[$fct] = $hpFeatured['picpath'];
$maxbid = array ($fct => $hpFeatured['maxbid']);
$enddate = array ($fct => $hpFeatured['enddate']);
$currency[$fct] = $hpFeatured['currency'];
$fct++;
}
include ("themes/".$setts['default_theme']."/header.php");
include ("themes/".$setts['default_theme']."/mainpage.php");
include ("themes/".$setts['default_theme']."/footer.php"); ?>
<a href="http://click.linksynergy.com/fs-bin/stat?id=dLxMoVOwIY4&offerid=65617.10000016&type=4& subid=0">
<IMG border=0 alt="10% Off All Toys @ eToys" src="images/eToys.jpg" align="right" width="468" height="59"></a><IMG border=0 width=1 height=1 alt=banner src="http://ad.linksynergy.com/fs-bin/show?id=dLxMoVOwIY4&bids=65617.10000016&type=4&sub id=0">
Last edited by fleart1; 11-02-2004 at 06:08 PM..
|