|
List Info
Thread: $c->req->base doesn't actually return base
|
|
| $c->req->base doesn't actually
return base |

|
2007-01-24 03:04:33 |
|
Hello
I wish you could help me.
When I switched from mod_perl engine to CGI engine (due to some circumstanses) $c->req->base stopped returning actually base url. Instead it is same as $c->req->uri.
Have any suggestions about that? Or am I missing something?
Appreciate your help.
--
vti -- Viacheslav Tikhanovskii
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/
|
| Re: $c->req->base doesn't
actually return base |

|
2007-01-24 06:05:11 |
|
On 24 Jan 2007, at 09:04, vti wrote:
> Hello
>
> I wish you could help me.
>
> When I switched from mod_perl engine to CGI engine (due to some
> circumstanses) $c->req->base stopped returning actually base url.
> Instead it is same as $c->req->uri.
(1) Switch to FastCGI if you possibly can, Catalyst isn't optimised
for CGI performance
> Have any suggestions about that? Or am I missing something?
(2) Not without some more information, like the webserver and app
config etc. and logs. A full dump of %ENV from within the app would
probably help as well.
--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for
details.
+ Help us build a better perl ORM: http://dbix-
class.shadowcatsystems.co.uk/ +
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/
|
| Re: $c->req->base doesn't
actually return base |

|
2007-01-24 06:38:42 |
|
Matt S Trout(dbix-class trout.me.uk) Wed, Jan 24, 2007 at 12:05:11PM +0000:
>
> On 24 Jan 2007, at 09:04, vti wrote:
>
> >Hello
> >
> >I wish you could help me.
> >
> >When I switched from mod_perl engine to CGI engine (due to some
> >circumstanses) $c->req->base stopped returning actually base url.
> >Instead it is same as $c->req->uri.
>
> (1) Switch to FastCGI if you possibly can, Catalyst isn't optimised
> for CGI performance
Well, I understand that I have no choice in the current application.
Others are working under mod_perl and are feeling alright.
> >Have any suggestions about that? Or am I missing something?
>
> (2) Not without some more information, like the webserver and app
> config etc. and logs. A full dump of %ENV from within the app would
> probably help as well.
Webserver is apache2.
Config follows by:
=============================
DocumentRoot /var/www/pickup/htdocs
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
ScriptAlias /cgi-bin/ /var/www/pickup/cgi-bin/
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
=============================
In cgi-bin dir I put pickup.pl:
=============================
#!/usr/bin/perl -w
use strict;
use lib '../lib';
use PickUp;
PickUp->run;
=============================
In htdocs I put .htaccess:
=============================
RewriteEngine On
RewriteRule ^(.*) /cgi-bin/pickup.pl [L]
=============================
Running http://pick-up.com.ua/ru/pages/view/bio?dump_info=1 gives me:
=============================
Request
bless({
action => "/view",
address => "127.0.0.1",
arguments => ["bio"],
base => bless(do{(my $o = "http://pick-up.com.ua/ru/pages/view/bio/")}, "URI::http"),
body_parameters => {},
captures => ["ru"],
cookies => {},
headers => bless({
"accept" => "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
"accept-charset" => "windows-1251,utf-8;q=0.7,*;q=0.7",
"accept-encoding" => "gzip,deflate",
"accept-language" => "ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3",
connection => "keep-alive",
host => "pick-up.com.ua",
"keep-alive" => 300,
"user-agent" => "Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1.1) Gecko/20070102 BonEcho/2.0.0.1",
}, "HTTP::Headers"),
hostname => undef,
match => "/view",
method => "GET",
parameters => { dump_info => 1 },
path => "ru/pages/view/bio",
protocol => "HTTP/1.1",
query_parameters => { dump_info => 1 },
secure => 0,
uploads => {},
uri => bless(do{(my $o = "http://pick-up.com.ua/ru/pages/view/bio?dump_info=1")}, "URI::http"),
user => undef,
}, "Catalyst::Request")
=============================
--
vti -- Viacheslav Tikhanovskii
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/
|
| Re: $c->req->base doesn't
actually return base |

|
2007-01-24 07:00:48 |
|
On 24 Jan 2007, at 12:38, vti wrote:
> Matt S Trout(dbix-class trout.me.uk) Wed, Jan 24, 2007 at
> 12:05:11PM +0000:
>>
>> On 24 Jan 2007, at 09:04, vti wrote:
>>
>>> Hello
>>>
>>> I wish you could help me.
>>>
>>> When I switched from mod_perl engine to CGI engine (due to some
>>> circumstanses) $c->req->base stopped returning actually base url.
>>> Instead it is same as $c->req->uri.
>>
>> (1) Switch to FastCGI if you possibly can, Catalyst isn't optimised
>> for CGI performance
>
> Well, I understand that I have no choice in the current
> application.
I doubt that, and since you won't explain why I can only assume
you're wrong.
> Others are working under mod_perl and are feeling alright.
>
>>> Have any suggestions about that? Or am I missing something?
>>
>> (2) Not without some more information, like the webserver and app
>> config etc. and logs. A full dump of %ENV from within the app would
>> probably help as well.
>
> Webserver is apache2.
>
(1) you should be using the pickup_cgi.pl Catalyst generated, not
your own
(2) You still haven't provided %ENV
--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for
details.
+ Help us build a better perl ORM: http://dbix-
class.shadowcatsystems.co.uk/ +
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/
|
| Re: $c->req->base doesn't
actually return base |

