I solved my problem. It was all related to the \r\n problem.
This is what I did:
I was attempting to index an XML document that was stored in a mySQL
database. Paying attention to the hints provided by Bill Moseley, replaced
all the "\r\n" in my document with "\n". In PHP:
$theDocFixed = preg_replace( "/\\r\\n/", "\n", $theDoc);
I doesn't seem to matter if I use binary or ascii out:
$myStdout = fopen( "php://stdout", "wb");
fwrite( $myStdout, $theDocFixed);
works the same as:
$myStdout = fopen( "php://stdout", "w");
fwrite( $myStdout, $theDocFixed);
On the windows platform.
Thanks for the help.
-ece
-----Original Message-----
From: swish-e@sunsite.berkeley.edu
[mailto:swish-e@sunsite.berkeley.edu]On Behalf Of Eric Estabrooks
Sent: Wednesday, March 26, 2003 11:21 PM
To: Multiple recipients of list
Subject: [SWISH-E] Re: Using prog, how do I seperate files?
Nope. I'm still getting errors. It's something small I'm sure of it. I'll
try it again tomorrow.
==================================================================
Parsing config file 'F:\Program Files\Apache
Group\Apache\htdocs\blogtick\search2\indexNoTags.config'
Indexing Data Source: "External-Program"
Indexing "buildindex.php"
Warning: Unknown header line: '<channel>' from program buildindex.php
Warning: Unknown header line: '<title>12806</title>' from program
buildindex.php
Warning: Unknown header line:
'<link>http://weblog.digital-identity.info/</link>' from program
buildindex.php
Warning: Unknown header line: '<description>20679News and features on
identity web services - (hopefully) an emerging Internet
standard</description>' from program buildindex.php
Warning: Unknown header line: '<language>en-us</language>' from program
buildindex.php
err: External program failed to return required headers Path-Name: &
Content-Length:
.
==================================================================
-ece
-----Original Message-----
From: swish-e@sunsite.berkeley.edu
[mailto:swish-e@sunsite.berkeley.edu]On Behalf Of Bill Moseley
Sent: Wednesday, March 26, 2003 10:25 PM
To: Multiple recipients of list
Subject: [SWISH-E] Re: Using prog, how do I seperate files?
On Wed, 26 Mar 2003, Eric Estabrooks wrote:
> That didn't help. Since I'm running PHP on Windows 2K, I am now opening
the
> stdout in binary mode.
Use text mode, not binary mode.
--
Bill Moseley moseley@hank.org
Received on Sat Mar 29 04:09:04 2003