Solved

php error pls help

Posted on 2011-03-22
19
334 Views
Last Modified: 2012-06-27
I bought a website from an online auction and the seller gave me the files. I changed my hosting to a php hosting and uploaded the files but all the pages show error on the webpage.

here is the site youwantthisstuff.com

pls who can tell me how to resolve this php error

here is code on the home page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <?php require_once("header.php"); ?>
      <title><?php echo $page_kwd; ?> Merchandise Advanced Search Facility</title>
      <META NAME="description" CONTENT="<?php echo $page_kwd; ?> Search Facility. Search the Internet for <?php echo $page_kwd; ?> merchandise.">
      <META NAME="keywords" CONTENT="<?php echo $page_kwd; ?>">
      <META NAME="revisit-after" CONTENT="1 day">
      <META NAME="robots" CONTENT="INDEX,FOLLOW">
      <meta name="MSSmartTagsPreventParsing" content="TRUE">
      <meta http-equiv="imagetoolbar" content="no">
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <link href="styles.css" rel="stylesheet" type="text/css">
      <link href="rssnews.css" rel="stylesheet" type="text/css">
      <script type="text/javascript">
      function sortHandler(){
            if(document.forms['sortform'].sorter.options[document.forms['sortform'].sorter.selectedIndex].value == "highest") {
                  document.forms['sortform'].fsoo.value = 2;
                  document.forms['sortform'].fsop.value = 3;
            } else if(document.forms['sortform'].sorter.options[document.forms['sortform'].sorter.selectedIndex].value == "lowest"){
                  document.forms['sortform'].fsoo.value = 1;
                  document.forms['sortform'].fsop.value = 3;
            }else if(document.forms['sortform'].sorter.options[document.forms['sortform'].sorter.selectedIndex].value == "soonest"){
                  document.forms['sortform'].fsoo.value = 1;
                  document.forms['sortform'].fsop.value = 1;
            }else if(document.forms['sortform'].sorter.options[document.forms['sortform'].sorter.selectedIndex].value == "newest"){
                  document.forms['sortform'].fsoo.value = 2;
                  document.forms['sortform'].fsop.value = 1;
            }
            document.forms['sortform'].submit();
      }
      function load(idx)
      {  
            var x=document.getElementById("sorter");
            x.selectedIndex = idx;
      }
      </script>
</head>
<body>
<div id="outer">
<?php require_once ("sahdr.php"); ?>
<div id="map">Search Assistant :: <?php echo $page_kwd; ?></div>
<div id="bodywrap">
<div id="content" align="left">
<h1 style="text-transform:capitalize"><?php echo $page_kwd; ?></h1>
<?php require_once($prods["content"]); ?>
<center><hr>
<p><a name="Anchor-58954"></a>
<?php require_once("ebayrss.php"); ?>
<a name="Anchor-View-More"></a>
</p>
<hr />
</center>
<?php require_once("samiddle-news.php"); ?>
<center>                                    
<br>
<?php require_once ("sabottom.php"); ?>                                    
</div>
<div id="navwrap">
<!-- Begin Related Links -->
<?php require_once ("saside.php"); ?>      
</div>
<div id="footer">Copyright &copy; <?php print (date(" Y"));?> - <?php echo $mydomain; ?></div>
<a href="http://www.sleeping-with-a-sleeping-disorder.com/sleep-tracks-review.html">Sleep Tracks Review</a> and <a href="http://www.sleeping-with-a-sleeping-disorder.com">Sleep disorders</a>
</center>
</div>
</div>
</body>
</html>

0
Comment
Question by:netbizmo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 3
  • +3
19 Comments
 
LVL 8

Accepted Solution

by:
Rik-Legger earned 250 total points
ID: 35193106
Your file is not being parsed as an php file,
try saving the file as index.php instead of index.html.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35193321
Agreed.
0
 

Author Comment

by:netbizmo
ID: 35193698
i changed index.html to index.php and i get this error.


Warning: require_once(header.php) [function.require-once]: failed to open stream: No such file or directory in /home/youwantt/public_html/index.php on line 4

Fatal error: require_once() [function.require]: Failed opening required 'header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/youwantt/public_html/index.php on line 4
0
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35193718
You need to upload all the "require_once ("...");" files  to your server in the same directory as 'index.php'.
0
 

Author Comment

by:netbizmo
ID: 35193946
i dont understand...
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 35193975
If you look at the code in 'index.php', you will see several lines where "require_once ("...");" is used.  Those lines are supposed read in the files that are listed in the quotes.  If those files are not there, you will get errors.  They should have been part of the package you got.
0
 

Author Comment

by:netbizmo
ID: 35194064
I am attaching the entire files here...pls can you help me out?
files.zip
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35194225
I'm afraid you've been ripped off.  The PHP files to make that work are not there.  And the files to make the other versions and files are not there either.  Sorry.
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 35195174
Do you have a background in computer science?  In particular, how many years of PHP programming experience do you have?
0
 

Author Comment

by:netbizmo
ID: 35196257
I dont have any experience .....in php...what do you mean by ripped for?
0
 

