Wrox Programmer Forums
|
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 27th, 2010, 08:26 PM
Registered User
 
Join Date: Aug 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Unhappy Configure PHP to run in localhost

Hi

I am having trouble displaying php test page in browser. My http://local host/ seems to work fine but the file I created with a php extension says the page cannot be displayed although plain html works fine. When I save the file the icon is showing it as a text file and I'm pretty sure that I have configured php and apache correctly although I would like some checks on whether I have gone wrong somewhere i.e. dummy guide to adding directory for environment variables as this is where the problem may lie. I have gone through all the steps in the book before installing msql. This is frustrating me and am new to this, please help much appreciated. I'm using PHP 5.2.14 and Apache 2.2 by the way.
 
Old September 5th, 2010, 03:35 PM
Registered User
 
Join Date: Sep 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

not sure if its the same problem i experienced, but when i started out i tried to open the php file directly with the browser. should be http://localhost/name-of-file.php

also, when i wrote my first php script, i accidentally saved it as name-of-file.php.txt

all i did to fix it was delete the txt part from the file name

cheers
 
Old September 20th, 2010, 06:38 PM
Registered User
 
Join Date: Mar 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
had same prob, maybe apache still not set up.
1/. Check line 46: Listen 8080 or 80 if your web browser work's then this is OK
2/. Check line128: <LoadModule php5_module "C:\PHP\php5apache2_2.dll ">
3/. Check Line 389: <PHPIniDir "C:\PHP" >
4/.Check veriable Path: %CommonProgramFiles%\Microsoft Shared\Windows Live; '''''' ETC,ETC ,'''';should includ:::<;C:\Program Files\Apache Software Foundation\Apache2.2\bin;C:\Program Files\jEdit;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\PHP.>
5/. Oh and download Jedit have a play with it go to plugin's look down list and load PHP.
6/. And also in system varibles MAKE NEW> <Variable, PHPRC, value PHPRC...>
7/. Then in your php.ini-dist file Check line 491: <extension_dir = "C:\PHP\ext/">
8/. Check line 633: <extension=php_mysql.dll>This will be for your SQL when your arrive there, but glad I've check my self as I never saved my change was not able to link MYSQL with PHP. Thanks for making me look...
9/. Them copy libmysql to your widows dirctory when your ready.
10/. Rename your php.ini-dist to <php.ini> then check to see if youv'e not got a ~at the end i.e. php.ini~ should read php
Its posible its being save as text just try Jedit it free also you may need java.sun to make that work...
hope this works 4 you if not I've got some sharp pencels to poke in my eye.Ah Ah lots of luck...
DP Dave
PS I asked 4 help sill waiting done it now just waiting to see how long!!!
Quote:
Originally Posted by hunt4it View Post
Hi

I am having trouble displaying php test page in browser. My http://local host/ seems to work fine but the file I created with a php extension says the page cannot be displayed although plain html works fine. When I save the file the icon is showing it as a text file and I'm pretty sure that I have configured php and apache correctly although I would like some checks on whether I have gone wrong somewhere i.e. dummy guide to adding directory for environment variables as this is where the problem may lie. I have gone through all the steps in the book before installing msql. This is frustrating me and am new to this, please help much appreciated. I'm using PHP 5.2.14 and Apache 2.2 by the way.





Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i run my project on localhost saurabh ASP.NET 3.5 Professionals 1 September 6th, 2008 11:47 AM
Configure PHP/Apache nalla Beginning PHP 2 August 9th, 2007 06:53 AM
configure tomcat to run both JDK 1.4.2 and 1.5.0 draggy Apache Tomcat 3 April 17th, 2006 04:04 AM
PHP 5.0.4 configure problem mjjanis Beginning PHP 1 August 9th, 2005 01:39 PM
Help Configure V. Studio .NET to run ASP project! suslishe Classic ASP Basics 0 August 26th, 2003 05:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.