Re: Installing PHP on MacOS X
From: max power (maxpower_at_invalid.com)
Date: 10/08/04
- Next message: Ehtor: "Re: A quick question about a simple news script I'm making"
- Previous message: Tim Van Wassenhove: "Re: PHP Design tools? IDE?"
- In reply to: Hans M: "Installing PHP on MacOS X"
- Next in thread: Warren Oates: "Re: Installing PHP on MacOS X"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 08 Oct 2004 18:33:26 +0100
In article <BD8C7F01.2B70%hmbg@telia.com>, Hans M <hmbg@telia.com>
wrote:
> MacOS X 10.3.5
>
> I have installed
>
> http://www.entropy.ch/software/macosx/php/
>
> on my PowerBook G4.
>
> Being a newbie I don't get the test.php file to "work".
>
> Can anyone here assist me in advising a good way
> to *check* the installation is valid?
>
> The "/etc/httpd/httpd.conf" file does contain
>
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .php
>
> sigh...
>
> How do I do now?
> Are you a Mac user?
>
> Thank you in advance.
>
> /Hans.
>
I've installed php a few times on OSX Macs, and have also used the
Entropy installers as you have. I've had very few problems with this,
and have never found any need to edit or change the Apache config file
(httpd.conf) or any of the php config files after installation - in
fact I've left those well alone.
Here are a few things that may help you get everything running
correctly. (You said you were a newbie at this, so excuse me if some of
this may be stating the obvious).
1) php runs under the Apache web server, so you need to have Apache
running before php will work. Apache (1.3.x) is already installed as
part of OSX, but it is switched off by default for security reasons. To
start Apache, open System Preferences/Sharing and enable Personal Web
Sharing. You can also start Apache via the Terminal, but this is the
easiest way, and when enabled, will automatically start up Apache when
you restart your Mac.
Note: for some reason, IE in OSX does not support 'localhost' URLs, but
will work with 127.0.0.1 - any other OSX browser supports either.
2) The default root web directory on OSX is
/Library/WebServer/Documents, which can be accessed in your browser on
your own Mac by the URL http://localhost/ or http://127.0.0.1/
This URL on it's own will display the default Apache home page, or any
other page you may have replaced that with, and will confirm that
Apache is running ok (irrespective of php).
3) Each OSX User also has their own 'Sites' folder inside their 'home'
folder - this is your own web site(s) folder, as opposed to the system
one described above. This can be accessed in your browser by the URL
http://localhost/~shortusername/ or http://127.0.0.1/~shortusername/
Unless you've changed it, this URL will display the default OSX home
page.
4) The test.php file referred to in the Entropy installation
instructions on their web site MUST be saved/placed in either the
system root web directory (/Library/WebServer/Documents) or your user
Sites folder. When that's done, you can run this php file in your
browser via the URL http://localhost/test.php or
http://localhost/~shortusername/test.php depending where you
saved/placed the test.php file. If that works, then your Apache/php
installation is working correctly and you will see a page of info about
your php & Apache setup.
Note: if you edit/create your test.php file using TextEdit, make sure
you save it in plain text format via the Format menu (not the default
.rtf format).
HTH,
max
- Next message: Ehtor: "Re: A quick question about a simple news script I'm making"
- Previous message: Tim Van Wassenhove: "Re: PHP Design tools? IDE?"
- In reply to: Hans M: "Installing PHP on MacOS X"
- Next in thread: Warren Oates: "Re: Installing PHP on MacOS X"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|