Reply
Perl Search on local Apache
Old 07-05-2003, 12:02 PM Perl Search on local Apache
c2k
c2k's Avatar
Skilled Talker

Posts: 67
Location: Germany
Hi guys,
I would like to integrate a search on a project on my local HD. I run an Apache 2.x to test all my settings and stuff. The stupid thing about that is, that I have no clue of anything concerning the Apache nor Perl. And I don't have webspace or a domain to test it. So I am depending on my Apache ;D

For the search, I need to put a few information into the script (search.pl). But I don't know what to enter. So I am hoping someone of you can help me to figure it out.

That's the help to Matt's simple search:
Quote:
$basedir = '';
This is the base directory to the files you will want to
search. If you have all of your files in /home/joe/public_html
and you want to search files that are in
/home/joe/public_html/work and /home/joe/public_html/fun, then
you would set your base directory at /home/joe/public_html/ and
then put subdirectories into the @files array, since they will be
put together at run time. The $basedir variable just saves you the
time of having to type out the basedir over and over again for
every file you want to include.

$baseurl = '';
This is very similar to the basedir variable except that
it will be used as a base reference to the files you want to search
in terms of the web. For the example above with user joe, his
baseurl would probably be something like: http://joe.host.com/~joe/
so that when the searched files are appended to this baseurl, they
form a complete url to his files to place in the results.

@files = ();
This is an array that includes all of the files you want
to search. The directory paths and filenames should be in
reference to $basedir. Wild cards are allowed in this array, so if
joe wanted to search all html files in fun/ and work/, he would set
his @files array up as: @files = ('fun/*.html','work/*.html'); You
can also search whole directories at one time, like: @files =
('fun/','work/'); This would search all text files located in these
directories. Putting exact filenames will search only that filename.

$title = "";
This variable is used to display the title of your page
in the search results and used to link back to your main page.

$title_url = '';
This is the url that would link to the page $title.

$search_url = '';
This is the url to the search.html page you set up, so
that it can be referenced from in the results page if users want
to make another search.
I installed the apache on E:\Apache2
In this folder the cgi-bin, htdocs and everything else is located.
I entered this information in search.pl:

Quote:
$basedir = '../apache2/htdocs;
$baseurl = 'http://127.0.0.1/htdocs/';
@files = ('*.htm/');
$title = "huhu";
$title_url = 'http://127.0.0.1/';
$search_url = 'http://127.0.0.1/search.html';
But if I enter somehting in search.html I only get a 500.
The error log says the following:
Quote:
[Sat Jul 05 16:44:17 2003] [error] [client 127.0.0.1] (OS 3)Das System kann den angegebenen Pfad nicht finden. : couldn't create child process: 720003: search.pl
[Sat Jul 05 16:44:17 2003] [error] [client 127.0.0.1] (OS 3)Das System kann den angegebenen Pfad nicht finden. : couldn't spawn child process: E:/Apache2/cgi-bin/search.pl
But the path is correct. The file search.pl is really located in E:\Apache2\cgi-bin\

By the way. I don't run everything on Linux, but on Win2k.

Hopefully someone is able to help me ;D
Thanks guys!
Cledith
c2k is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Reply     « Reply to Perl Search on local Apache
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14364 seconds with 12 queries