In a recent email exchange with Karlis, I requested information on a problem I was having getting php preview to work on my system. My conclusion in the end was that a better explanation inside WeBuilder would have helped. In the exchange, Karlis agreed and requested I post some of my feedback I sent him here. So, here it is:
*************************************
**********************************
From: support@blumentals.net on Wed, 4 Jan 2006 15:09:44 +0200
**********************************
>
> Dear Dave,
>
> Thank you for your message. Ok, this task requires some experience
> and knowledge about web server paths and document directories. In
> your case...
>
> You should map
> C:\Program Files\xampp\htdocs\ <- it is called a document root to
> http://localhost/ <- web path
>
> More help may be found here:
> http://forums.blumentals.net/viewtopic. ... ight=xampp
>
> Kind regards,
> Karlis Blumentals
Hi, Karlis!
A couple of suggestions, if I may presume?
First, many users will be ignorant of servers and mappings (like I was before I did some research. I'm odd that way!;), so a better explanation might be to say something to the effect of:
--------------------------------------------------------------
For a local web server, determine where the DocumentRoot for your web server is located. A typical Windows system might have an Apache server with the server installed at:
C:\Program Files\Apache Group\Apache[x]
Where "[x]" may be a number designating the major release of the server. Under this directory you usually find a "conf" directory containing a file named "httpd.conf" (the "HTTP Daemon" process configuration file). Within this file is a "directive" named "DocumentRoot" which specifies the default directory for all files requested from the server. That is, if a user requests "http://<your_server.com>/foo/", the server will look for a file/directory in "DocumentRoot" named "foo". So, if you copy your directory of WeBuilder files to the Document root and specify that in WeBuilder Options->Preferences-Preview-Mappings as the location of your files and "http://localhost/" as the web server mapping, the preview will proceed.
E.G. if your DocumentRoot is specified as
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
You then populate the Preview->Mapping dialog's first text area with
C:\Program Files\Apache Group\Apache2\htdocs
Either by typing in or using the file/directory browser button to that location.
And then type in the second text area in the Preview-Mapping dialog
http://localhost/
(providing of course, this is a local server with the name "localhost")
------------------------------------------------------------
This or similar verbiage in the popup would make life easier for those of us who are web server illiterate!;)
Now, for the more knowledgeable user (which I now am) a cleaner alternative that would require no copying and wouldn't care where the files were located (and by the way, should only be used on a local server since it amounts to a security compromise. By local server, I mean a developer's or "home" system). You can do the following:
Locate the httpd.conf file as above. Find the "Aliases:" section. Now, supposing you do your development work on a partition D: in the Projects directory. You then add this to the httpd.conf file in the Aliases section:
Alias /blumentals/ "D:/Projects/"
<Directory "D:/Projects">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
You then make the entries in Options->Preferences->Preview->Mapping of:
D:\Projects
http://localhost/blumentals/
Now, whenever you preview a file, as long as it is in a subdirectory of D:\Projects, WeBuilder will correctly preview it (so long as the files it references, if any are available either in this aliased area or their reference is to a legitimate web URL).
P.S. Don't forget to restart the web server so it can pick up the httpd.conf changes!;)
I'm currently using the second solution, and, I believe it solves the problems for internet (i.e., non-local) usage, too!;) It sure beats copying files all over the place and trying to keep them straight!;)
I'd like to suggest also, that you consider implementing solution #2 within WeBuilder (and Rapid PHP) as an option. That is, if the user elects to have it done, WeBuilder could, at installation or any time thereafter, make a modification to the httpd.conf of adding the above to the file for the user. This should have pretty broad application since, according to the latest round up of world news, Apache comprises roughly 70% of the servers world wide!;)
JMTCW,
Dave S.
**************************************
I hope this information will be helpful to others who may be having problems getting php preview to work. Karlis has advised me that the upcoming version(s) of software will have a better "tutorial" on the included page for preview failure due to non-configuration.
HTH,
Dave S.
How I use php preview
Moderator: kfury77
Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
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;