Copy link to clipboard
Copied
Hello,
I am using DW CS5 and have installed XAMPP for my Server/PHP/DB package (which is the same as my live site).
I have gone thru every tuitorial and all information on this subject, and unfortunately I can't get the server set up correct. Other than my page not showing in a browser (or live view) when I try to view it, DW just says: "Dynamically-related files could not be resolved because the site definition is not correct for this server" when I have index.php open and try to find the files.
One major question is I am unsure of what folder to have as the root folder of the site, which has a public_htlm directory and www directory - or do I just use the main folder they are both located in as the root folder?
(Not to get too deep with this first question, but I also looked at the error log file in Apache c:\xampp\apache\logs\error.log and it is not finding the following:
[Tue Oct 09 14:26:38.573504 2012] [:error] [pid 3100:tid 1488] [client ::1:56261] script 'C:/xampp/htdocs/BusinessTube/index_e5pebna8e.php' not found or unable to stat]
I'm guessing that the file "index_e5pebna8e.php" is a cached version of the file generated by index.php - but I'm unsure why it is not being 'found'.)
Second question is about having to set the php.ini file to listen to port 88 as this computer also has IIS installed. I have done this, and it works with a local project directly from NetBeans (which I have to use for a PHP development class). How will this change my DW site definitions? I'm assuming that anywhere I would have localhost I will now need to have localhost:88 but once again I'm not sure.
I am eager to get this site working locally so I can start using the new PHP skills I'm learning - any help will be GREATLY appreciated.
Kirk
Copy link to clipboard
Copied
KBishopp3 wrote:
(Not to get too deep with this first question, but I also looked at the error log file in Apache c:\xampp\apache\logs\error.log and it is not finding the following:
[Tue Oct 09 14:26:38.573504 2012] [:error] [pid 3100:tid 1488] [client ::1:56261] script 'C:/xampp/htdocs/BusinessTube/index_e5pebna8e.php' not found or unable to stat]
I'm guessing that the file "index_e5pebna8e.php" is a cached version of the file generated by index.php - but I'm unsure why it is not being 'found'.)
The random characters appended to index indicate that you're using temporary files to preview in the browser.
Open Preferences from the Edit menu.
Select Preview in Browser from the Category list on the left
Deselect the option to preview using a temporary file.
Second question is about having to set the php.ini file to listen to port 88 as this computer also has IIS installed. I have done this, and it works with a local project directly from NetBeans (which I have to use for a PHP development class). How will this change my DW site definitions? I'm assuming that anywhere I would have localhost I will now need to have localhost:88 but once again I'm not sure.
Correct. When setting Web URL in the Servers section of Site Setup, use http://localhost:88/ followed by the folder name.
Copy link to clipboard
Copied
Hi David,
I went in and checked the settings for 'Preview in Browser' and the option to use temporary files was not checked. I'm not sure what could be going on (since I didn't create the site, just trying to get familiar and maintain it) making the index file appended.
I wasn't sure, should the folder 'public_html' be the site root, or should it be the main folder containing all files (including public_html)?
Thank you very much for your reply. I've been reading many of your articles today... I was hoping this might hit your screen.
Kirk
Copy link to clipboard
Copied
>I wasn't sure, should the folder 'public_html' be the site root,
>or should it be the main folder containing all files (including public_html)?
It should be set to public_html. The site root is the folder that represents the top level that is accessible from the web. You may have folders above that, but they are not accessible from the web. If you set your site root to a folder above public_html, then your files would be ftp'd to the wrong folders and DW would not manage your links correctly.
Copy link to clipboard
Copied
I am still getting a blank page when I try to view my site. I think I'm very close to the correct setup, as the site name on the TAB in the browser shows up, as does the favicon (which is referenced with a web URL).
Also, when I open a php file, there is still a message that states: "Dynamically-related files could not be resolved because of an internal server error". I can click RETRY but it fails.
I'm unsure of what it is that could be causing the trouble...
Kirk
Edit:
Also, I have received the following error just a minute ago:
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
I just tried to preview a file in the site other than index.php (index_2.php - an old version I'm guessing) and it came up with the above error, although currently I am not getting this when I try to preview index.php. I have before, but I'm not sure what I did... I've tried so many things over the last 2 days. When I looked in the .htacess file, gzip compression was off. I'm not sure what other compression could be occuring.
Just another note, I had to comment out a line in the config.php file:
set_magic_quotes_runtime(0);
or else I would get an error say it was depricated... with it commented out, no error occurs... but also no page.
Message was edited by: KBishopp3
Copy link to clipboard
Copied
If you're getting the title and favicon, it means there's an error in your PHP that is preventing the page from being displayed. See http://forums.adobe.com/thread/452941.
I suspect that the page is trying to include files that it can't find, which would also explain your problem with Dreamweaver not being able to find dynamically related files.
I see from your first post that your page is located in C:/xampp/htdocs/BusinessTube/. That is the value that needs to be in the Server Folder field of the testing server definition in Dreamweaver. The value for Web URL should be http://localhost/BusinessTube/.
Sometimes, this sort of setup won't work for local testing because it results in filepaths being misinterpreted. The htdocs folder in XAMPP is the server root (the equivalent of public_html on your remote server). If you're having problems with filepaths, there are two solutions:
Copy link to clipboard
Copied
Hi David,
I must apologize for being "all over the place" with this subject. The latest is that I am no longer getting the Page Title and Favicon. Now I'm just getting the "Content Encoding Error: The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."
I have tried to re-trace my steps backwards to be able to get back to "Title & Favicon", but I am unable to do so. I've been trying so much of "change this - and try... no, ok change that and try... etc, etc.). It is frustrating because I got it that far once, but now can't get back there.
I just wanted to clarify, in your previous post you mentioned "The value for Web URL should be http://localhost/BusinessTube/." and I wanted it to double-check that with you, that it is not supposed to be "http://localhost/BusinessTube/public_html/". I am going to be creating a virtual host for the site as you suggested, but I'm thinking I need to get back to "Title & Favicon showing" before that would matter anyway.
Thank You.
Kirk
Copy link to clipboard
Copied
You're getting mixed up over the meaning of public_html.
Most hosting companies that offer PHP use the Apache web server, which has a single server root folder called htdocs. XAMPP also uses Apache, so c:/xampp/htdocs is the XAMPP server root, and its URL is http://localhost/.
Although Apache has only one server root, virtual hosts make it possible to run multiple websites on the same server. Each virtual host is located in a separate folder that acts as the site root. It's common for this folder to be called public_html. What bregent was describing was the location of the site root on your remote server. The name of the site root in your local testing setup can be whatever you decide to call it.
When learning to use PHP, most people use a subfolder of the Apache server root because it doesn't require further configuration. However, once you're working with real sites, it's normal to set up a virtual host for each one. I create all my virtual hosts in a folder called C:/vhosts. So for example, I might have one in C:/vhosts/site1. In the virtual hosts configuration file, I designate C:/vhosts/site1 as the root folder for a virtual host called site1, which can then be accessed as http://site1/.
The only reason I might have a folder called public_html is if I designated C:/vhosts/site1/public_html as the site root.
I hope that's clear. Once you understand the principle of virtual hosts, the concept of the site (or server) root becomes obvious, but it can be difficult to explain. I remember it took me a while before the concept sank in.
Copy link to clipboard
Copied
David,
Thank you for explaining that for me.
So it turns out my initial set up was right, but the page was not rendering because of errors causing it to timeout. When error reporting was turned on, I got a bunch of errors, but then the page would render. Since the page runs correctly from the live web-server, I am led to believe these errors are eing caused by PHP and Apache version differences. I was going to look into changing the versions in XAMPP today... is this a waste of time? I was thinking I might just set up a folder on the site and copy the site there so I have a "non-live" version to use for testing.
Thank you again.
Kirk
Copy link to clipboard
Copied
Installing an older version of XAMPP that matches the PHP version on your live server is definitely a possibility. However, if your site is generating errors, you need to identify the cause of those errors and determine how serious they are. New versions of PHP only rarely break backwards compatibility. So, unless the errors are caused by features that have changed in PHP 5.4, you should try to correct them. Otherwise, you run the risk of your live site being unusable if the hosting company upgrades the server.
I see that you had problems with set_magic_quotes_runtime(0). This function has been removed from PHP 5.4, as have magic quotes. You can read more about magic quotes here: http://docs.php.net/manual/en/security.magicquotes.php.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more