Preview mapping

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;

Preview mapping

Postby jan_huygens » Tue Sep 27, 2005 6:21 pm

First, let me say what an excellent program WeBuilder is!

To date i have just been using the HTML/CSS stuff. However I wanted to explore using either PHP or SSI to generate some standard items in my pages, rather then having to paste them in each page.

I have installed Apache & PHP, and got a couple of basic scripts which work when in the server document root directory.

However, I did not want to be always moving my pages to that directory, so i looked around in WeBuilder and came across the Preview mapping option. Well, this worked fine on my test PHP files, both in the WeBuilder preview and when previewing in a browser :)

I then tried a simple shtml file from same path [with a single include] statement [no php]. When i tried to preview this I get a 'Page cannot be found error'.

I finally tried a straight HTML file, again from same path, which has always worked, and still get this 'Page cannot be found error' :(

is this correct, i.e. if i use preview mappings to preview a PHP file, then it stops preview of HTML, or have i done something wrong?

thanks for your help
Jan
jan_huygens
 
Posts: 2
Joined: Tue Sep 27, 2005 6:08 pm

Postby daveporter » Wed Sep 28, 2005 10:58 am

Hi Jan,

I think you will have to tweak the php.ini file to get non .php files to recongnise php content in them...

Hope this helps - Dave Porter
daveporter
 
Posts: 51
Joined: Sun Jun 12, 2005 9:04 am

Postby jan_huygens » Wed Sep 28, 2005 4:31 pm

errm - you are speaking to a real PHP newbie here, so my questions may seem stupid!

I think you will have to tweak the php.ini file to get non .php files to recongnise php content in them...


anyway - if a .non php file has no php content at all [like my standard html files], then how can 'it' recognise the php content :?:


I'm still not sure why mapping a directory to the http://localhost/ should stop the preview of straight html [no php, no ssi].

I seem to remember on another thread, that Karlis mentioned the possibility of have a local web server, so that you could preview PHP or SSI without needing this mapping - is there any info on this?

thanks for the help anyway.

Jan


[/quote]
jan_huygens
 
Posts: 2
Joined: Tue Sep 27, 2005 6:08 pm

Postby Karlis » Wed Sep 28, 2005 5:40 pm

The preview should wor equally good with PHP, HTML and whatever other file types as long as the mapping is set correctly and the files are saved under the web server root directory (it can be a subdirectory as well).

Please note that the checkbox "Use mappings when displaying preview" must be checked!
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
Karlis
Site Admin
 
Posts: 3600
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe

Postby blackhawk » Wed Oct 05, 2005 10:32 pm

I was having previewing problems, too, until I moved my php files to the root server directory as you mentioned doing in your response to the initial posting. But, doesn't that kind of defeat the purpose of having a directory for documents?

My Windows XP - Apache - MySQL - PHP setup uses the folloiwng structure:

Server root: www/apache2
document root: www/webroot

When I place documents in www/webroot, for example index.html, and type http://localhost in a web browser, the index.html file opens. Also, when I type http://localhost/index.php, I get the appropriate information. Keep in mind the index.php file is located in www/webroot.

But, based on the information you are providing, HTMLPad 2005, etc., need to have files in the www/apache2 server root in order to be viewable. Isn't there a way for your preview feature to act like the browsers -- displaying (previewing) documents located in the document root directory?

Not sure how all of this works, so I am just wondering if such previewing is possible.

Thanks.
blackhawk
 
Posts: 2
Joined: Fri Sep 30, 2005 6:26 pm

Postby Karlis » Thu Oct 06, 2005 5:29 pm

But, based on the information you are providing, HTMLPad 2005, etc., need to have files in the www/apache2 server root in order to be viewable.


Wrong. If we speak about documents here, we always mean document root (web server document root or web root).

So if you have c:\apache\wwwroot\index.htm
The preview path is http://localhost/index.htm

If you have c:\apache\wwwroot\subdir\index.htm
The preview path is http://localhost/subdir/index.htm

And the mapping of course is c:\apache\wwwroot\ to http://localhost/

I hope this helps :?
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
Karlis
Site Admin
 
Posts: 3600
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe

Postby geego » Tue Oct 11, 2005 10:45 pm

I have a similar situation:
I want to ftp into an IP and open a file called index.php which is into a folder called "pages"
so lets say it is http://100.100.100.100/pages/index.php

I am on a redhat/apache system, so what would I put into mappings in order to previes in webbuilder2005?


I am very new to this soft of thing so your patience is appreciated.
geego
 
Posts: 6
Joined: Tue Oct 11, 2005 4:24 am

Postby Karlis » Wed Oct 12, 2005 3:43 pm

If the IP is your own computer, then you can use localhost and your local document root, if it is remote host then there are two ways.

1. If you do not use built in FTP, you can map your web root e.g. http://remoteip/ to your local root folder for your web pages e.g. c:\mywebpage\, please note that if you want to use just subfolder, you can also map http://remoteip/pages/ to c:\mywebpage\pages\, so your mapping will be limited to this subfolder.

Now the important part is that you need to actually upload your file before you can preview it. So before using internal preview, you have to upload the latest version of file.

2. If you use the built in FTP, you can map http://remoteip/ to your remote FTP folder. This can be done by clicking FTP button in Mappings window. You must add FTP connection, and then connect and select your FTP web root folder, usually it is public_html.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
Karlis
Site Admin
 
Posts: 3600
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe

Postby geego » Thu Oct 13, 2005 2:33 am

I just realized that there is a built in ftp feature to trace the folder so I got the following:
FTP::test\/public_html/test| after connecting and seleting the folder called test which is where the index.php is located.

How do I know where the webserver location is and what does the location format look like?

Thnaks
geego
 
Posts: 6
Joined: Tue Oct 11, 2005 4:24 am

Postby Karlis » Thu Oct 13, 2005 1:35 pm

Web server path looks like this http://www.mysite.com/myfolder/

Please note that you must map precisely FTP and Web server paths.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
Karlis
Site Admin
 
Posts: 3600
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe

Postby geego » Thu Oct 13, 2005 7:25 pm

I seem to be way too slow so let me start again and see if I can get ti this time.

I create a ftp listing in webbuilder and connect to the site and opened a file called admin.php that is in a folder called "livehelp".

so lets say I ftp to 209.209.222.222/support/admin.php and opened it into Webbuilder 2005.

I then edit something in it and save it to ftp to the original location.

I try to preview and it says "not yet configured for previewing PHP files"

I then go to mappings and use the FTP Folder button on the Add Folder Mappings box to go to the original folder where the file is located. It then gave a ftp path as "FTP::Dinix\/public_html/support|"
Where Dinix is the name of I gave the connection I created and support is the name of the folder that admin.php is located.

For webserver path I put http://209.209.222.222 and it says that it is still not configured in preview.

In the preview file box it says "Generate Preview File"
Here are my questions:
Is my filesystem path correct?
is my web Server path correct?
Can I create my own Preview file and how and where would I reate it?


I hope that I have explained clearly and look forward to your reply.
geego
 
Posts: 6
Joined: Tue Oct 11, 2005 4:24 am

Postby Karlis » Fri Oct 21, 2005 3:20 pm

If your FTP path is

FTP::Dinix\/public_html/support|

your web path should be

http://209.209.222.222/support/

please note that the directories must match!
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
Karlis
Site Admin
 
Posts: 3600
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe

Postby geego » Fri Oct 21, 2005 5:50 pm

Thanks karlis.
Done all that and the same situation is still here.
The one thing I have noticed is that in the preview file window, it just says Generate preview File, and does not offer me a file to preview.
Is there a way to tell it which file to preview?
geego
 
Posts: 6
Joined: Tue Oct 11, 2005 4:24 am

Postby Karlis » Fri Oct 21, 2005 10:21 pm

I do not know how to help you. It just works fine for everybody else. I am out of ideas, probably somebody else can help.

The preview file selection box is for CSS files, so that you can preview your CSS file on various HTML files.
Last edited by Karlis on Mon Oct 24, 2005 4:54 pm, edited 1 time in total.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
Karlis
Site Admin
 
Posts: 3600
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe

Postby geego » Sat Oct 22, 2005 3:50 am

When I follow your directions, it automatically updates the file online and I can see the changes on the live website, but I thought I would be able to see the changes in the Webbuilder Preview.

Lets imagine I just got the software and conencting to the internet and imported a file.
I make a change to it. lets say I corrected a word.
I set up the mapping as follows.
Local or FTP Path: FTP::PHP\/public_html/php|
Web Server Path: http://xxx.xxx.xxx.222/live/

I then saved the file and it updated the website and I can see the changes on the website when i refresh the browser.
On the Split Screen Horizontal or Vertical in WebBuilder it shows the following:
The software is not yet configured for previewing PHP files

You can configure this preview window to work with your web server, but you must have a local or remote web server to publish your PHP file.

To enable PHP file preview on your web server:

On the Options menu, click Preferences;
In Preferences window, click Preview folder;
Click Mappings;
Click Add;
Enter your directory containing the files and the corresponding web server address,
for example, c:\apache\htdocs\ and http://localhost/
You do not need to map subdirectories;
Click OK to save settings.
Note: If you use remote web server, you must always upload/save your file to corresponding FTP account before previewing it.

I thought I would be able to see the live file there so can you tell me if I should?
Is there anything else that I should be doing, assuming that I never did anything else at all?
I am sure that there is something pretty simple that I am not doing so any help from anyone is appreciated.
geego
 
Posts: 6
Joined: Tue Oct 11, 2005 4:24 am

Next

Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: No registered users and 11 guests

cron