Preview mapping issue when working out of Dropbox

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
dfoy
Posts: 5
Joined: Wed Jan 02, 2013 1:14 am

Preview mapping issue when working out of Dropbox

Post by dfoy »

I use WeBuilder version 11.4.133 and have only been experimenting for a few weeks. I store my web projects in Dropbox so I can work on them from several different machines. I have WeBuilder installed outside Dropbox. Everything works correctly (and I really like the program) as long as I preview with the internal server.

For various reasons, mostly having to do with my desire to use Zend Framework, I want to preview using Zend Server Community Edition (which I abbreviate as ZS), which installs Apache and the framework as part of its own somewhat complex site structure.

If I install ZS in Dropbox there is endless grief because the Zend configuration database constantly updates itself, which means Dropbox is constantly digesting and burping up a large, complex file which makes everything else crawl. For that reason, I install ZS in its own directory on my C drive, where it works just fine by itself.

This means the PHP and HTML files I work on, which are as I said located in Dropbox, are obviously not located in the C:/zend...htdocs folder.

My problem is that I am not able to interpret the instructions for how to use mapping (menu>options>preferences>preview>mappings) correctly.

When I think I have set up the mapping correctly and I disable the internal server and enable mapping, I do not get previews. Instead I get /preview.htm ("Your software is not yet set up...etc").

The mapping I am using for the "web server path" is http://localhost/. I'm sure that is correct.

The mappings for "local or ftp path" that I have tried are C:\zend\ZendServer\bin\, C:\zend\ZendServer, and C:\zend.

I have also tried mapping to c:\zend\Apache2, C:\zend\Apache2\bin, C:\zend\Apache2\cgi-bin, C:\zend\Apache2\htdocs\.

I suspect I have to modify the Apache configuration. Does this sound correct?
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Preview mapping issue when working out of Dropbox

Post by Aivars »

What happens of you copy a file C:\zend\Apache2\htdocs\ manually and then preview it by opening http://localhost/...your file... in browser? Does the preview work then?
Blumentals Software Programmer
dfoy
Posts: 5
Joined: Wed Jan 02, 2013 1:14 am

Re: Preview mapping issue when working out of Dropbox

Post by dfoy »

Thank you for your reply.
Aivars wrote:What happens of you copy a file C:\zend\Apache2\htdocs\ manually and then preview it by opening http://localhost/...your file... in browser? Does the preview work then?
Please forgive me, but I am not sure I understand your suggestion. Do you mean "what happens if I try to preview a PHP file that is located in C:\zend\Apache2\htdocs\"?

If I do that, it works fine. I am able to preview a PHP file located there.

I think I should point Apache to my files, which are located like this:
"D:\Dropbox\Websites" is the root of my working files.
Under it I have actual sites in subdirectories, such as "D:\Dropbox\Websites\Examplesite\index.php"

I have had very little experience editing Apache configurations. I can think of two approaches, the first to create an alias for localhost and the second, an alias for each of my Dropbox working directories.

I assume I could create an alias for /localhost to the root directory of my working files like this:
# Alias /webpath /full/filesystem/path
Alias /localhost "D:\Dropbox\Websites\"
I believe this would require me to always have a full path in the browser address bar (localhost/Examplesite/index.php) and WeBuilder's F2 and F12 previews would not be able to find index.php.

I could also alias /localhost to "D:\Dropbox\Websites\Examplesite\" but I assume then I would be limited to previewing only Examplesite and would not be able to preview files in any of the other subdirectores such as D:\Dropbox\Websites\Otherexample\OtherIndex.php.

The other option is to create Apache virtual directories for the web sites I am working on. I have no experience with that at all but I have been searching with Google for help.

I assume I would edit httpd.conf and add something like this for each site:
# Alias for examplesite
Alias /examplesite "D:/Dropbox/Websites/examplesite"
<Directory "D:/Dropbox/Websites/examplesite">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
I have a very poor understanding of how browsers (and Preview) traverse paths. Would F2 and F12 be able to find the page?
Do you have recommendations? Your attention and help is much appreciated.
dfoy
Posts: 5
Joined: Wed Jan 02, 2013 1:14 am

Re: Preview mapping issue when working out of Dropbox

Post by dfoy »

I edited httpd.conf as follows:

# <Directory "C:\zend\Apache2/htdocs">
<Directory "D:\Dropbox\Websites/newWebFP">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

My WeBuilder mapping is: D:\Dropbox\Websites\newWebFP\ and //localhost/

When I F2 in WeBuilder I no longer get sent to the "The software is not yet configured for previewing PHP files" error page. Now I do succeed in connecting with the server. However I do not get a preview of my page. On IE and FireFox I get a blank page. On Chrome I get their standard error page "Oops! This link appears to be broken."

Do you have any suggestions?
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Preview mapping issue when working out of Dropbox

Post by Aivars »

The first thin you need to do is to make sure you can preview these pages via browser at all, taking WeBuilder out of equation. After you can open your pages from Dropbox folder in internet browser via http://localhost/.... you can be sure that your configuration is correct and then you can set up WeBuilder mappings. Apache error logs can be a great help in this.
Blumentals Software Programmer
Post Reply