>Hi - You probably want to start at
>http://www.htdig.org/FAQ.html#q2.6
>Jim

Hi again

Thanks Jim for the tip

I followed the instructions, and compiled without any problem the source
code (htdig-3.1.5) with Cygwin 1.3.2.

However, I have many problems with htsearch:

Under PWS 4 (NT Workstation),
============================
Instead of open:
F:\HTDIG\conf\htdig.conf

htsearch tries to open

D:\Inetpub\wwwroot\mysite\d\Inetpub\wwwroot\mysite\f\htdig\conf\htdig.conf

operation which fails, of course. When I create all that (damn) directory
structure, the programs returns:

***********************
DB2 problem...: f:/htdig/common/synonyms.db: file size not a multiple of the
pagesize
DB2 problem...: f:/htdig/common/word2root.db: No such file or directory
DB2 problem...: f:/htdig/db/db.words.db: file size not a multiple of the
pagesize
      0 [main] htsearch 330 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
   1398 [main] htsearch 330 open_stackdumpfile: Dumping stack trace to
htsearch.exe.stackdump
***********************

Under Apache 1.3.19
===================
htsearch open the conf file, but the program doesn't return anything.
Indeed, it doesn't do anything apart from opening "db.words.db" and then
(after a very very long time), writes the file

htsearch.exe.stackdump

Which reports that there was an "STATUS_ACCESS_VIOLATION"

***********************
What is happening?

I have indexed one site (by the way, the PHP Manual) with the .bat suggested
in the "Idiot's Guide" (pretty name)

Also, htdig hangs when tries to index the file that I am attaching to this
message

Help please!

P.S.
The DLL

"cygwin/bin/libz.dll"

referred in the "Idiot's Guide", doesn´t exist
Title: fopen

fopen

fopen -- Open file or URL

Description

int fopen(string filename, string mode, int [use_include_path] );

If filename begins with "http://" (not case sensitive), an HTTP 1.0 connection is opened to the specified server and a file pointer is returned to the beginning of the text of the response.

Does not handle HTTP redirects, so you must include trailing slashes on directories.

If filename begins with "ftp://" (not case sensitive), an ftp connection to the specified server is opened and a pointer to the requested file is returned. If the server does not support passive mode ftp, this will fail. You can open files for either reading and writing via ftp (but not both simultaneously).

If filename is one of "php://stdin", "php://stdout", or "php://stderr", the corresponding stdio stream will be opened. (This was introduced in PHP 3.0.13; in earlier versions, a filename such as "/dev/stdin" or "/dev/fd/0" must be used to access the stdio streams.)

If filename begins with anything else, the file will be opened from the filesystem, and a file pointer to the file opened is returned.

If the open fails, the function returns false.

mode may be any of the following:

  • 'r' - Open for reading only; place the file pointer at the beginning of the file.

  • 'r+' - Open for reading and writing; place the file pointer at the beginning of the file.

  • 'w' - Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.

  • 'w+' - Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.

  • 'a' - Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.

  • 'a+' - Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it.

As well, mode may contain the letter 'b'. This is useful only on systems which differentiate between binary and text files (i.e., it's useless on Unix). If not needed, this will be ignored.

You can use the optional third parameter and set it to "1", if you want to search for the file in the include_path, too.

Example 1. fopen() example

  1 
  2 $fp = fopen("/home/rasmus/file.txt", "r");
  3 $fp = fopen("http://www.php.net/", "r");
  4 $fp = fopen("ftp://user:[EMAIL PROTECTED]/", "w");
  5       

If you are experiencing problems with reading and writing to files and you're using the server module version of PHP, remember to make sure that the files and directories you're using are accessible to the server process.

On the Windows platform, be careful to escape any backslashes used in the path to the file, or use forward slashes.

  1  
  2 $fp = fopen("c:\\data\\info.txt", "r");
  3       

See also fclose(), fsockopen(), and popen().

Reply via email to