New to Dreamweaver and I'm having a bit of a problem getting a test server going with PHP. I suspect this is NOT a Dreamweaver problem but something to do with OS X (actually it's something to do with me not understanding something).
Here's what I know... Apache is running, PHP is enabled (you can call phpinfo() etc. no problems). That's all good. I'm not logged in as the administrator, I have a regular user account which I use to do just about everything that doesn't require an administrative account. So... the path to the test server should be:
and the host would be:
Now, when I'm working with a straight ahead html document and I test the site by selecting test using Safari or test using Firefox it works just fine. If however I use the php version of the website it will only load the first page accurately, subsequent calls render the URL to http://localhost/ as the root and not http://localhost/~username as should be the case. I'm pretty sure it's not my code as I've uploaded this to the actual server it will eventually run on and it works just fine.
Let me give a bit more detail. Let's say I have the following structure:
That's all on the root level. I have two sub folders.... I'll call them one and two and inside each sub folder are pages that have serveral topics so...
Inside one is:
Inside two is:
Every page uses the same navigation bar which is included in menu.php and it's called from all of the pages using include( "menu.php" ); My menu.php file references all the paths from the root level of the website. I think this is what's tripping things up... in other words let's say I'm looking at /two/topic2.php and I want to go to the contact page. The href link is to /contact.php. At that point what gets called is:
I want the "root" to be http://localhost/username otherwise it requires me to login as an admin to do the testing or give permissions to /Library/WebServer/Documents, neither of which I want to do.
I thought that by going into manage sites, selecting "testing server" and entering http://localhost/~username would tell Dreamweaver that ~username is the root for the purpose of testing but... that's not how it's working out.
Any advice as to what I should be doing to get around this?
Nevermind... the solution was to NOT use Apple's implementation and instead use MAMP:
In the preferences of MAMP under Apache I set the path to the location of the development folder for the website. Now using http://localhost points to that path as the root folder.
I'm sure there's another way to do this by changing a configuration file somewhere but this has me happy for now.