Off Topic

11 replies to this thread. Most Recent

Todd

25 Jul 2008, 10:37 pm

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

quote

Joe Billings

25 Jul 2008, 11:28 pm

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

quote

For free and responsive Freeway support visit http://www.softpress.com/support/help_desk.php

DeltaDave

25 Jul 2008, 11:52 pm

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

quote

Glasgow, Scotland

G5 PPC OSX.4.11 Freeway Pro 5.2.1

Todd

26 Jul 2008, 12:59 am

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

quote

DeltaDave

26 Jul 2008, 10:55 pm

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

quote

Glasgow, Scotland

G5 PPC OSX.4.11 Freeway Pro 5.2.1

hugh

30 Jul 2008, 2:49 pm

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

quote

waltd

30 Jul 2008, 2:55 pm

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.

quote

Freeway user since 1997

http://www.walterdavisstudio.com

hugh

30 Jul 2008, 3:17 pm

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.

quote

waltd

30 Jul 2008, 3:21 pm

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

quote

Freeway user since 1997

http://www.walterdavisstudio.com

hugh

30 Jul 2008, 3:29 pm

So from the previewing Freeway viewpoint…..older is better?

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

quote

waltd

30 Jul 2008, 3:39 pm

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……!

quote

Freeway user since 1997

http://www.walterdavisstudio.com

Back to Top

hugh

30 Jul 2008, 3:54 pm

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

quote

FreeCounter