Author Comment

by:netbizmo
ID: 35196265
There is no reason for ripping
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35196320
'ripped off' means that you have been a victim of fraud.  What you were sold does not work.  It does not have the files necessary to create a working website.
0
 

Author Comment

by:netbizmo
ID: 35196338
I did not pay for the file Mr Bald win....i paid for a 9 year old domain that has a page rank 2 for my seo business..stick to programming and dont talk about what you dont know...

Please guys is there a way i can strip out the php and just make it plain html
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 35198442
This error message is pretty self-explanatory: ...failed to open stream: No such file or directory...

If you got that error message and you do not immediately know what to do about it, then you should hire a professional web development firm to help you make domain work correctly.  When you say you "did not pay for the file" -- that may be true.  But the file that is missing is necessary for the correct operation of whatever you bought.  So it looks to Dave Baldwin and to me, too, that your situation is akin to someone who bought a car sight-unseen only to find that it was up on blocks without wheels.

It may not be fraud; your contract may not provide for a complete and working system - maybe your purchase rights do not include these files and they are expected to come from others.  In any case, what you probably have here is a data-base backed web site.  It's the data that makes it run; the HTML is perfunctory.  Please see the code snippet.  It is the "index.html" file from the ZIP archive you posted above.  It has a lot of PHP code embedded inside it.  So your developer's first task might be to parse .html files as though they were .php files and see if that helps you make headway.

Good luck with it, ~Ray
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <?php require_once("header.php"); ?>
	<title><?php echo $page_kwd; ?> Merchandise Advanced Search Facility</title>
	<META NAME="description" CONTENT="<?php echo $page_kwd; ?> Search Facility. Search the Internet for <?php echo $page_kwd; ?> merchandise.">
	<META NAME="keywords" CONTENT="<?php echo $page_kwd; ?>">
	<META NAME="revisit-after" CONTENT="1 day">
	<META NAME="robots" CONTENT="INDEX,FOLLOW">
	<meta name="MSSmartTagsPreventParsing" content="TRUE"> 
	<meta http-equiv="imagetoolbar" content="no">

	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<link href="styles.css" rel="stylesheet" type="text/css">
	<link href="rssnews.css" rel="stylesheet" type="text/css">
	<script type="text/javascript">
	function sortHandler(){
		if(document.forms['sortform'].sorter.options[document.forms['sortform'].sorter.selectedIndex].value == "highest") {
			document.forms['sortform'].fsoo.value = 2;
			document.forms['sortform'].fsop.value = 3;
		} else if(document.forms['sortform'].sorter.options[document.forms['sortform'].sorter.selectedIndex].value == "lowest"){
			document.forms['sortform'].fsoo.value = 1;
			document.forms['sortform'].fsop.value = 3;
		}else if(document.forms['sortform'].sorter.options[document.forms['sortform'].sorter.selectedIndex].value == "soonest"){
			document.forms['sortform'].fsoo.value = 1;
			document.forms['sortform'].fsop.value = 1;
		}else if(document.forms['sortform'].sorter.options[document.forms['sortform'].sorter.selectedIndex].value == "newest"){
			document.forms['sortform'].fsoo.value = 2;
			document.forms['sortform'].fsop.value = 1;
		}
		document.forms['sortform'].submit();
	}
	function load(idx)
	{   
		var x=document.getElementById("sorter");
		x.selectedIndex = idx;
	}
	</script>
</head>
<body>
<div id="outer">
<?php require_once ("sahdr.php"); ?>
<div id="map">Search Assistant :: <?php echo $page_kwd; ?></div>
<div id="bodywrap">
<div id="content" align="left">

<h1 style="text-transform:capitalize"><?php echo $page_kwd; ?></h1>
<?php require_once($prods["content"]); ?>
<center><hr>
<p><a name="Anchor-58954"></a>
<?php require_once("ebayrss.php"); ?>
<a name="Anchor-View-More"></a>
</p>
<hr />
</center>
<?php require_once("samiddle-news.php"); ?>
<center>						
<br>
<?php require_once ("sabottom.php"); ?>						
</div>
<div id="navwrap">
<!-- Begin Related Links -->
<?php require_once ("saside.php"); ?>	

</div>
<div id="footer">Copyright &copy; <?php print (date(" Y"));?> - <?php echo $mydomain; ?></div>
<a href="http://www.sleeping-with-a-sleeping-disorder.com/sleep-tracks-review.html">Sleep Tracks Review</a> and <a href="http://www.sleeping-with-a-sleeping-disorder.com">Sleep disorders</a>
</center>
</div>
</div>
</body>
</html>

Open in new window

0
 
LVL 4

Expert Comment

by:coolcurrent4u
ID: 35200134
it is clear that the files you need to successfully run this website you uploaded is incomplete.

i can help you complete it, first accept my answer, as am going to help you fix it, and tell send me a private message telling me how you want it done, and how much you re willing to pay
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 35691275
I think these two answered pretty well:

ID:35193106
ID:35193975

The author may not be happy with the answer, but those responses tell the facts.
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 35759373
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question