PHP previews are a mess - What is going on
A few years ago I did a lot of PHP/MySQL web development for my site. MAMP is set up on my computer, the local database is set up, everything works just fine if I go to http://localhost/mstrg.com/main/ to preview a new template for the site. Here's proof:

The only thing I have done to this template so far is to load it up in the "main" subdirectory, copy the files, and change the extension to PHP.
When I open the page in Dreamweaver, even though the testing server is properly set up, most of the template shows up in the preview (live), it's just missing all of the images and it doesn't scale properly.

If I choose preview in any browser I get this mess and look at the URL.

Where did http://127.0.0.1:56565/preview/app/index.html come from? The file name is index.php and it's in the main subdirectory. Entering the localhost URL works just fine. Everything comes in as it should. It doesn't matter what file I am previewing the file name always comes up the same.
I did not have any of these problems with previous versions of Dreamweaver. Previews always went to the localhost/directory/filename and everything always worked.
Before you start thinking that there is something in the code that fouls things up, all I have to do is change the extension from PHP to HTML and Dreamweaver perfectly displays a preview and it scales and shows the responsive design as expected:

But the preview is still fouled up completely and the weird file name and path are still fouled up.
Here are my questions: Why did Dreamweaver start generating these weird preview files? How do I get back to a version of Dreamweaver that works because the last version that I used, and had been using for years, was about 6 years ago? If enabling a PHP localhost and browsing to the file you want to preview works perfectly, why is Dreamweaver having so much trouble with the file? I have tried all available current versions of Dreamweaver.
One last thing. If I connect this template to a database and just test for the connection and echo "Successfully Connected" Dreamweaver loses all of the rest of the page. I just get a preview that says "Successfully Connected." All of the images and the placeholder text is gone.
My only option now is to just browse to the file in my browser by starting with localhost and live with the complete lack of a preview in Dreamweaver. This is a serious problem for me. Any hint at a solution would be appreciated.

