View Full Version : Viewing PHP pages locally
jc_gmk
06-13-2007, 08:23 AM
Is there any way that I can test my PHP pages locally rather than having to upload them first. (using IE and firefox)
If i try and load my index.php page locally the browsers that I use try to download the php file instead of displaying them.
any ideas?
tech_support
06-13-2007, 09:55 AM
You could make your computer a local server.
Download a WAMPP package (I would recommend this (http://www.apachefriends.org/en/xampp.html)) and install it.
Your home directory would be drive name:\xampp\htdocs
djr33
06-13-2007, 05:53 PM
Browsers don't parse PHP. You need a server.
Either make your computer a server as tech_support says, or just upload to your server and test from there.
iwantyoutospamme
06-16-2007, 10:10 PM
use easyphp
easyphp.org
NairB
06-17-2007, 07:08 AM
Download http://www.devside.net/server/webdeveloper
I used this absolutely brilliant bit of software that makes your PC a localhost in seconds.....and its free ;)
ps...just look at all the stuff you get with it, scroll down the devside website and look at components.
-NairB
jc_gmk
06-18-2007, 11:58 AM
I've now made my pc a server by installing Apache.
It works fine I can view all my PHP pages locally execpt if I try and connect to a remote MySQL database (not stored locally.)
I get the message:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'myusername@123.123.123.123' (Using password: YES) in K:\Websites\index.php on line 2
Access denied for user: 'myusername@123.123.123.123' (Using password: YES)
Any Ideas?
mwinter
06-18-2007, 05:29 PM
... I can view all my PHP pages locally execpt if I try and connect to a remote MySQL database (not stored locally.)
The best security for a database server is achieved not only when user credentials are checked, but also the IP address of the incoming connection. As your request will come from an unrecognised IP address, it will be rejected - at least that's what I would expect.
Yes, you'll need to modify the permissions on the database server to allow access from your PC.
jc_gmk
06-19-2007, 07:40 AM
Any ideas how I do that?
Do I need to edit one of the files?
The server isn't my own it is provided by a hosting company.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.