You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Rudolf Wolf <ru...@dantax.cz> on 2002/07/12 11:52:14 UTC

Mod_perl 1.27 and Apache 1.3.26

Hi,
I'm newbie in mod_perl. I try to compile mod_perl 1.27 with Apache 1.3.26, I satisfied all prerequisities, succesfully compiled mod_perl, when I use /usr/local/apache/bin/httpd -l I can see mod_perl listed in list, but the problem is, that my Apache is not working as before compiling. 
I have Debian 2.2 and Apache has one main (sova.domain.cz) and one virtual host (rt2.domain.cz):

httpd.conf
------------
ServerName	sova.domain.cz
DocumentRoot	/var/www/htdocs
ErrorLog /var/log/www/error_log
CustomLog /var/log/www/access_log common

<VirtualHost 192.168.201.30>
    ServerAdmin webmaster@domain.cz
    DocumentRoot "/var/www/rt2"
    ServerName rt2.domain.cz
    ErrorLog /var/log/www/rt2-error_log
    CustomLog /var/log/www/rt2-access_log common

</VirtualHost>
<VirtualHost 192.168.201.30>
    ServerName sova.domain.cz
</VirtualHost>

Before compiling I can used in my browser both web servers and they sent me responses to my GET request, BUT after compiling mod_perl, it doesn't work. When I request http://sova.domain.cz/ or http://rt2.domain.cz/, I get only error message in my browser: 

Not Acceptable
An appropriate representation of the requested resource / could not be found on this server.
Available variants: 
index.html.ca , type text/html, language ca 
index.html.cz , type text/html, language cz 
index.html.de , type text/html, language de 
index.html.dk , type text/html, language da 
index.html.ee , type text/html, language et 
index.html.el , type text/html, language el ..............

Only one resource is working and it's manual nothing else. When I checked access logs of web servers, there is no log records as I don't request any pages, but before compiling, it was working too. Of course, there is no error log records in error log.

My compile command line was: 
perl Makefile.PL APACHE_SRC=/usr/src/apache_1.3.26/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
make
make test (everything OK)
make install

/etc/init.d/apachectl stop
/etc/init.d/apachectl start


Can you help me?

Thanks,
Ruda.

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

Posted by Chris Pizzo <ch...@artinside.com>.
Doh!
Thanks that's it!


----- Original Message -----
From: "___cliff rayman___" <cl...@genwax.com>
To: "Chris Pizzo" <ch...@artinside.com>
Cc: "Charles" <fr...@peakpeak.com>; <mo...@perl.apache.org>
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 rayman___cliff@genwax.com___http://www.genwax.com/
>
>
>


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

Posted by ___cliff rayman___ <cl...@genwax.com>.
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 rayman___cliff@genwax.com___http://www.genwax.com/



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

Posted by darren chamberlain <dl...@users.sourceforge.net>.
* Chris Pizzo <ch...@artinside.com> [2002-07-12 17:02]:
> 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;

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

Or better yet, use Apache::Cookie, which has a bake() method that can be
used multiple times.

(darren)

-- 
Biographical history, as taught in our public schools, is still largely a
history of boneheads:  ridiculous kings and queens, paranoid political
leaders, compulsive voyagers, ignorant generals -- the flotsam and jetsam
of historical currents.  The men who radically altered history, the great
scientists and mathematicians, are seldom mentioned, if at all.
    -- Martin Gardner

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

Posted by Chris Pizzo <ch...@artinside.com>.
----- Original Message -----
From: "Charles" <fr...@peakpeak.com>
To: "Chris Pizzo" <ch...@artinside.com>
Cc: <mo...@perl.apache.org>
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

Posted by Charles <fr...@peakpeak.com>.
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.

2) You may have inconstant privacy settings on your browser which can cause
your browser to reject cookies from untrusted sites.  Check with
http://www.w3.org/TR/P3P/ to learn about setting up your site's privacy
settings.

Charles

-----Original Message-----
From: Chris Pizzo [mailto:chris@artinside.com]
Sent: Friday, July 12, 2002 11:29 AM
To: modperl@perl.apache.org
Subject: Weird problem with cookies on Netscape with apache running a
virtualhost


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

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,

On Fri, 12 Jul 2002, Chris Pizzo wrote:

> This might be a little off topic.

Not if it's the result of a mod_perl upgrade. :)

> I recently installed apache 1.3.26 with modperl 1.26. [snip]
> try to retieve or write cookies to a netscape
> browser from the virtualhost URL it doesn't work.

I think I saw something like this mentioned not long ago on this List.
You might want to try checking the archives.  But if I were doing it
I'd probably dump the HTTP headers to a file and crawl through them.
(I'd probably learn a lot:).

73,
Ged.


Weird problem with cookies on Netscape with apache running a virtualhost

Posted by Chris Pizzo <ch...@artinside.com>.
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: Mod_perl 1.27 and Apache 1.3.26

Posted by Ask Bjoern Hansen <as...@develooper.com>.
On Fri, 12 Jul 2002, Rudolf Wolf wrote:

> Not Acceptable
> An appropriate representation of the requested resource / could not be found on this server.
> Available variants:
> index.html.ca , type text/html, language ca
> index.html.cz , type text/html, language cz
[...]

That's not a mod_perl problem, try the httpd users list.

users-subscribe@httpd.apache.org.


  - ask

-- 
ask bjoern hansen, http://askbjoernhansen.com/ !try; do();