--
ProgramV - Alice on Perl - available at
http://www.virtualitas.net/perl/aiml/
VIRTUALITAS - Manufacturer of fine OOPPS - since 1996
*
* VIRTUALITAS Inc. * http://www.virtualitas.net *
* Ernest
Trying to use the 'Memory Usage' feature of Apache::Status, I came
across the English module.
Using it in a mod_perl Module causes Apache::Status to segfault. It
turned out, that when omitting some vars, the segfault was gone.
So I put up a little changed version of English - EnglishSave.
but the refs to arrays will be actually C arrays.
Sorry, I'm not familiar with C(hinese) - but if someone could develop a
XS/Pascal interface ;-))
Ernest Lergon wrote:
Another thing I found is, that Apache::Status seems not always report
complete values. Therefore I recorded the sizes from top, too
Hi Stas,
having a look at Apache::Status and playing around with your tips on
http://www.apacheweek.com/features/mod_perl11
I found some interesting results and a compromising solution:
In a module I load a CSV file as class data into different structures
and compared the output of
Kee Hinckley wrote:
At 17:18 28.04.2002, Ernest Lergon wrote:
Now I'm scared about the memory consumption:
The CSV file has 14.000 records with 18 fields and a size of 2 MB
(approx. 150 Bytes per record).
Now a question I would like to ask: do you *need* to read the whole CSV
Perrin Harkins wrote:
$foo-{$i} = [ @record ];
You're creating 14000 arrays, and references to them (refs take up space
too!). That's where the memory is going.
See if you can use a more efficient data structure. For example, it
takes less space to make 4 arrays with 14000 entries
Hi,
thank you all for your hints, BUT (with capital letters ;-)
I think, it's a question of speed: If I hold my data in a hash in
memory, access should be faster than using any kind of external
database.
What makes me wonder is the extremely blown up size (mod)perl uses for
datastructures.
Perrin Harkins wrote:
[snip]
Incidentally, that map statement in your script isn't doing
anything that I can see.
It simulates different values for each record - e.g.:
$line = \t\t1000\t10.99;
@record = split \t, $line;
for ( $i = 0; $i 14000; $i++ )
{
map { $_++ }
Ward W. Vuillemot wrote:
[snip]
But, apachectl configtest tells me
Invalid command 'SetHandler', perhaps mis-spelled or defined by a module not
included in the server configuration
Running httpd -l, returns
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
Ooops,
clicking on send, I saw, that mod_mime is not compiled in.
See
http://httpd.apache.org/docs/mod/mod_mime.html#sethandler
Sorry.
Ernest
--
*
* VIRTUALITAS Inc. * *
*
Hi,
in a mod_perl package I load a CSV file on apache startup into a simple
hash as read-only class data to be shared by all childs.
A loading routine reads the file line by line and uses one numeric field
as hash entry (error checks etc. omitted):
package Data;
my $class_data = {};
ReadFile
Jeffrey Baker wrote:
I tried this program in Perl (outside of modperl) and the memory
consumption is only 4.5MB:
#!/usr/bin/perl -w
$foo = {};
for ($i = 0; $i 14000; $i++) {
$foo-{sprintf('%020d', $i)} = 'A'x150;
}
;
1;
So I suggest something else might be going on
Martin Haase-Thomas wrote:
I am quite certain that recently I saw a server response code concerning
forwarding. It may have looked like HTTP_DOCUMENT_FORWARDED or anything
alike.
Hi Martin,
just a guess: Do you mean the header entry 'X-Forwarded-For' ?
See
Paul Williams wrote:
-
AuthUserFile /dev/null
AuthGroupFile /dev/null
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://www.myserver.com [NC]
RewriteCond %{HTTP_REFERER} !^http://myserver.com [NC]
RewriteRule /*
Martin Haase-Thomas wrote:
[snip] Secondly I wonder whether local $/ = undef
will have any effect. But I've never tried overriding Perl's predefined
variables.
regards
Dear Martin,
this is the well-known file-slurp mode.
E.g.:
undef $/; # enable slurp mode
$_ = FH;
Dear John,
on our SuSe 7.3 server I run the shipped ready-made installation of
Apache/mod_perl using DSO.
It works fine, no special problems so far.
Please don't give up, it's worth another try!
Ernest
--
*
* VIRTUALITAS
Hi,
is http://search.cpan.org hacked?
Enclosed two traceroutes FYI.
Ernest
cpan.org 209.85.157.220
---
[snip]
5 160 ms 150 ms 161 ms dt-gw.wswdc.ip.att.net [194.25.6.234]
6 160 ms 161 ms 160 ms 12.122.11.233
7 170 ms 180 ms 180 ms
Daniel Jonda wrote:
http://www.flyerfabrik.de/cgi-bin/gallery/gallery.cgi
See
http://httpd.apache.org/docs/mod/mod_alias.html#scriptalias
It is a very bad idea to place content below /cgi-bin.
Everything what is called below /cgi-bin is interpreted as a skript -
apache want's to run it,
Hi,
is http://search.cpan.org hacked?
A Chaos titled page with a baby-photo saying Question everything is displayed.
Enclosed two traceroutes FYI.
Ernest
cpan.org 209.85.157.220
---
[snip]
5 160 ms 150 ms 161 ms dt-gw.wswdc.ip.att.net [194.25.6.234]
6 160
Sorry,
must have been a problem with a hidden proxy of my ISP or something. I
did'nt tell my browser to use any proxy.
It's all working again.
Please calm down ;-))
Ernest
--
*
* VIRTUALITAS Inc. *
Thomas K. Burkholder wrote:
So, I guess I'm wondering if there's an easy way to have two completely
separate apache configurations running on the same machine (listening on
different ports obviously).
Hi Thomas,
just throwing a glance I found:
Rizwan Majeed wrote:
I have added a handler entry in httpd.conf
location /myhandler
SetHandler perl-script
PerlHandler Demo
/Location
and I have printed a string inside the handler thats it.
Hi Riz,
do you load your Module Demo.pm somewhere?
E.g. in httpd.conf:
Vuillemot, Ward W wrote:
Using the POST2GET snippet was interferring. I thought I had turned it off
when trying Lergon's suggestion. I must not have.
As for the actual code. . .I copied it exactly as Lergon's and it works. I
know what was different...
[snip]
Hi Ward, hi Randy!
Thank
Vuillemot, Ward W wrote:
Here is the Apache config
PerlModule testUpload
Location /testUpload
SetHandler perl-script
PerlHandler testUpload
PerlSendHeader Off
# limit POSTS so that they get processed properly
Limit POST
PerlInitHandler POST2GET
/Limit
/Location
Hi
Hi,
in a 2-server-on-one-machine-environment (proxy/mod_perl) I try to slim
especially the proxy httpd as much as possible by removing all unneeded
modules.
Please help me at 2 questions:
1. What is the minimum of modules to be loaded for the proxy and the
mod_perl apache? (Ok, I'm about to
Oh, sorry, I forgot:
httpd -l gives:
Compiled-in modules:
http_core.c
mod_so.c
suexec: enabled; valid wrapper /usr/sbin/suexec
The rest is DSO.
Ernest
[EMAIL PROTECTED] wrote:
[snip]
| return %Actions::Vars::config{$conf}; |
-
Must read:
Miroslav Madzarevic wrote:
Ernest: I don't use server aliases but I'm going to fix that. I wish
that the problem is so simple. Actually the two virt. hosts are
beta.domain.com and www.domain.com
So the httpd.conf should read:
VirtualHost *
ServerName www.domain.com
Miroslav Madzarevic wrote:
I have virthost1 and virthost2 on mod-perl apache, most of the time
you get the right content when calling respective virthost but
sometimes when you call virthost2 you get response from virt. host 1.
This is a rare bug but happens.
Do you have this in your
Milo Hyson wrote:
[snip]
handler ... virtual location (i.e. one that does not directly
map to anything in the server's filesystem).
[snip]
Hi Milo,
that's easy. This is an anonymized excerpt of httpd.conf for a
multilanguage shop. None of the named locations exists on the server:
freundlichen Gren
Ernest Lergon
VIRTUALITAS
Artists online, Fine Arts online, Poets online
http://www.virtualitas.com/
;
[EMAIL PROTECTED]">http://forum.swarthmore.edu/epigone/modperl/thandflunjimp/[EMAIL PROTECTED]
Sorry, I should have dropped earlier into this thread: Doug's "trick"
works great for me!
Thanks!
Ernest
--
Yours sincerely
Mit freundlichen Gren
Ernest Lergon
users than root the directory and module is invisible.
I have not tested it - maybe I'm wrong...
Ernest
--
Yours sincerely
Mit freundlichen Grüßen
Ernest Lergon
VIRTUALITAS
Artists online, Fine Arts online, Poets online
http://www.virtualitas.com/
e it is working ONLY with Netscape-Browsers
and NOT with M$-IE5!
Unfortunately most of the surfers (according to our webstats) are using
M$-IE5 - so forget "Window-Target"...
Ernest
--
Yours sincerely
Mit freundlichen Grüßen
Ernest Lergon
VIRTUALITAS
Artists online,
);
Check out via telnet:
du /etc
du -L /etc
And the results may be different, if you are logged in as root or
if you run your program as user nobody because of access rights.
Ernest
--
Yours sincerely
Mit freundlichen Grüßen
Ernest Lergon
VIRTUALITAS
Arti
35 matches
Mail list logo