Search webbot in an Apache server

S

Sam Hobbs

See: http://simplesamples.info

Near the bottom are a couple of search forms, neither of which work. The
first one was created using FrontPage 2002, but the form does not show. The
webbot comment tag is:

<!--webbot bot="Search" S-Index="All" S-Fields="Weight" S-Text="Search this
site for:" I-Size="60" S-Submit="Start Search" S-Clear="Reset"
S-TimestampFormat="%m/%d/%Y" TAG="BODY" -->

I am using "php" for the extension for my pages, eventhough I actually am
not using php. Is the extension a problem?

I saerched the Microsoft FrontPage newsgroups but did not find much that
seems to be relevant. I saw a message suggesting use of the "Entropy Search"
and that is the second form on the page. The form works but the search gets
no results.

Since the site is hosted on someone else's server, I don't have access to
that, but if there is something that needs to be done on the server, then
the owner is likely to do whatever is needed.

The Apache version is 1.3.31 with a Kernel version of 2.4.20-31.9smp.
 
T

Thomas A. Rowe

In order to use any FP run-time components, such as Search, Forms, Discussion Webs, etct., the site
must be hosted on a server that has the FP extensions, and the site must be publish to the server
via FP's http mode and all pages with the components must have either a .htm or .html extension.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sam Hobbs

Thank you.

I forgot to mention that I have been using FrontPage to maintain the site,
so I think the first two requirements are not a problem.

I assume that .htm and .html are not the only extensions; at least asp must
be a possibility too. So if you know where that is documented then I will
sure appreciate knowing. FrontPage for example does not edit a php page as
HTML by default but FrontPage can be configured to do that.


Thomas A. Rowe said:
In order to use any FP run-time components, such as Search, Forms,
Discussion Webs, etct., the site
must be hosted on a server that has the FP extensions, and the site must be publish to the server
via FP's http mode and all pages with the components must have either a
..htm or .html extension.
 
T

Tom Pepper Willett

Apache for Windows or for Unix/Linux?

--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
FrontPage 2003 Product Information:
http://www.microsoft.com/office/frontpage/prodinfo/default.mspx
Understanding FrontPage:
http://msdn.microsoft.com/office/understanding/frontpage/
===
| Thank you.
|
| I forgot to mention that I have been using FrontPage to maintain the site,
| so I think the first two requirements are not a problem.
|
| I assume that .htm and .html are not the only extensions; at least asp
must
| be a possibility too. So if you know where that is documented then I will
| sure appreciate knowing. FrontPage for example does not edit a php page as
| HTML by default but FrontPage can be configured to do that.
|
|
| | > In order to use any FP run-time components, such as Search, Forms,
| Discussion Webs, etct., the site
| > must be hosted on a server that has the FP extensions, and the site must
| be publish to the server
| > via FP's http mode and all pages with the components must have either a
| .htm or .html extension.
|
|
 
T

Thomas A. Rowe

The .asp or .aspx extensions are also not an option, the FP run-time webbot require that the page
they are inserted on have .htm or .html extension. This have been this way since the first version
of FP and there is no configuration setting to change this.

This is because the FP extensions are design to only process .htm or .html files, when a file is
..php or .asp, the .php or .asp engine handles the processing of the page, not the FP extensions.
Feel free to search the MS KB to verify this.

Yes, FP can be set use Notepad or any other editor to edit any file type, but to effectively edit
..php files in FP, you have change the php.ini file to use ASP style <% %> instead of the standard
PHP <? ?> tags.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sam Hobbs

I am sorry, I equate Apache with Unix eventhough I know that Apache woks
under Winows too.

So for my site the host is running Linux or some version of Unix. I am
nearly certain it is Linux.

I am using an Apache server due to cost, but I expect to switch back to IIS
under Windows soon.
 
S

Sam Hobbs

I must have been very lucky then, since I did not know any of this. My site
was previously hosted by a IIS/Windows server and I used an asp extension
for most all pages. I even had asp code in them to make it easier for me to
update links to the MSDN in case Microsoft decided to reorganize MSDN again.
Yet the FrontPage search worked just fine then. I did have to add asp to the
list of extensions that FrontPage uses to determine what to use for each
extension. So I did not know that it is not supposed to work and I got it to
work for me. Perhaps I can teach Microsoft a couple of things. I definitely
was able to edit the HTML in the asp pages just fine; the asp of course was
ignored by FrontPage.

I was also able to edit the HTML in a file with a php extension. I had a hit
counter in my "home" page that was coded in php. I edited the HTML using
FrontPage and I edited the php code using the "HTML" tag. I have since
removed the hit counter but about 99% of my pages have a php extension yet I
edit them using FrontPage as easily as if the extension is html.
 
T

Thomas A. Rowe

Having a page with .php extension means nothing, the issue is with PHP scripting on the pages. FP
supports ASP/VBScript, JScript and JavaScript tags, but not the <? ?> PHP tags when edited with the
FP editor.

I never indicated that you couldn't edit the page via FP.

This is the normal error message that you should get when attempt to use a run-time webbot on page
that doesn't have a .htm or .html extension:

Cannot run the FrontPage Server Extensions on this page: "search.asp"

Here is a link to the MS KB related to use the search on non .htm(l) page:
http://support.microsoft.com/default.aspx?scid=kb;en-us;292629&Product=fp2002

You will see the reason why it work when you were on the Windows server.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sam Hobbs

