doubts on setting up webserver for local development

Joined
Jan 26, 2009
Messages
1
Reaction score
0
Points
1
hello,

I'm setting up my mac (running leopard) to run as webserver so that i can do web development locally. i set up apache 2.2.9 and turned on php 5.2.6.

I have a set of webpages written in html, php and flash to update (not written by me originally). although they are running ok remotely (www.ct.com.br/emy32), it is not working locally. specifically, when i click on the menu items on the top (locally) only the first page is (re)loaded (no matter which item). even if i type, say, http://localhost/~emy32/index.php?id=2, the http://localhost/~emy32/index.php?id=0 page is loaded.

I'm just learning web development (no professional purposes) so i feel a bit lost. Is this a matter of not having configured the local PHP properly? (as the same pages and codes are running ok at the remote site?)

thanks
prtc
 
Joined
Apr 23, 2007
Messages
377
Reaction score
4
Points
18
Location
Coatesville, PA
Your Mac's Specs
MBP 15", 2.33 GHz, 2Gb
It it works properly remotely, then it sounds like everything is working as it should be. What I'd check is if the coding is referring to external site names (like your domain name) directly. Internally/locally that normally won't work. For example, if in your code you are pointing/referring to "http://domain.com/code.php" instead of just "code.php" you may find that it doesn't work when you test locally.
 
Joined
Jan 7, 2009
Messages
6
Reaction score
0
Points
1
I would advise you to set up a MAMP
MAMP - Wikipedia, the free encyclopedia

it is a software bundle that includes Apache, Mysql and PHP all into one.
This means you only have to install one application and it will run everything at the same time.

Here is a good one which wikipedia recommends
living-e AG: MAMP - Mac - Apache - MySQL - PHP

download the
- only MAMP 1.7.2 dmg Image (universal binary)
I tried the other ones and they don't seem to work.

You can follow this easy video tutorial to set it all up
Install a Local Web Server on Mac OSX | Lullabot

I've been developing PHP applications on Windows using easyPHP which is the same thing as a MAMP but for Windows and the one for Mac is so much easier to use.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top