RE: Problem building libapreq-1.2

2003-06-29 Thread Chris Pizzo
I was able to get it to build by manually coping the header files to the
apache source tree but there still is no  bash$ locate mod_perl.h in the
perl tree.

Chris

-Original Message-
From: Randy Kobes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 7:55 PM
To: Chris Pizzo
Cc: [EMAIL PROTECTED]
Subject: RE: Problem building libapreq-1.2


On Tue, 24 Jun 2003, Chris Pizzo wrote:

 -Original Message-
 From: Randy Kobes [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 24, 2003 6:14 PM
 To: Chris Pizzo
 Cc: [EMAIL PROTECTED]
 Subject: Re: Problem building libapreq-1.2

 On Tue, 24 Jun 2003, Chris Pizzo wrote:
[ .. ]
  and when i run make i get a bunch of errors:
  Request.xs:41:22: mod_perl.h: No such file or directory
  Request.xs:87: parse error before SV

 Did you install mod_perl after building it?
 -End Original Message-

 Yes I did install the mod perl. I even brought up the apache test page
 indicating it was installed.

If you do a
   bash$ locate mod_perl.h
do you see mod_perl.h installed in the Perl tree, and that
Perl corresponds to the same Perl as with which you're
building things with?

--
best regards,
randy



Re: Problem building libapreq-1.2

2003-06-25 Thread Chris Pizzo
When I do :
locate mod_perl.h
I get:
/home/Chrisp/mod_perl-1.27/apaci/mod_perl.h
/home/Chrisp/mod_perl-1.27/src/modules/perl/mod_perl.h
/home/Chrisp/mod_perl-1.27/htdocs/manual/mod/mod_perl.html
http server-info shows the mod_perl module loaded

I'm not sure why the header files aren't copied.  I checked another install 
I did and they are there.

I guess I should also say I am building Apache using DSO

Thanks for the help,
Chris
At 04:50 PM 6/24/2003, Chris Pizzo wrote:
Hi all,
I am trying to install libapreq-1.2 on my redhat 8.0 system.  I keep 
getting these warnings when i run perl Makefile.PL:

Warning: -L../blib/arch/auto/libapreq changed to 
-L/home/Chrisp/libapreq-1.2/Request/../blib/arch/auto/libapreq
Warning: -L../blib/arch/auto/libapreq changed to 
-L/home/Chrisp/libapreq-1.2/Cookie/../blib/arch/auto/libapreq

and when i run make i get a bunch of errors:

Request.xs:41:22: mod_perl.h: No such file or directory
Request.xs:87: parse error before SV
.
.
.
make[1]: *** [Request.o] Error 1
make[1]: Leaving directory `/home/Chrisp/libapreq-1.2/Request'
make: *** [subdirs] Error 2
I'm not sure what is wrong.

I built mod_perl with the EVERYTHING=1 switch.

I also re-built perl to be non-multi-threaded.  Any pionters as to what is 
wrong appreciated.

Thanks,
Chris




Problem building libapreq-1.2

2003-06-24 Thread Chris Pizzo
Hi all,
I am trying to install libapreq-1.2 on my redhat 8.0 system.  I keep 
getting these warnings when i run perl Makefile.PL:

Warning: -L../blib/arch/auto/libapreq changed to 
-L/home/Chrisp/libapreq-1.2/Request/../blib/arch/auto/libapreq
Warning: -L../blib/arch/auto/libapreq changed to 
-L/home/Chrisp/libapreq-1.2/Cookie/../blib/arch/auto/libapreq

and when i run make i get a bunch of errors:

Request.xs:41:22: mod_perl.h: No such file or directory
Request.xs:87: parse error before SV
.
.
.
make[1]: *** [Request.o] Error 1
make[1]: Leaving directory `/home/Chrisp/libapreq-1.2/Request'
make: *** [subdirs] Error 2
I'm not sure what is wrong.

I built mod_perl with the EVERYTHING=1 switch.

I also re-built perl to be non-multi-threaded.  Any pionters as to what is 
wrong appreciated.

Thanks,
Chris


RE: Problem building libapreq-1.2

2003-06-24 Thread Chris Pizzo
Yes I did install the mod perl. I even brought up the apache test page
indicating it was installed.

-Original Message-
From: Randy Kobes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 6:14 PM
To: Chris Pizzo
Cc: [EMAIL PROTECTED]
Subject: Re: Problem building libapreq-1.2


On Tue, 24 Jun 2003, Chris Pizzo wrote:

 Hi all,
 I am trying to install libapreq-1.2 on my redhat 8.0 system.  I keep
 getting these warnings when i run perl Makefile.PL:

 Warning: -L../blib/arch/auto/libapreq changed to
 -L/home/Chrisp/libapreq-1.2/Request/../blib/arch/auto/libapreq
 Warning: -L../blib/arch/auto/libapreq changed to
 -L/home/Chrisp/libapreq-1.2/Cookie/../blib/arch/auto/libapreq

These warnings are OK ...

 and when i run make i get a bunch of errors:
 Request.xs:41:22: mod_perl.h: No such file or directory
 Request.xs:87: parse error before SV

Did you install mod_perl after building it?

--
best regards,
randy kobes



Not reading $ENV variable

2003-06-03 Thread Chris Pizzo
Hi all,
I'm seeing a weird thing.  Sometimes my script sees nothing in the 
$ENV{HTTP_REFERER} variable.  Im not sure what is causing this.  It works 
some of the time.

I do this at the begining of the script...heres the code:

my $r = Apache-request;

use DBI;# for connecting to the database

my $refer_url = $ENV{HTTP_REFERER};

basically the script takes form data and inserts it to a db then returns 
back to the refering page.

Thanks for any ideas
Chris


How do I convert HTML to PDF

2003-02-26 Thread Chris Pizzo
Hi All,
I want to take an Invoice that exists as an html doc and convert it to a 
PDF file to attach to an email.  I have been looking at DocSet but this 
seems better suited for large documents.  Any help?

Thanks,
Chris


Re: Novice - Problem with data encoding

2002-11-01 Thread Chris Pizzo
Thats what is wierd.  I don't do any escaping.  I think it might be embperl
doing the escaping because if I do a print of the XML doc string it has no
escaping.  If I put the string between [+ $content +] then it gets escaped.

Thanks for your help,
Chris
- Original Message -
From: Antti Haapala [EMAIL PROTECTED]
To: Chris Pizzo [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, November 01, 2002 6:35 AM
Subject: Re: Novice - Problem with data encoding



  I have an XML doc that I generated using XML::LibXML that needs to be
  included as a hidden form field in a form post.
 
  The problem is that the browser is encoding the XML doc.
 
  ie.
  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPE gtfd SYSTEM http://gftd/schemas/data.dtd;
 
  turns into:
  lt;?xml version=1.0 encoding=UTF-8?gt;
  lt;DOCTYPE gtfd SYSTEM quot;http://gftd/schemas/data.dtdquot;gt;
 
  which blows up in the parsing.  If I edit the result and swap back the 
  and  it works. How can I prevent the encoding of the XML data?

 You have probably escaped the xml snippet twice yourself - check the code
 of the page from your browser. If you see the value of your hidden field
 as amp;lt;?xml..., you have done double escaping.

 Just remove one of the escaping passes and it should work.

 The browser isn't supposed to do any such encoding on its own. If it does
 you need to change your browser. You aren't using Netscape 4.0, are you?

 --
 Antti Haapala






Novice - How would I add a hidden form field to a LWP::UserAgent call?

2002-10-31 Thread Chris Pizzo
Hi,
I'm trying to post data to a server that requires a hidden form field.

This is what I'm doing:
my $content = info=somedata;
my $rec_len = length($content);
my $send_url = new URI::URL($url);
my $hdrsend = new HTTP::Headers('Content-length' = $rec_len);
$hdrsend-header('Content-type' = 'text/html');

my $reqest = new HTTP::Request('POST', $send_url, $hdrs, $content);
my $uasend = new LWP::UserAgent;

my $resp = $uasend- request($reqest);


The response I get back is:
h3Exception encountered./h3preForm post has no value for key info.
Form values are: {}

If I create an HTML doc with a form it finds the data.  Is there something
special I need to do to get a hidden form field?

Thanks,
Chris






Novice - Problem with data encoding

2002-10-31 Thread Chris Pizzo
Hi,
I have an XML doc that I generated using XML::LibXML that needs to be
included as a hidden form field in a form post.

Code snippet:

sub getcXML   {
use XML::LibXML;
my $resp_doc = XML::LibXML::Document-new();
my $root = $resp_doc-createElement('blah');
...
my $content = $resp_doc-toString;
return $content
}

The html is:
form name=sndxml method = post action =
http://someserver.com/process_xml
input type = hidden name = xml_here value = [+ getcXML(); +]
input type = submit value = Order
/form



The problem is that the browser is encoding the XML doc.

ie.
?xml version=1.0 encoding=UTF-8?
!DOCTYPE gtfd SYSTEM http://gftd/schemas/data.dtd;

turns into:
lt;?xml version=1.0 encoding=UTF-8?gt;
lt;DOCTYPE gtfd SYSTEM quot;http://gftd/schemas/data.dtdquot;gt;

which blows up in the parsing.  If I edit the result and swap back the  
and  it works.
How can I prevent the encoding of the XML data?


Anyone point me in the right direction?

Thanks,
Chris




[newbie] How do I send a custom HTTP::Response?

2002-10-23 Thread Chris Pizzo

The documentation tells me how to create a new response object but how do I
reply to a request using my custom response?

Thanks,
Chris




Re: [newbie] How do I send a custom HTTP::Response?

2002-10-23 Thread Chris Pizzo
OK,  I am getting a request from a server and I need to respond with an XML
doc.


- Original Message -
From: Perrin Harkins [EMAIL PROTECTED]
To: Chris Pizzo [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 23, 2002 12:54 PM
Subject: Re: [newbie] How do I send a custom HTTP::Response?


 Chris Pizzo wrote:
  The documentation tells me how to create a new response object but how
do I
  reply to a request using my custom response?

 HTTP::Response?  That's an LWP thing, not a mod_perl thing.  Maybe
 you're a little confused here?  Tell us what you're trying to do.

 - Perrin






How do I handle an XML document sent as a POST [newbie]

2002-10-22 Thread Chris Pizzo
I'm trying to figure out how to get the XML document sent to me in a An HTTP
transmission.  The example I'm given is:

HTTP headers:
POST HTTP/1.0
Content-type: text/xml; charset=UTF-8
Content-length: 1862
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
User-Agent: Java1.1
Host: localhost:8080
Connection: Keep-Alive
?xml version=1.0 encoding=UTF-8?
.
.
.
I have found lots of examples on how to deal with the xml once I have it but
I don't understand how to get the xml document from the post?

Anyone point me in the right direction?

Thanks for your patience,
Chris




Weird problem with cookies on Netscape with apache running a virtualhost

2002-07-12 Thread Chris Pizzo

This might be a little off topic.
I recently installed apache 1.3.26 with modperl 1.26.  I run a virtual host
seconady website.  When I try to retieve or write cookies to a netscape
browser from the virtualhost URL it doesn't work.

cookies work fine on the main server.

cookies work fine on both main and virtualhost using an IE browser.

This all worked fine on both before I upgraded apache and modperl.

I use Apache::Vookie to set and retrieve cookies.

Anybody have an Idea to point me in the right direction to solve this?

Thanks,
Chris




Re: Weird problem with cookies on Netscape with apache running a virtualhost

2002-07-12 Thread Chris Pizzo


- Original Message -
From: Charles [EMAIL PROTECTED]
To: Chris Pizzo [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, July 12, 2002 1:51 PM
Subject: RE: Weird problem with cookies on Netscape with apache running a
virtualhost


 Chris,

 It is a bit difficult to determine your problem but here are a few
 suggestions:

 1) Revert to $r-headers_out-set('Set-Cookie',
 cookie(-name='cookie_name', -value='value_here'));  If this works, check
 for a difference in the module you are using.

This works but I need to set multiple cookies.  Im doing this:

my $c = new CGI::Cookie(-name = 'SID', -value = 'stuff', -expires
= '+6M');
my $cc = new CGI::Cookie(-name = 'BUD', -value =
'Wassup', -expires = '+6M');

$r-headers_out-set('Set-Cookie',$cc);
$r-headers_out-set('Set-Cookie',$c);

 $r-cgi_header_out('Location',mypage.html);
 $r-send_http_header;

This only sets one of the cookies ($c).  How do I set multiple cookies?

CGI::Cookie says to concatenate using a ; but that errors out.

Sorry, bit of a novice here.
-Chris




Re: Weird problem with cookies on Netscape with apache running a virtualhost

2002-07-12 Thread Chris Pizzo

Doh!
Thanks that's it!


- Original Message -
From: ___cliff rayman___ [EMAIL PROTECTED]
To: Chris Pizzo [EMAIL PROTECTED]
Cc: Charles [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 12, 2002 5:10 PM
Subject: Re: Weird problem with cookies on Netscape with apache running a
virtualhost


 Chris Pizzo wrote:

 
  $r-headers_out-set('Set-Cookie',$cc);
  $r-headers_out-set('Set-Cookie',$c);

 should this second one be?
 $r-headers_out-add('Set-Cookie',$c);

 i didn't get a chance to try it, but it should be easy to try.

 
 
   $r-cgi_header_out('Location',mypage.html);
   $r-send_http_header;
 
  This only sets one of the cookies ($c).  How do I set multiple cookies?

 --
 ___cliff [EMAIL PROTECTED]http://www.genwax.com/







Creating an installable web site.

2001-12-06 Thread Chris Pizzo

Im looking for a way to create an installable version of my wesite to
distribute to customers that don't have web access.  The site basically
shows the inventory I have and uses a postgres database and mod perl to show
the product sorted in the manner that the user wants to see it.  Can someone
point me in the right direction or am I completely out of luck here?

Chris




Database connection errors in modperl

2001-09-10 Thread Chris Pizzo

Hi everyone,
I'm a bit of a novice here and I'm having a strange problem.  I'm using
apache 1.3.20 with modperl 1.26 and embperl 1.3.3 and postgres 7.02.  Every
once in a while I get:

Internal Server Error


[11274]ERR: 32: Line 165: Warning in Perl code: DBD::Pg::db selectrow_array
failed: no statement executing at
/opt/apache/htdocs/bmg_graphics/trade/existingtrade_tracking.ehtml line 184.

[11274]ERR: 24: Line 165: Error in Perl code: DBD::Pg::db selectrow_array
failed: no statement executing at
/opt/apache/htdocs/bmg_graphics/trade/existingtrade_tracking.ehtml line 184.

Apache/1.3.20 (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6a mod_perl/1.26
HTML::Embperl 1.3.3 [Mon Sep 10 20:41:56 2001]


but if i refresh the page everything loads correct.  Any idea what's causing
this?

Thanks in advance for any help you can give.

Chris Pizzo




Error decrypting in message using gpg in modperl script

2001-08-09 Thread Chris Pizzo

Anyone know why the decryption fails using gpg when run in a perl script in
a browser but works if run in a shell?  Here's the code sample:

my $cipher = TAG;
 -BEGIN PGP MESSAGE-

pvbhS8Q22VYPqn+4sitEw0bgTmDhPo6rruzsSJxCHLBUyTPrYaPlmelF2iADCpKD
IeqIOK0KZwRMHrXrlFir37i+2NzmNzcF4kidPKWuKSQe6ZNWs28=
=w+vi
-END PGP MESSAGE-
TAG
# Decode logic

$ENV{GNUPGHOME}=/usr/local/.gnupg;


my($PGP,$dbh,$sth,$pid,$recipient,$dat,@plaintext,@errs,$q,$r,$cc_no,$cc_exp
, $dbh1);

my($amount,$cc_no,$cc_exp,$c_name,$c_add,$c_city,$c_st,$c_zip,$c_country,$c_
type);

$PGP = /usr/bin/gpg --no-secmem-warning -dar;

$recipient = xx;

# Open a two-way pipe to pgp or gpg.
$pid = open3(\*PGP_WRITE, \*PGP_READ, \*PGP_ERR, $PGP $recipient);

unless ($pid) {
print Error: Could not open encryption program: $!;
exit;
}
# Send the plaintext to pgp/gpg

print PGP_WRITE $cipher;

close(PGP_WRITE);

# Read the ciphertext from PGP/gpg

@plaintext = PGP_READ;
close(PGP_READ);

# Read any error messages.

@errs = PGP_ERR;
close(PGP_ERR);
print @errs;

This is the Error:
gpg: decrypt_message failed: eof

Again it works fine in a shell but fails when run from the browser.  Any
help greatly appreiciated.

Chris




Error in Perl code: Can't locate Apache/Cookie.pm in @INC

2001-07-17 Thread Chris Pizzo

Hi,
I'm a newbee in setting up mod perl.  I have tried to set up mod perl on a
Redhat 7.1 system using mod_ssl, embperl, apache.

Versions are:
Apache 1.3.20
Mod_SSL 2.8.4-1.3.20
Mod_Perl 1.26
HTML-Embperl-1.3.3

When I run an embedded perl file that I know worked on another system, I get
the message:
Error in Perl code: Can't locate Apache/Cookie.pm in @INC  but Cookie.pm
is in the @INC path.

I ran perl-status and Apache::Cookie was not one of the modules loaded.  In
fact several modules like Apache::Registry were not loaded.  Installed
mod_perl as a DSO; can someone point me in the right direction to get the
other modules loaded or what I didn't do that I needed to do to make the
active?

Chris Pizzo
[EMAIL PROTECTED]




RE: Error in Perl code: Can't locate Apache/Cookie.pm in @INC

2001-07-17 Thread Chris Pizzo

Thanks that solved the problem.
Chris

-Original Message-
From: Gerald Richter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 12:42 PM
To: Chris Pizzo; [EMAIL PROTECTED]
Subject: Re: Error in Perl code: Can't locate Apache/Cookie.pm in @INC


 mod_perl as a DSO; can someone point me in the right direction to get the
 other modules loaded or what I didn't do that I needed to do to make the
 active?
 

Put a

PerlModule Apache::Cookie
PerlModule Apache::Registry

etc.

in your httpd.conf

Gerald


-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-