Solved

php error pls help

Posted on 2011-03-22
19
320 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
  • 6
  • 5
  • 3
  • +3
19 Comments
 
LVL 8

Accepted Solution

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

Expert Comment

by:Dave Baldwin
Comment Utility
Agreed.
0
 

Author Comment

by:netbizmo
Comment Utility
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
 
LVL 82

Expert Comment

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

Author Comment

by:netbizmo
Comment Utility
i dont understand...
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
Comment Utility
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
Comment Utility
I am attaching the entire files here...pls can you help me out?
files.zip
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
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
Comment Utility
I dont have any experience .....in php...what do you mean by ripped for?
0
 

Author Comment

by:netbizmo
Comment Utility
There is no reason for ripping
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
'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
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
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
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now