You said "Yes, FP can be set use Notepad" .... "but to effectively edit .php
files". If you did not intend to imply that in order to edit the HTML in a
php file as HTML we must change the php.ini file then what you said is
definitely confusing.

Note that my problem is not an error message, so I don't know what you mean
by error message. If you are referring to the error message in the KB
article, then please understand that I am not getting the error message.
What I am getting is no form, so it is not possible to do anything more and
therefore it is not possible to get an error message. If you want to help,
then please look at the page to see what you can see. You will see no form.

That KB article seems to say that it is not possible to use the search
component on an asp page, yet it seems to say that it is possible if
Microsoft Index Server is installed.
 
T

Thomas A. Rowe

Sam.

To clear up the edit of .php files, if the file only contains standard HTML tags, then FP has no
problem editing the file, however if the .php contain script tags using <? ?> then FP will have
problem parse those tags unless the tags are change to <% %>.

As far as the Search component, as you see the KB indicated that the search component will work on a
..asp if on a Windows IIS server with Index Server installed and running and managing the search for
the specific web site. It however will not work on a non .htm(l) page when the WAIS search engine is
being used. The WAIS search engine is use by the FP extensions on all Unix/Linux servers and Windows
IIS server where Index Server is not installed or running, but this depends on the Web Host.

As far as helping you with your search problem, rename your search page .htm or .html or create a
new page with .htm or .htm(l) and see if the search component works directly on the server via FP.
If this works, then you have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
A

Andrew Murray

we're not talking about FILE extensions - server extensions are scripts on the
server to make the forms work.
 
S

Sam Hobbs

Thank you.

See: http://simplesamples.info/Tests/ClientData.php

If has php code in it, such as:

<p>Your IP is: <? echo GetIP(); ?></p>

I am not sure what you mean by "parse those tags"; FrontPage certainly does
not show the php in the "Normal" view but it does show the rest of the HTML
with no problem. It simply ignores everything between "<?" and "?>". Perhaps
this is an improvement that was slipped in when you weren't looking.

As far as putting the search component in a page with a html extension, see:

http://simplesamples.info/Search.html

It behaves the same as when I have it in my main page; there are no results
from a search. Perhaps there is an easy solution, but unless I another
suggestion, I will assume it won't work.

The next step is for me to try to get the "Entropy" search to work, but that
is outside the scope of this newsgroup.


Thomas A. Rowe said:
Sam.

To clear up the edit of .php files, if the file only contains standard HTML tags, then FP has no
problem editing the file, however if the .php contain script tags using <? ?> then FP will have
problem parse those tags unless the tags are change to <% %>.

As far as the Search component, as you see the KB indicated that the
search component will work on a
 
S

Sam Hobbs

I was talking about file extensions. The word "extension" is very general
and must be qualified. If someone meant "server extension" then I
misunderstood. The only type of extension I was discussing and that I
understood as being discussed here is file extension.
 
S

Sam Hobbs

It works for you? Very interesting. Thank you for trying it. I am using XP
Pro with all the current updates so it should work for me too, but it does
not.
 
T

Thomas A. Rowe

Sam,

Use google groups to search this newsgroup say over the last two week for PHP and you see a user
that is having problems with FP and the <? ?> PHP tags, also see the link, the bottom of the page
"Instructions":

http://www.microsoft.com/downloads/...e0-fd66-49ed-b1f8-52073d94ea31&displaylang=en


--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sam Hobbs

Thank you, however I am not having a problem with php. Not even for testing.

For testing php, I have two or three servers, one of which is Apache. I also
have AnalogX's SimpleServer and Omnicron Technologies's httpd. So I just
have to start one of them and browse the php page; then I can edit in
FrontPage, save and then reload the page in the server to test.

If I do much development before moving back to IIS, then I intend to use
Java instead of php. Then I will need to convert my file extensions to jsp
but I would have to convert the file extension anyway if I used asp. So that
is why it does not make sense for me to spend much more time trying to get
my page working using a php extension.

The advantage of jsp is that I can use the same language for both server and
client. That is not true for php and as far as I know it is not possible to
use the asp language in the client. However I am not familiar with the .Net
technology but that is getting off-topic.


Thomas A. Rowe said:
Sam,

Use google groups to search this newsgroup say over the last two week for PHP and you see a user
that is having problems with FP and the <? ?> PHP tags, also see the link, the bottom of the page
"Instructions":
http://www.microsoft.com/downloads/...e0-fd66-49ed-b1f8-52073d94ea31&displaylang=en
 
T

Thomas A. Rowe

Personally, I try to avoid depending on the client (browser) doing anything other then just display
the page content that is sent to it, on request from the server, which is why I like server-side
scripting (ASP/VBScript)

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sam Hobbs

There are some things that are more efficiently done by the client, such as
rendering graphics. I am not saying all graphics; I am saying it depends.
Also, there are some things that must be done in the client, such as
client-only (hta) applications. See:

http://simplesamples.info/Scripts/HideDrives.php


Thomas A. Rowe said:
Personally, I try to avoid depending on the client (browser) doing
anything other then just display
 
T

Thomas A. Rowe

All graphics must be rendered by the client or a helper application running on the local PC.

When I build web applications, I don't count on the client be able to do more than being able to
display a popup window or very basic form field validation via JavaScript.

I would never use a .hta application, as it is not well support.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top