MAMP

I’ve been following the “local server address” thread with some
interest and I guess I still don’t understand a few things, plus I’m
probably overlooking the obvious. For starters I want to be able to
preview php files locally (database stuff) so I installed MAMP and
have manually installed PHP 5 prior to that so here’s the dumb part,
with MAMP running shouldn’t I just be able to preview a php file?
Instead I get the source code.

Todd


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Todd,

You still need to run the page through the server to render the PHP.
The path would be something like http://localhost:8888/pathToYourFiles/file.php

localhost is the machine you are on, this can also be 127.0.0.1, 8888
is the default port that MAMP uses and the pathToYourFiles is the
place within the server folder you want to view.

PHP is just plain text to a browser which is why you just get the
source.

Hope this helps.

Joe

On 25 Jul 2008, at 23:37, Todd wrote:

I’ve been following the “local server address” thread with some
interest and I guess I still don’t understand a few things, plus I’m
probably overlooking the obvious. For starters I want to be able to
preview php files locally (database stuff) so I installed MAMP and
have manually installed PHP 5 prior to that so here’s the dumb part,
with MAMP running shouldn’t I just be able to preview a php file?
Instead I get the source code.

Todd


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

For example with the files you want to view copied into the htdocs folder which by default is at:

Applications/MAMP/htdocs

Then if I wanted to view the php page ‘membersearch.php’ contained within the site folder STTA (within htdocs) I would use the address:

http://localhost:8888/STTA/membersearch.php

David


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks guys. As far as MAMP goes I did know about putting the files
in the htdocs folder which works for me (though my localhost is 80).
My confusion stems from the assumption that I could render a php file
located anywhere on the computer by using localhost/~MyUserAccount/
path/file.php with or without MAMP running since I also manually
installed php. Obviously I have my wires twisted. ; )

Todd

On Jul 25, 2008, at 6:52 PM, DeltaDave wrote:

For example with the files you want to view copied into the htdocs
folder which by default is at:

Applications/MAMP/htdocs

Then if I wanted to view the php page ‘membersearch.php’ contained
within the site folder STTA (within htdocs) I would use the address:

http://localhost:8888/STTA/membersearch.php


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

My confusion stems from the assumption that I could render a php file located anywhere on the computer

It is an easy assumption to make - hope everything is crystal now.

David


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I started the ‘local server address’ thread and still haven’t resolved it!!..

However, I experience just the same as Todd on my Powerbook…but not on my G4 Powermac.

I have MAMP installed on both, but they are not in the equation when I’m just working in FW and doing quick previews.

I have a site with most of the pages suffixed .php because they have a small amount of PHP code in markup items for various functions. Obviously I do NOT expect to see these functions in a quick preview of the page (I would have to transfer all the files to MAMP/htdocs and then view them there).

On the Powermac, I can quite happily preview this site and see a visual rendition of all the .php pages, although obviously without actually seeing the PHP enhancement. i.e. I get a preview of the HTML.

On the Powerbook however, I preview the site and see nothing but text/code for all pages which are suffixed .php. Only ‘pure’ HTML pages are rendered.

Why is that? Why does a preview of .php suffixed Freeway pages work in one Mac and not the other? Remember, this is outside of MAMP.

?

Hugh


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What version of Safari do you have installed on each machine?

Walter

On Jul 30, 2008, at 10:49 AM, hugh wrote:

Why is that? Why does a preview of .php suffixed Freeway pages work
in one Mac and not the other? Remember, this is outside of MAMP.


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

G4 Powerbook - OSX 10.4.11 - Safari 3.1.2

G4 Powermac - OSX 10.3.9 - Safari 1.3.2

Powermac preview works fine, Powerbook doesn’t.


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That makes perfect sense, then. Safari changed dramatically along the way, and stopped doing the “ignore tags inside <?” behavior that used to be the norm. Since Freeway uses Safari (WebKit, to be pedantic) to draw its preview, that’s why you are seeing this different behavior. It’s all down to what version of Safari is installed.

Walter


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So from the previewing Freeway viewpoint…older is better?

Not that I hadn’t long ago suspected it…!


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No, from the previewing Freeway perspective, you need a version of
WebKit that supports your OS.

And this is why it is very good to have a development server
somewhere. Either it’s on your local Mac – and believe me, this is
not that hard to get going – or on a CheapWebHost™ somewhere. That
way you simply upload and preview live from a real server. All your
PHP will work (or not, if it’s broken) and you will see a real view
of your site rather than a hobbled version in a file:/// preview.

Walter

On Jul 30, 2008, at 11:29 AM, hugh wrote:

So from the previewing Freeway viewpoint…older is better?

Not that I hadn’t long ago suspected it…!


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Well, I’ve got MAMP for that! Suppose I could publish to a folder within MAMP’s htdocs folder.

The other thing is to make Firefox my default browser for previewing.

Thanks for identifying the problem, Walter.

cheers
Hugh


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options