|
2007-01-24 07:28:04 |
|
Matt S Trout(dbix-class trout.me.uk) Wed, Jan 24, 2007 at 01:00:48PM +0000:
>
> On 24 Jan 2007, at 12:38, vti wrote:
>
> >Matt S Trout(dbix-class trout.me.uk) Wed, Jan 24, 2007 at
> >12:05:11PM +0000:
> >>
> >>On 24 Jan 2007, at 09:04, vti wrote:
> >>
> >>>Hello
> >>>
> >>>I wish you could help me.
> >>>
> >>>When I switched from mod_perl engine to CGI engine (due to some
> >>>circumstanses) $c->req->base stopped returning actually base url.
> >>>Instead it is same as $c->req->uri.
> >>
> >>(1) Switch to FastCGI if you possibly can, Catalyst isn't optimised
> >>for CGI performance
> >
> >Well, I understand that I have no choice in the current
> >application.
>
> I doubt that, and since you won't explain why I can only assume
> you're wrong.
I am limited to the hosting that doesn't support neigher mod_perl nor fastcgi.
> >Others are working under mod_perl and are feeling alright.
> >
> >>>Have any suggestions about that? Or am I missing something?
> >>
> >>(2) Not without some more information, like the webserver and app
> >>config etc. and logs. A full dump of %ENV from within the app would
> >>probably help as well.
> >
> >Webserver is apache2.
> >
>
> (1) you should be using the pickup_cgi.pl Catalyst generated, not
> your own
> (2) You still haven't provided %ENV
(1) I've change to that script.
(2) Here is %ENV
ENV => {
CATALYST_ENGINE => "CGI",
DOCUMENT_ROOT => "/var/www/pickup/htdocs",
GATEWAY_INTERFACE => "CGI/1.1",
HTTP_ACCEPT => "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
HTTP_ACCEPT_CHARSET => "windows-1251,utf-8;q=0.7,*;q=0.7",
HTTP_ACCEPT_ENCODING => "gzip,deflate",
HTTP_ACCEPT_LANGUAGE => "ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3",
HTTP_CACHE_CONTROL => "max-age=0",
HTTP_CONNECTION => "keep-alive",
HTTP_HOST => "pick-up.com.ua",
HTTP_KEEP_ALIVE => 300,
HTTP_USER_AGENT => "Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1.1) Gecko/20070102 BonEcho/2.0.0.1",
PATH => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/usr/qt/3/bin",
QUERY_STRING => "dump_info=1",
"REDIRECT_QUERY_STRING" => "dump_info=1",
REDIRECT_STATUS => 200,
REDIRECT_URL => "/ru/pages/view/bio",
REMOTE_ADDR => "127.0.0.1",
REMOTE_PORT => 40_877,
REQUEST_METHOD => "GET",
REQUEST_URI => "/ru/pages/view/bio?dump_info=1",
SCRIPT_FILENAME => "/var/www/pickup/cgi-bin/pickup.pl",
SCRIPT_NAME => "/cgi-bin/pickup.pl",
SERVER_ADDR => "127.0.0.1",
SERVER_ADMIN => "hostmaster localhost",
SERVER_NAME => "pick-up.com.ua",
SERVER_PORT => 80,
SERVER_PROTOCOL => "HTTP/1.1",
SERVER_SIGNATURE => "Apache Server at pick-up.com.ua Port 80n",
SERVER_SOFTWARE => "Apache",
}
Thanks for your patience.
--
vti -- Viacheslav Tikhanovskii
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/
|
| Re: $c->req->base doesn't
actually return base |

|
2007-01-26 11:48:05 |
Well. I tried to use Apache/mod_perl. But the req->base
still is wrong.
Now it is the home dir O_o
--
vti -- Viacheslav Tikhanovskii
He built also the house of the forest of Lebanon; the length
thereof was
an hundred cubits, and the breadth thereof fifty cubits, and
the height
thereof thirty cubits, upon four rows of cedar pillars, with
cedar beams
upon the pillars.
-- 1 Kings 7:2
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/
|
|
| Re: $c->req->base doesn't
actually return base |

|
2007-01-26 11:56:58 |
On 26/01/07, vti <mbit ukr.net> wrote:
> Well. I tried to use Apache/mod_perl. But the
req->base still is wrong.
>
> Now it is the home dir O_o
That's about as useful as just saying "it doesn't
work".
Logs? Config? Environment?
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/
|
|
| Re: $c->req->base doesn't
actually return base |

|
2007-01-28 11:43:29 |
Will Hawes(wdhawes gmail.com) Fri, Jan 26, 2007 at
05:56:58PM +0000:
> On 26/01/07, vti <mbit ukr.net> wrote:
> >Well. I tried to use Apache/mod_perl. But the
req->base still is wrong.
> >
> >Now it is the home dir O_o
>
> That's about as useful as just saying "it doesn't
work".
>
> Logs? Config? Environment?
>
Sorry for that, but all setups, configs and ENV didn't
change.
--
vti
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/
|
|
| Re: $c->req->base doesn't
actually return base |

|
2007-01-28 12:15:58 |
vti(mbit ukr.net) Sun, Jan 28, 2007 at 07:43:29PM +0200:
> Will Hawes(wdhawes gmail.com) Fri, Jan 26, 2007 at
05:56:58PM +0000:
> > On 26/01/07, vti <mbit ukr.net> wrote:
> > >Well. I tried to use Apache/mod_perl. But the
req->base still is wrong.
> > >
> > >Now it is the home dir O_o
> >
> > That's about as useful as just saying "it
doesn't work".
> >
> > Logs? Config? Environment?
> >
>
> Sorry for that, but all setups, configs and ENV didn't
change.
I fixed that using Location instead of Directory directive
in Apache conf
Was:
===================
<Directory /var/www/myapp/htdocs>
SetHandler modperl
PerlResponseHandler MyApp
</Directory>
===================
Now:
===================
<Location />
SetHandler modperl
PerlResponseHandler MyApp
</Location>
===================
--
vti
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/
|
|
[1-9]
|
|