Greetings,
I’ve searched through a bunch of forum and support topics
with no success so here’s a post.
I’m building a site on a Mac using some basic PHP (not
database driven) and would like to be able to preview the files in
a browser. I’m setting up a testing server with PHP/MySQL as the
Server Model, Access as Local/Network, and the location of the site
folder pointed to. My problem is the URL prefix…
I have tried the following URL prefixes and keep getting the
same error message in DW (“Dreamweaver cannot use the prefix you
entered to display live data….HTTP error:0″) and a connection
failure in the browser. The following attempts include the name of
my hard drive, my Mac User name, and the name of the folder my site
rests in.
http://myHDname/
http://myHDname/~myUserName/
http://myHDname/~myUserName/siteFolderName/
http://localhost/
http://localhost/~myUserName/
http://localhost/~myUserName/siteFolderName/
Any ideas as to what I’m doing wrong?
Thanks!
|||
“dixiedoo” <webforumsuser@macromedia.com> wrote in
message
news:fbp5vi$mlm$1@forums.macromedia.com…
> Greetings,
>
> I’ve searched through a bunch of forum and support
topics with no success
> so
> here’s a post.
>
> I’m building a site on a Mac using some basic PHP (not
database driven)
> and
> would like to be able to preview the files in a browser.
I’m setting up a
> testing server with PHP/MySQL as the Server Model,
Access as
> Local/Network, and
> the location of the site folder pointed to. My problem
is the URL
> prefix…
>
> I have tried the following URL prefixes and keep getting
the same error
> message in DW (“Dreamweaver cannot use the prefix you
entered to display
> live
> data….HTTP error:0″) and a connection failure in the
browser. The
> following
> attempts include the name of my hard drive, my Mac User
name, and the name
> of
> the folder my site rests in.
>
>
http://myHDname/
>
http://myHDname/~myUserName/
>
http://myHDname/~myUserName/siteFolderName/
>
http://localhost/
>
http://localhost/~myUserName/
>
http://localhost/~myUserName/siteFolderName/
>
> Any ideas as to what I’m doing wrong?
My guess is: you are not actually using a web server to serve
your
documents.
see if reading the documentation helps….
Preparing to build dynamic sites
http://livedocs.adobe.com/en_US/Dreamweaver/9.0/WSc78c5058ca073340dcda 9110b1f693f21-7a31.html
Joris
|||
What do you have in the ‘testing server’ field set up?
This looks correct for the url prefix:
http://localhost/~myUserName/siteFolderName/
dixiedoo wrote:
> Greetings,
>
> I’ve searched through a bunch of forum and support
topics with no success so
> here’s a post.
>
> I’m building a site on a Mac using some basic PHP (not
database driven) and
> would like to be able to preview the files in a browser.
I’m setting up a
> testing server with PHP/MySQL as the Server Model,
Access as Local/Network, and
> the location of the site folder pointed to. My problem
is the URL prefix…
>
> I have tried the following URL prefixes and keep getting
the same error
> message in DW (“Dreamweaver cannot use the prefix you
entered to display live
> data….HTTP error:0″) and a connection failure in the
browser. The following
> attempts include the name of my hard drive, my Mac User
name, and the name of
> the folder my site rests in.
>
>
http://myHDname/
>
http://myHDname/~myUserName/
>
http://myHDname/~myUserName/siteFolderName/
>
http://localhost/
>
http://localhost/~myUserName/
>
http://localhost/~myUserName/siteFolderName/
>
> Any ideas as to what I’m doing wrong?
>
> Thanks!
>
|||
Osgood wrote:
> What do you have in the ‘testing server’ field set up?
>
> This looks correct for the url prefix:
>
>
http://localhost/~myUserName/siteFolderName/
Is your site root folder in the ‘Sites’ folder in your
username folder?
|||
I am only using the PHP for includes and minor functions like
setting the current page to highlight the tab. Otherwise, they are
static, non database-driven pages. The PHP documentation discusses
installing MySQL and so on. But for non-database pages, is this
really necessary for local testing?
|||
Here is the actual path to where my site lies on the
computer:
myHDname:Users:myUserName:Desktop:Current
Jobs:SITES:siteFolderName:
> This looks correct for the url prefix:
>
http://localhost/~myUserName/siteFolderName/
Unfortunately that one doesn’t work.
|||
dixiedoo wrote:
> Here is the actual path to where my site lies on the
computer:
>
> myHDname:Users:myUserName:Desktop:Current Jobs:SITES:FB:
Humm I’m not familiar with that set up – Desktop:Current
Jobs?
As far as I know theres only two places that a dynamic site
can exist on
a Mac
1. Macintosh HD:Users:USERNAME:Sites:FOLDERNAME:
or
2. Macintosh HD:Library:WebServer:Documents:FOLDERNAME:
For 1. you would use this url prefix:
http://localhost/~USERNAME/FOLDERNAME/
For 2. you would use this url prefix:
The caps in the above are replaced by your username and site
folder name
(use lowercase) I was just using caps to emphasis
> > This looks correct for the url prefix:
> >
http://localhost/~myUserName/siteFolderName/
>
> Unfortunately that one doesn’t work.
>
|||
Greetings,
I moved the site folder into Macintosh
HD:Users:USERNAME:Sites:FOLDERNAME:
and set the URL prefix to this:
http://localhost/~USERNAME/FOLDERNAME/
When I preview in browser I get a “Unable to Connect: Firefox
can’t establish a connection to the server at localhost.” page,
with a URL of:
http://localhost/~USERNAME/FOLDERNAME/index.php
Any suggestions? Thanks!
|||
>
http://localhost/~USERNAME/FOLDERNAME/index.php
>
> Any suggestions? Thanks!
try
http://localhost/
and
http://localhost/~yourshortusernamecasesensitive/
(look at hard drive/users/ to see what it exactly is)
do you see the apache/apple welcome page? (trying to confirm
that apache is
running)
–
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
|||
> Here is the actual path to where my site lies on the
computer:
>
> myHDname:Users:myUserName:Desktop:Current Jobs:SITES:FB:
can you give the actual hard drive name and username, to rule
out odd
character encoding issues??
open a new blank dw document.
–>don’t save it<–
insert some image that’s in this site’s Local Site Folder.
from source, copy this <img tag and paste in reply.
–
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
|||
dixiedoo wrote:
> Greetings,
>
> I moved the site folder into Macintosh
HD:Users:USERNAME:Sites:FOLDERNAME:
> and set the URL prefix to this:
http://localhost/~USERNAME/FOLDERNAME/
>
> When I preview in browser I get a “Unable to Connect:
Firefox can’t establish
> a connection to the server at localhost.” page, with a
URL of:
>
http://localhost/~USERNAME/FOLDERNAME/index.php
>
> Any suggestions? Thanks!
>
As Alan has pointed out make sure you have Apache running on
your machine.
Type this into your browser:
http://localhost/~yourusername/
If Apache is running then you should see a page which says:
‘X Your Website Here’
If your don’t see that then you need to turn Apache webserver
on:
System Preferences>Internet & Networking. Click on the
‘Sharing’ folder.
Select ‘Personal Web Sharing’ and click ‘Start’
Close the panel and retry in your browser.
http://localhost/~yourusername/
Also one other point, which I assume yu have done, is you
need to edit
the site-set up details in Dreamweaver to reflect where the
site folder
now exits.
|||
Alan and Osgood,
We are getting warmer. Setting up the web sharing in the
system preferences worked!
Except…
When I preview in browser, it only gives me the source code,
filling up the window as if I were viewing source. Any clues as to
why?
I appreciate all the help!
|||
Anyone know why “preview in browser” displays the source code
and not the web view of my page?
|||
> When I preview in browser, it only gives me the source
code, filling up the
> window as if I were viewing source. Any clues as to why?
What file extension does the page have?
You may need to configure Apache so it knows how to handle
it.
–
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
|||
It’s a PHP page. Any suggestions for configuring this on a
Mac (OS 10.4.10)?
|||
> It’s a PHP page. Any suggestions for configuring this on
a Mac (OS 10.4.10)?
Yes- Install php.
Preparing to build dynamic sites
http://livedocs.adobe.com/en_US/Dreamweaver/9.0/WSc78c5058ca073340dcda 9110b1
f693f21-7a31.html
You should install MySQL also so it’s available.
–
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
Related posts:
- AMP testing server problem
- Configuring Testing Server
- testing server error message
- SETUP SITE’S TESTING SERVER PROBLEM
- Testing Server Settings
Related posts brought to you by Yet Another Related Posts Plugin.