Settings for previewing php in BBedit

846 views
Skip to first unread message

jaladuvar

unread,
Feb 8, 2010, 4:16:15 PM2/8/10
to BBEdit Talk
Hey,
Somewhat puzzled as I have to save a php file to preview it in BBEdit
9.3.1 , when it's not required for straightforward html file. Do I do
something wrong ?
my set-up:

iMac Core i7
OSX 10.6.2

MAMP running
site name: 'serveurMAMP' selected for previewing
settings are
local site root: /Applications/MAMP/htdocs
use local preview server: selected
Preview server URL
http://localhost:8888/
when I create a new file, if I write html code in it the preview with
bbedit works fine, if I put php in it, it doesn't work, if I save this
file in the local site root, then the preview works and whenever I
change code the preview is updated without me saving this to the
file...
Are my settings OK or did I overlook something ?

Thanks for help...

Lorin Rivers

unread,
Feb 8, 2010, 7:14:28 PM2/8/10
to bbe...@googlegroups.com
Does the url you provided work in a browser (i.e., is the content rendered properly)?

--
Lorin Rivers
Mosasaur: Killer Technical Marketing <http://www.mosasaur.com>
<mailto:lri...@mosasaur.com>
512/203.3198 (m)


jaladuvar

unread,
Feb 9, 2010, 1:59:58 AM2/9/10
to BBEdit Talk
Yes, it works fine both in BBedit Local Preview and in the browsers,
but the preview requires that the file has been saved into it, which
takes away the interest of the BBedit Local preview, which I like to
use when writing up html code and would like to be able to use for php
code as well of course...


On 9 fév, 01:14, Lorin Rivers <lriv...@mosasaur.com> wrote:
> Does the url you provided work in a browser (i.e., is the content rendered properly)?
>
> --
> Lorin Rivers
> Mosasaur: Killer Technical Marketing <http://www.mosasaur.com>

> <mailto:lriv...@mosasaur.com>
> 512/203.3198 (m)

Robert A. Rosenberg

unread,
Feb 9, 2010, 4:07:30 PM2/9/10
to bbe...@googlegroups.com
At 22:59 -0800 on 02/08/2010, jaladuvar wrote about Re: Settings for
previewing php in BBEdit:

>Yes, it works fine both in BBedit Local Preview and in the browsers,
>but the preview requires that the file has been saved into it, which
>takes away the interest of the BBedit Local preview, which I like to
>use when writing up html code and would like to be able to use for php
>code as well of course...

Using BBEdit to view HTML you are editing, can work since there is a
built-in HTML interpreter. PHP needs a Browser (and a running Server
with PHP support). Thus BBEdit can not handle it on its own.

Maarten Sneep

unread,
Feb 9, 2010, 4:26:31 PM2/9/10
to bbe...@googlegroups.com

If you run a server on your mac, BBedit will happily run the php files through the server and show the results. This requires some setup, but this is trivial enough:

Preferences, HTML Web Sites. 'Add' or 'Change'. Fill out form. Make sure 'Use local preview server' is checked.

Maarten

jaladuvar

unread,
Feb 10, 2010, 2:54:01 AM2/10/10
to BBEdit Talk
Thanks to all,

I've done the settings as stated in my first message.
MAMP is set to use its htdocs folder as site root, the server URL is
MAMP's preset localhost:8888, "Use local preview server" is checked.
My question is merely about having to save the file (ie. create it in
the site root folder) before previewing it.
If I understand this rightly this is required because the PHP in the
file has to be handled via the server (which requires the file to be
in it's root folder) when this is not required for the BBEdit built'in
HTML interpreter.
But then why is it that, once the file exists in the root folder, a
"non saved" php modification is updated "live" in the preview ?

Reply all
Reply to author
Forward
0 new messages