Guardian-Mage Posted July 24, 2007 Share Posted July 24, 2007 Ok, I downloaded the Apache Webserver from the site, the latest version, in a win32 Binary MSI. I installed it and now I am lost. How do I view pages on it? I have PHP installed, so how can I test my PHP files? What now? Quote Link to comment Share on other sites More sharing options...
trq Posted July 24, 2007 Share Posted July 24, 2007 Place a test script phpinfo.php in the htdocs directory. Usually /var/www/htdocs on Linux (not sure on windows). The script should contain.... <?php phpinfo(); ?> Then open your browser and go to http://localhost/phpinfo.php If successfull you should see a bunch of info about your php install Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 24, 2007 Share Posted July 24, 2007 For windows you place the php files in C:/Program Files/Apache Foundation/Apache2/htdocs (note the actual path maybe different). Note: If you have installed PHP (using the installer) after you have installed Apache you will need to restart Apache as PHP changes Apache's configuration file. When you change Apache's configuration file Apache must be restarted. Quote Link to comment Share on other sites More sharing options...
hackerkts Posted July 25, 2007 Share Posted July 25, 2007 If you want to test your script, I would suggest you to use Wamp5, you just have to install it and it's done. Take note: Wamp5 is just for testing script purposes. Quote Link to comment Share on other sites More sharing options...
Guardian-Mage Posted July 25, 2007 Author Share Posted July 25, 2007 does it matter that I installed PHP way before I installed apache? Also the tray Icon says no services installed and I cannot connect to Local Host. The tray Icon is red Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 25, 2007 Share Posted July 25, 2007 If PHP was installed before Apache was installed then you are going to have re-run the Installer. Having a look at the documentation you can re run the installer in Add/Remove Programs (Located in Start > Control Panel). NOTE: Make sure Apache is started before using the installer. Quote Link to comment Share on other sites More sharing options...
Guardian-Mage Posted July 25, 2007 Author Share Posted July 25, 2007 I reinstalled apache and php and now it works, I can access localhost, but when I try to access a php page, it processes the php but writes the html out. Example: index.php: <?php include("layout1.php"); ?> hey world <?php include("layout2.php"); ?> result: <!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> <title>DM Motor Sports| #66</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Language" content="en-us" /> <meta name="Author" content="Brandon Wamboldt/Northern Lights Technology" /> <meta name="Title" content="DM Motor Sports| #66" /> <meta name="Description" content="Daryl Mahar Motor Sports, the #66 Car. Come read our race reports and meet our team." /> <meta name="Keywords" content="racing, Daryl, Mahar, #66, Cars" /> <meta name="Robots" content="index,follow" /> <meta name="last-modified" content="2007/07/20" /> <meta name="revisit-after" content="5_days" /> <link rel="stylesheet" type="text/css" href="main.css" /> </head> <body> <div id="container"> <div id="banner"> </div> <div><br /></div> <div id="middle-home"> <div id="left-menu-home"> <a href="index.php" title="Return to the home page"> <img border="0" src="images/buttons/home.png" alt="Home" width="125px" height="26px" onmouseover="javascript:this.src='images/buttons/home2.png'" onmouseout="javascript:this.src='images/buttons/home.png'" /></a><br /><br /> <a href="about_us.php" title="Come and learn more about us"> <img border="0" src="images/buttons/theteam.png" alt="The Team" width="125px" height="26px" onmouseover="javascript:this.src='images/buttons/theteam2.png'" onmouseout="javascript:this.src='images/buttons/theteam.png'" /></a><br /><br /> <a href="achievements.php" title="Look at our achievements"> <img border="0" src="images/buttons/achievements.png" alt="Achievements" width="125px" height="26px" onmouseover="javascript:this.src='images/buttons/achievements2.png'" onmouseout="javascript:this.src='images/buttons/achievements.png'" /></a><br /><br /> <a href="upcoming_events.php" title="Find out about upcoming events"> <img border="0" src="images/buttons/schedule.png" alt="Schedule" width="125px" height="26px" onmouseover="javascript:this.src='images/buttons/schedule2.png'" onmouseout="javascript:this.src='images/buttons/schedule.png'" /></a><br /><br /> <a href="viewreports.php" title="View post-race reports"> <img border="0" src="images/buttons/reports.png" alt="Race Reports" width="125px" height="26px" onmouseover="javascript:this.src='images/buttons/reports2.png'" onmouseout="javascript:this.src='images/buttons/reports.png'" /></a><br /><br /> <a href="slideshow.php" title="View our picture slideshow"> <img border="0" src="images/buttons/slideshow.png" alt="Photo Album" width="125px" height="26px" onmouseover="javascript:this.src='images/buttons/slideshow2.png'" onmouseout="javascript:this.src='images/buttons/slideshow.png'" /></a><br /><br /> <a href="links.php" title="Visit our sponsers"> <img border="0" src="images/buttons/links.png" alt="Links & Sponsors" width="125px" height="26px" onmouseover="javascript:this.src='images/buttons/links2.png'" onmouseout="javascript:this.src='images/buttons/links.png'" /></a><br /><br /> <a href="contact_us.php" title="Email us with any comments"> <img border="0" src="images/buttons/contact.png" alt="Contact Us" width="125px" height="26px" onmouseover="javascript:this.src='images/buttons/contact2.png'" onmouseout="javascript:this.src='images/buttons/contact.png'" /></a><br /><br /> </div> <div id="centre"> <h1>Welcome to DM Motorsports</h1> <h2>#66- Daryl Mahar</h2> hey world </div> <div class="clearer"> <p></p> </div> </div> <div><br /></div> <div class="footer"> <center> Developed and Designed by <a href="http://www.northernlightstech.com">Northern Lights Technology</a> </center> </div> </div> </body> </html> What gives? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 25, 2007 Share Posted July 25, 2007 Not understanding your question. Is the HTML code displayed back to the screen as normal text, eg instead of bold text you get <b>bold text</b>. Quote Link to comment Share on other sites More sharing options...
Guardian-Mage Posted July 25, 2007 Author Share Posted July 25, 2007 NEVER MIND, I fixed it, thanks Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 25, 2007 Share Posted July 25, 2007 I can give you my config files but it still wont work as I have setup Apache and PHP in completely a different way to you. There is no standard configuration. How have you "broken it"? What was you doing before you got the Forbidden Error message. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.