I have moderate webdesign experience, but no real experience working with databases. We paid a company to design our website for us, and they pretty much screwed us. (we are currently in a lawsuit with them) We have the site they built, but I am having major issues either connecting to our database or file dirrectory problems I'm not exactly sure which. If you go to our site that they have one their server things look fine. http://s148851080.onlinehome.us/user/index.php But the one I have is not working so well. My first guess is that somehow the directories are not right. Where they have /user/index.php all the site images are outside of the user directory. nothing seems to be pulling up with the site other than empty image boxes. If you click on a link that stays in the site it says it can't find it. I've been trying to figure this out for days and don't have a clue what is wrong. If someone could help me out it would save my brain from exploding. This is what our site is looking like at this point.
http://www.roach-clip.com
need help connecting to database or directory issues
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Did they give you the SQL dump along with the site code? Have you inserted the SQL dump into your database? Have you checked that your database connection details are correct? Can you decipher any of the file system scripts to see where the script is looking for images/files/etc? Please reply so we can see if there is something we can help with.
Database problems
Yes they did give us a Mysqldump, and yes I dumped it into the database. I'm almost positive my connection details are correct. There was a file connection.php that I entered the connection info into. As far as the scripts are concerned they are looking for iages in .../site_images/.... my main index.php file is in .../user/index.php This is why I think it can't find the images. But as far as the database goes I don't know if there are more files I should enter database info into. If there is I can't find it. I have a directory with database drivers, and adodb-php4.inc.php type files. It's overwhelming for me as I have never tried to work with a site of this size. Thanks for any advice or information you might be able to give.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Are all the images actually in your file structure? Looking at the source of the dev site they built it looks like your images should be in folder"../site_images/category_images/". If so, there should be an easy edit to tell the script to point to that folder for the images. Without seeing your code or actually looking into your project it is difficult to assess why you are getting the errors you are getting. I am sure it is a simple fix if the developer coded your project correctly.
On a side note, somebody actually charged you money for that horrible coding? I was looking at the source and they did a really terrible job, IMO.
On a side note, somebody actually charged you money for that horrible coding? I was looking at the source and they did a really terrible job, IMO.
problems
Yes all the images are there, and there are actually many images directoories. (ad_images, admin_images, banners, category_images, clip, homeimages, product_images, upload_images) all are withing the "../site_images" directory. I was actually able to get the site to work last night, but I couldn't duplicate the results. I could send you some of the code if that would make it easier to help. Thanks.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
index.php
twigletmac | Please use
twigletmac | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]Code: Select all
<?php include_once('../base.php');?>
<?php include_once('../business/clscategory.php');?>
<?PHP
include_once('../business/clsutility.php');
$util = new Utility;
$textrs = $util->SelectRecord('dynamic_text','TextDescription','Home Page Text');
$hometext = $textrs->fields['DynamicText'];
?>
<HTML>
<HEAD>
<?PHP
include('title.php');
?>
<?php
include_once('../business/clsaffiliate.php');
if( $_SESSION["affiliate_id"] != ''){
$affiliate = new Affiliate();
$dir_name = $affiliate->getAffiliateDirecory($_SESSION["affiliate_id"]);
$css = $affiliate->getAffiliateDirecory($_SESSION["affiliate_id"]);
}else{
$dir_name = 'user';
$css = 'css';
}
echo "<link rel=stylesheet href='../$css/style.css'>";
?>
<link rel=stylesheet href='../$css/style.css'>
<script language="JavaScript" src="../js/script.js"></script>
<script language="JavaScript" src="../js/javascript.js"></script>
<link REL="SHORTCUT ICON" HREF="../site_images/favicon.ico">
</HEAD>
<BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<!----- Starts of Main Table ----->
<TABLE width="1002" height="100%" border=0 align='center' cellPadding=0 cellSpacing=0 bgcolor=#FFFFFF>
<TBODY>
<TR>
<TD align="center" valign="top">
<!------- Starts of Header Structure Table -------->
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
<TR>
<TD align='left' valign='top' >
<!---------------------------- Header Include (Starts) ---------------------------->
<!-------- Starts of Header IFRAME Table ----->
<iframe width='100%' height="101" name="headerframe" scrolling="no" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0" BORDERCOLOR="#FFFFFF" src="../user/header.php" >
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<!-------- Ends of Header IFRAME Table ----->
<!---------------------------- Header Include (Ends) ---------------------------->
</TD>
</TR>
</TABLE>
<!------- Ends of Header Structure Table -------->
<!------- Starts of Inside Structure Table -------->
<TABLE width="100%" height='100%' border='0' cellPadding=0 cellSpacing=0>
<TR>
<TD align='left' valign='top' width='169'>
<!------- Starts of Left Structure Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" height='100%' background='../site_images/bgleft.jpg'>
<TR>
<TD align='left' valign='top' >
<!---------------------------- Left Include (Starts) ---------------------------->
<?PHP
include('left.php');
?>
<!---------------------------- Left Include (Ends) ---------------------------->
</TD>
</TR>
</TABLE>
<!------- Ends of Left Structure Table -------->
</TD>
<TD align='center' valign='top' width='611'>
<!------- Starts of Center Structure Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0 width='100%'>
<?php
$getImage = new Utility();
$rs = $getImage->SelectRecord('headerfooterimages','Location',1);
?>
<TR>
<?php
if($rs->fields["URL"])
{
?>
<TD style='padding-left:10px' colspan='2' style='padding-top:8px' align='center' valign='top' width='590' height='197'><A HREF="<?=$rs->fields["URL"]?>" target='_blank'><IMG SRC='../site_images/homeimages/<?=$rs->fields['ImageName']?>' width='590' height='197' border='0'></A></TD>
<?php
}
else
{
?>
<TD style='padding-left:10px' colspan='2' style='padding-top:8px' align='center' valign='top' width='590' height='197'><IMG SRC='../site_images/homeimages/<?=$rs->fields['ImageName']?>' width='590' height='197' border='0'></TD>
<?php
}
?>
</TR>
<TR>
<TD align='center' valign='top' style='padding-top:8px'>
<!------- Starts of Tshirt Of The Day Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0 width='279'>
<TR>
<TD align='left' valign='top'><IMG SRC='../site_images/titletshirt.jpg'></TD>
</TR>
<TR>
<TD align='left' valign='top' height='295' background='../site_images/titletshirtbg.jpg'>
<!------- Starts of Inside Tshirt Of The Day Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0>
<TR>
<TD align='left' valign='top' colspan='2' style='padding-top:30px; padding-left:7px'>
<!------- Starts of DynamicImage Table -------->
<TABLE cellspacing='0' cellpadding='0' border='0'>
<TR>
<TD align='left' valign='top'>
<!---------------------------- DynamicPage Include (Starts) ---------------------------->
<!-------- Starts of AD IFRAME Table ----->
<iframe width='272' height="250" name="imageframe" scrolling="no" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"
BORDERCOLOR="#FFFFFF" src="dynamicimage1.php">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<!-------- Ends of AD IFRAME Table ----->
<!---------------------------- DynamicPage Include (Ends) ---------------------------->
</TD>
</TR>
</TABLE>
<!------- Ends of DynamicImage Table -------->
</TD>
<!--<TD ALIGN="center" VALIGN="top" style='padding-top:40px; padding-left:5px'>
<!------- Starts of Price Table -------->
<!-- <TABLE border=0 cellPadding=0 cellSpacing=0>
<TR>
<TD ALIGN="left" VALIGN="top" class='txtnormall0' style='padding-left:8px; padding-top:60px''><b>Price:</B> $17.95</TD>
</TR>
<TR>
<TD ALIGN="center" VALIGN="top" style='padding-top:30px'><A HREF="javascript:void(0)" class='linksheader2'>Xpress</A></TD>
</TR>
<TR>
<TD ALIGN="center" VALIGN="top"><A HREF="javascript:void(0)" class='linksheader2'>Checkout</A></TD>
</TR>
</TABLE>
<!------- Starts of Price Table -------->
<!--</TD>-->
</TR>
<!--
<TR style='padding-top:50px'>
<TD ALIGN="left" VALIGN="top" class='txtnormal' style='padding-left:40px'> << 1 . 2 . 3 . 4 . 5 . 6 >> </TD>
<TD align='center' valign='top' style='padding-left:5px'><A HREF="javascript:void(0)" class='linksheader2'>Pause</A></TD>
</TR>
-->
</TABLE>
<!------- Ends of Inside Tshirt Of The Day Table -------->
</TD>
</TR>
<TR>
<TD align='left' valign='top'><IMG SRC='../site_images/titletshirtbottom.jpg'></TD>
</TR>
</TABLE>
<!------- Endss of Tshirt Of The Day Table -------->
<!------- Starts of Clip Of The Day Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0 width='279' style='margin-top:7px'>
<TR>
<TD align='center' valign='middle'><IMG SRC='../site_images/titleclip.jpg'></TD>
</TR>
<TR>
<TD align='left' valign='top' height='135' background='../site_images/titleclipbg.jpg'>
<!------- Starts of Inside Poll Of The Day Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0>
<TR rowspan=2>
<TD align='left' valign='top' class='txtnormal2' style='padding-left:8px; padding-top:7px'>
<!------- Starts of DynamicImage Table -------->
<TABLE cellspacing='0' cellpadding='0' border='0'>
<TR>
<TD align='center' valign='top'>
<!---------------------------- DynamicPage Include (Starts) ---------------------------->
<!-------- Starts of AD IFRAME Table ----->
<iframe width='123' height="128" name="imageframe" scrolling="no" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"
BORDERCOLOR="#FFFFFF" src="dynamicimage.php">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<!-------- Ends of AD IFRAME Table ----->
<!---------------------------- DynamicPage Include (Ends) ---------------------------->
</TD>
</TR>
</TABLE>
<!------- Ends of DynamicImage Table -------->
</TD>
<TD align='left' valign='top' style='padding-left:4px; padding-top:7px'>
<!------- Starts of dynamic Text Table -------->
<?php
include_once('../business/clsutility.php');
$util = new Utility;
$rs = $util->SelectAllRecords("clip");
?>
<TABLE cellspacing='0' cellpadding='0' border='0'>
<TR>
<TD align='left' valign='top' class='txtnormal2'><A class='linksheader1' HREF="<?=$rs->fields["URL"]?>" target='_blank'><?=htmlentities($rs->fields["Description"])?></A><!--<IMG SRC='../site_images/cliptext.jpg'>--></TD>
</TR>
<TR>
<TD align='right' valign='top' style='padding-top:30px; padding-right:10px'><A HREF='<?=$rs->fields["URL"]?>' class='linksheader00' target='_blank'>watch clip</A></TD>
</TR>
</TABLE>
<!------- Ends of dynamic Text Table -------->
</TD>
</TR>
</TABLE>
<!------- Endss of Inside Poll Of The Day Table -------->
</TD>
</TR>
<TR>
<TD align='left' valign='top'><IMG SRC='../site_images/titleclipbottom.jpg'></TD>
</TR>
</TABLE>
<!------- Endss of Clip Of The Day Table -------->
</TD>
<TD align='center' valign='top' style='padding-top:8px'>
<?php
$getImages = new Utility();
$rs = $getImages->SelectAllRecords('homeimages');
?>
<!------- Starts of Box Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=1 bgcolor='#000000' width='300' height='250'>
<TR>
<?php
if($rs->fields['ImageNameTop']!='')
{
?>
<TD align='left' valign='top' bgcolor='#FFFFFF'><A HREF="<?=$rs->fields["URL"]?>" target='_blank'><IMG SRC='../site_images/homeimages/<?=urlencode($rs->fields['ImageNameTop'])?>' border='0' width='300' height='250'></A></TD>
<?php
}
else
{
?>
<TD align='left' valign='top' bgcolor='#FFFFFF'><IMG SRC='../site_images/spacer.gif' border='0' width='300' height='250'></TD>
<?php
}
?>
</TR>
</TABLE>
<!------- Endss of Box Table -------->
<!------- Starts of San Fransisco Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0 width='300' style='margin-top:8px'>
<TR>
<TD align='left' valign='middle' width='300' height='26' background='../site_images/titlesan01.jpg' style='padding-left:20px' class='txtbold1' style='padding-top:3px'><?=htmlentities($rs->fields["Description"])?></TD>
</TR>
<TR>
<TD align='left' valign='top'><IMG SRC='../site_images/titlesan03.jpg'></TD>
</TR>
<TR>
<TD align='center' valign='top' height='226' background='../site_images/titlesanbg.jpg'>
<!------- Starts of Inside San Fransisco Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0>
<TR>
<?php
if($rs->fields['ImageNameBottom']!='')
{
?>
<TD align='center' valign='top' width='285' height='202' style='padding-top:3px'><A HREF="<?=$rs->fields["URL2"]?>" target='_blank'><IMG SRC='../site_images/homeimages/<?=urlencode($rs->fields['ImageNameBottom'])?>' border='0' width='285' height='200'></A></TD>
</TR>
<TR>
<TD align='right' valign='bottom' style='padding-top:8px'><A HREF="<?=$rs->fields["URL2"]?>" class='linksheader' target='_blank'>check it out</TD>
<?php
}
else
{
?>
<TD align='left' valign='top' bgcolor='#FFFFFF'><IMG SRC='../site_images/spacer.gif' border='0' width='285' height='202'></TD>
<?php
}
?>
</TR>
</TABLE>
<!------- Endss of Inside San Fransisco Table -------->
</TD>
</TR>
<TR>
<TD align='left' valign='top'><IMG SRC='../site_images/titlesanbottom.jpg'></TD>
</TR>
</TABLE>
<!------- Endss of San Fransisco Table -------->
</TD>
</TR>
<TR>
<TD colspan='2' ALIGN="left" VALIGN="top" style='padding-top:8px; padding-bottom:30px'>
<!------- Starts of Last Row Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0>
<TR>
<TD ALIGN="left" VALIGN="top" style='padding-left:7px'>
<!------- Starts Categories Table -------->
<TABLE cellspacing='0' cellpadding='0' border='0' width='420'>
<TR>
<TD align='center' valign='middle'><IMG SRC='../site_images/titlecategories.jpg'></TD>
</TR>
<TR>
<TD align='left' valign='top' background='../site_images/titlecategoriesbg.jpg'>
<!---------------------------- Categories Include (Starts) ---------------------------->
<?PHP
include('categories.php');
?>
<!---------------------------- Categories Include (Ends) ---------------------------->
</TD>
</TR>
<TR>
<TD align='center' valign='middle'><IMG SRC='../site_images/titlecategoriesbottom.jpg'></TD>
</TR>
</TABLE>
<!------- Ends Categories Table -------->
</TD>
<TD ALIGN="center" VALIGN="top" style='padding-left:16px'>
<!------- Starts of Poll Of The Day Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0 width='159'>
<TR>
<TD align='left' valign='top'><IMG SRC='../site_images/titlequestion.jpg'></TD>
</TR>
<TR>
<TD align='left' valign='top' height='446' background='../site_images/titlequestionbg.jpg'>
<!------- Starts of Inside Poll Of The Day Table -------->
<?php
include_once('../business/clsutility.php');
include_once('../business/clsexam.php');
$getQuestion = new Examination();
$rsQuestion = $getQuestion->SelectActiveQuestion();
$Question_ID = $rsQuestion->fields["Question_ID"];
?>
<TABLE border=0 cellPadding=0 cellSpacing=0 width='100%'>
<?php
if($rsQuestion->EOF)
{
?>
<TR>
<TD align='left' valign='top' class='txtnormal2' style='padding-left:18px; padding-top:15px'>No Question Currently.</TD>
</TR>
<TR>
<TD align='right' valign='top' style='padding-right:12px; padding-top:35px'><A HREF="javascript:PopupWindow('pollpopuparchive.php', 500,490);" class='linksheader3'>View Archives</A></TD>
</TR>
<?php
}
else
{
?>
<TR>
<TD align='left' valign='top' class='txtnormal2' style='padding-left:10px; padding-top:7px''><?=stripcslashes(htmlentities($rsQuestion->fields["Question"],ENT_QUOTES))?>?</TD>
</TR>
<TR>
<TD align='left' valign='top' class='txtnormal2' style='padding-left:18px; padding-top:15px'>Choose One.</TD>
</TR>
<TR>
<TD align='left' valign='top' style='padding-left:5px; padding-right:5px; padding-top:12px'>
<script>
function submitForm()
{ //alert(document.frmValue.optquestion.value);
//alert(document.frmValue.hdnoptquestion.value);
if(document.frmValue.hdnoptquestion.value=='')
{
alert('Please Select One Answer.');
return false;
}
PopupWindow('pollpopup.php?qid=<?=$Question_ID?>', 500,490);
}
</script>
<!------- Starts of Poll Option Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0 style='padding-top:4px'>
<form name="frmValue" method="post">
<input type='hidden' name='hdnoptquestion'>
<?php
$util = new Utility();
$rsAnswer = $util->SelectRecord('question_details','Question_ID',$Question_ID);
while(!$rsAnswer->EOF)
{
?>
<TR>
<TD align='left' valign='bottom' class='txtnormal3' ><input name="optquestion" type="radio" value="<?=$rsAnswer->fields['Question_Detail_ID']?>" onClick="document.frmValue.hdnoptquestion.value = '<?=stripcslashes(htmlentities($rsAnswer->fields['Question_Detail_ID'],ENT_QUOTES))?>'"><?=stripcslashes(htmlentities($rsAnswer->fields['Answer'],ENT_QUOTES))?></TD>
</TR>
<?php
$rsAnswer->MoveNext();
}
?>
</TABLE>
<!------- Ends of Poll Option Table -------->
</TD>
</TR>
<TR>
<TD align='right' valign='top' style='padding-right:30px; padding-top:10px'>
<IMG SRC='../site_images/gobutton3.jpg' onClick="submitForm()" Name='goo' border=0 onMouseOver="document.goo.src='../site_images/gobuttonx3.jpg'"
onMouseOut="document.goo.src='../site_images/gobutton3.jpg'" style='cursor:hand'></TD>
<TR style='padding-top:50px'>
<TD align='right' valign='top' style='padding-right:12px'><A HREF="javascript:PopupWindow('pollpopup.php?qid=<?=$Question_ID?>&result=view', 500,490);" class='linksheader3'>See Result</A></TD>
</TR>
<TR>
<TD align='right' valign='top' style='padding-right:12px'><A HREF="javascript:PopupWindow('pollpopuparchive.php', 500,490);" class='linksheader3'>View Archives</A></TD>
</TR>
<?php
}
?>
</TABLE>
</form>
<!------- Endss of Inside Poll Of The Day Table -------->
</TD>
</TR>
<TR>
<TD align='left' valign='top'><IMG SRC='../site_images/titlequestionbottom.jpg'></TD>
</TR>
</TABLE>
<!------- Endss of Poll Of The Day Table -------->
</TD>
</TR>
</TABLE>
<!------- Ends of Last Row Table -------->
</TD>
</TR>
<?php
$getImage = new Utility();
$rs = $getImage->SelectRecord('headerfooterimages','Location',2);
$size = @getimagesize("../site_images/homeimages/".urlencode(htmlentities($rs->fields['ImageName'],ENT_QUOTES)));
if($size[0] > 598)
$img_size = "width=598";
else
$img_size = $size[0];
if($size[1] > 50)
$img_size = "height=50";
else
$img_size = $size[1];
?>
<TR>
<TD STYLE="padding-bottom:20px" ALIGN="left" VALIGN="top" COLSPAN="2" width='600' height='50'><A href="javascript:void(0)" onClick="window.open('<?=$rs->fields['URL']?>')"><IMG SRC='../site_images/homeimages/<?=$rs->fields['ImageName']?>' <?=$img_size?> border='0'></A></TD>
</TR>
</TABLE>
<!------- Ends of Center Structure Table -------->
</TD>
<TD align='right' valign='top' width='222'>
<!------- Starts of Right Structure Table -------->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" height='100%' background='../site_images/bgright.jpg'>
<TR>
<TD align='left' valign='top' >
<!---------------------------- Right Include (Starts) ---------------------------->
<?PHP
include('right.php');
?>
<!---------------------------- Right Include (Ends) ---------------------------->
</TD>
</TR>
</TABLE>
<!------- Ends of Right Structure Table -------->
</TD>
</TR>
</TABLE>
<!------- Ends of Inside Structure Table -------->
</TD>
</TR>
<TR>
<TD align='center' valign='middle' width=100%>
<!---------------------------- Footer Include (Starts) ---------------------------->
<?PHP
include('footer.php');
?>
<!---------------------------- Footer Include (Ends) ---------------------------->
</TD>
</TR>
</TBODY>
</TABLE>
<!----- Ends of Main Table ----->
</BODY>
</HTML>Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]