Dreamweaver can't preview PHP files

Category: Dreamweaver

hunterharmony
Asked:
2013-08-13 1:02 pm EST

Hits: 1,576
Within dreamweaver, there is a button "Live" to be able to see the website live on your Computer as you adjust the code.

For most page I have no problem, however it does not like PHP pages. I get the following error:

"Dynamically-related files could not be resolved because the site definition is not correct for this server"

Any thoughts?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JacobIMH
Staff
9,962 Points
2013-08-13 1:30 pm EST
Hello hunterharmony, and thanks for your question!

When you're using the "Live" button within DreamWeaver to preview your website, this is essentially the same as opening up your web-browser, and then navigating to the HTML files located locally on your hard drive.

This works perfectly fine, because your web-browser is capable of rendering out HTML and CSS for styling the pages, so you see just what you'd see if you published these pages to your website.

However PHP is a dynamic server-side scripting language, meaning that first the code contained within the PHP script must be run on the server and processed, and then the resulting HTML code is displayed to your web-browser.

If you'd like to use this preview functionality of DreamWeaver with your PHP scripts your only option would be to install a web-server on your own local machine, so that it can process the server-side PHP code for you. Adobe actually has a really in-depth write up on setting up a PHP development environment for DreamWeaver that goes over installing a PHP-enabled web-server to your local computer, and defining a PHP site in DreamWeaver.

Of course your other alternative would be to simply upload your PHP scripts to your account with us, and then viewing them over the web from your website. Depending on how much updating of your scripts you intend to do, this could become very cumbersome, and is why a lot of PHP developers do go ahead and setup a local development environment to test on.

If you had any other questions at all, please let us know!

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!