Solved

php error pls help

Posted on 2011-03-22
19
332 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
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Introduction to Processes
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

729 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