local host

Joined
Feb 3, 2005
Messages
20
Reaction score
0
Points
1
Location
nz
Your Mac's Specs
powerbook g4, 17", 1gb ram
hey guys, i'm new here!
i would like to know, how to set up a local host server on my mac, this involves installing php and Apache. And I don't know anything about it.
You see, i am trying to make a web page, but it requires php+mySQL hosting, now since it's the first time i'm actually attempting something as challenging as that, i don't know how long will it take for me to learn how to do the whole thing properly, and i don't want to waste money on hosting, that's why i need to setup a local, offline host on my machine.
can someone please help me with it, i don't know much about web technologies, coding etc.

thanks in advance
 
Joined
Jan 15, 2003
Messages
4
Reaction score
16
Points
3
Location
Whangarei, New Zealand
Your Mac's Specs
Pwnt
Ok, well it's quite simple really. You can turn on apache through the sharing control panel (check the box next to web sharing).

To turn on the version of PHP that comes preinstalled with osx, follow this tutorial: http://the.taoofmac.com/space/HOWTO/Enable PHP on Mac OS X

Otherwise if you want a newer version, you can get a package from here: http://www.entropy.ch/software/macosx/php/

To install mySQL the easiest way is to download the official mySQL package from mysql. Download the installer package for your version of the OS. It's 2/3 down the page: http://dev.mysql.com/downloads/mysql/

To run mysql just follow the instructions in the readme file you get with the installer. There are also several GUI mySQL programs you can get if you don't like running it through the command line.
 
OP
V
Joined
Feb 3, 2005
Messages
20
Reaction score
0
Points
1
Location
nz
Your Mac's Specs
powerbook g4, 17", 1gb ram
hey there, thanks for your post.
ufortunatelly i'm not familiar with open source code operating systems, i've swiched from winxp about half a year ago, if i understand correctly, i need to swich on vi in terminal, but for some reason after imputting :
$ sudo vi /etc/httpd/httpd.conf
it doesnt ask for a pass, in fact it doesnt do anything.
what am i doing wrong?
 
Joined
Jan 15, 2003
Messages
4
Reaction score
16
Points
3
Location
Whangarei, New Zealand
Your Mac's Specs
Pwnt
Try using pico in place of vi, see if that works.
 
OP
V
Joined
Feb 3, 2005
Messages
20
Reaction score
0
Points
1
Location
nz
Your Mac's Specs
powerbook g4, 17", 1gb ram
ok, i write the line, press return key and it just goes to next line, am i doin smthng wrong?

this line i mean
$ sudo vi /etc/httpd/httpd.conf
 
Joined
Jan 15, 2003
Messages
4
Reaction score
16
Points
3
Location
Whangarei, New Zealand
Your Mac's Specs
Pwnt
You want to write "sudo pico /etc/httpd/httpd.conf". Don't type in the $.
 
OP
V
Joined
Feb 3, 2005
Messages
20
Reaction score
0
Points
1
Location
nz
Your Mac's Specs
powerbook g4, 17", 1gb ram
hey thnx alot, after running the php test i got the php page fine, the only concern i have is that it has this at the top:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /Users/vic1/Sites/phptest.php on line 7

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /Users/vic1/Sites/phptest.php on line 8
{\rtf1\mac\ansicpg10000\cocoartf102 {\fonttbl\f0\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww9000\viewh9000\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural \f0\fs24 \cf0
 
Joined
Jan 15, 2003
Messages
4
Reaction score
16
Points
3
Location
Whangarei, New Zealand
Your Mac's Specs
Pwnt
I wouldn't worry about those errors on the phpinfo() page you may have made a typo somewhere.

Quite often you'll be redirected all over the place before a download starts - just be patient and keep an eye on the download window (press apple-option-l). If you find that nothing appears in the download window, ctrl-click on the hard link (the link that says 'if nothing happens click here') and choose 'download linked file as...'
 

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