Re: Help with mod_perl
On Tue, Mar 16, 2010 at 3:33 AM, Matty Ronald wrote: > Can any one please tell me how to disable perl's malloc in mod_perl? > > I donot want to recompile perl. > > Is there any way that i can disable perl's malloc in mod_perl only? No, sorry. Since mod_perl is just embedding your perl in apache, you have to change your perl to accomplish this. You do have the option of compiling a separate perl just for mod_perl to use and keeping your system perl untouched. If you want to do that, look at the perl compile options for setting an install location and then use your newly built perl to run the mod_perl configuration scripts. - Perrin
Re: Help with mod_perl and slash
Sorry for the duplicate post. I sent one from the wrong email address and didn't think that it went through. George
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags
Hi Peter, you fail to give us the information required to solve your problem. Please see: http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems Tom peter pilsl wrote: I use mod_perl for a very long time already. Now I installed apache2.0.52 and took the chance to install a new mod_perl as well. First I tried the new 2.0RC3, then I tried 1.99.17, then 1.99.16 und finally 1.99.14 and all failed with the very same problem. Apache could not start up due to the following error: Cannot load /usr/local/apache2/modules/mod_perl.so into server: /usr/local/apache2/modules/mod_perl.so: undefined symbol: Perl_sv_2pv_flags I then copied my old 1.99.08-module (that was compiled with apache 2.0.48) to the modules-folder and everything seems to work fine now. But I want to use a newer version. Where should I start to look for my problem? is it a perl-problem? a apache-problem? a mod_perl-problem? I buildt mod_perl with: perl Makefile.PL MP_INST_APACHE2=1 MP_AP_PREFIX=/usr/local/apache2 thnx, peter
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags
peter pilsl wrote: I use mod_perl for a very long time already. Now I installed apache2.0.52 and took the chance to install a new mod_perl as well. First I tried the new 2.0RC3, then I tried 1.99.17, then 1.99.16 und finally 1.99.14 and all failed with the very same problem. Apache could not start up due to the following error: Cannot load /usr/local/apache2/modules/mod_perl.so into server: /usr/local/apache2/modules/mod_perl.so: undefined symbol: Perl_sv_2pv_flags that normally means that you have libperl.so in /usr/lib and it's not the one used by the perl you've built mod_perl with. Please post the output of ldd /usr/local/apache2/modules/mod_perl.so and if you have libperl.so in /usr/local/lib and /usr/lib. if you have both, that's your problem. e.g. see: http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_relocation_errors__or__undefined_symbol_ -- __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags [SOLVED]
Stas Bekman wrote: that normally means that you have libperl.so in /usr/lib and it's not the one used by the perl you've built mod_perl with. Please post the output of ldd /usr/local/apache2/modules/mod_perl.so and if you have libperl.so in /usr/local/lib and /usr/lib. if you have both, that's your problem. e.g. see: http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_relocation_errors__or__undefined_symbol_ Ok - I finally solved the mystery. I had only one single libperl.so on my system in /usr/local/lib and even this one was too much. Using ldd I discovered that my new failing mod_perl.so was linked against this libperl.so while my old working mod_perl.so wasnt linked against any libperl.so. So I removed this libperl.so and compiled mod_perl from the scratch and everything was going fine. So it was a leftover from a old system. Digging a bit deeper showed that it was left behind by my good old perl5.6.1 :) I still dont understand why my new perl5.8.5 does not have a libperl.so and why mod_perl can live very well without it. But sometimes even one is too much :) Thnx to all for helping me out here, peter ps: and thnx plus a nice weekend to geoffrey if he is still reading here :) -- mag. peter pilsl goldfisch.at IT-management tel +43 699 1 3574035 fax +43 699 4 3574035 [EMAIL PROTECTED]
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags [SOLVED]
peter pilsl wrote: Ok - I finally solved the mystery. I had only one single libperl.so on my system in /usr/local/lib and even this one was too much. Using ldd I discovered that my new failing mod_perl.so was linked against this libperl.so while my old working mod_perl.so wasnt linked against any libperl.so. So I removed this libperl.so and compiled mod_perl from the scratch and everything was going fine. So it was a leftover from a old system. Digging a bit deeper showed that it was left behind by my good old perl5.6.1 :) I still dont understand why my new perl5.8.5 does not have a libperl.so because your new perl was compiled to be static: *** /usr/local/bin/perl -V Summary of my perl5 (revision 5 version 8 subversion 5) configuration: [...] libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a so you have libperl.a instead. and why mod_perl can live very well without it. because it now includes the whole libperl.a archive inside mod_perl.so. It's a good idea to avoid that. When using libperl.so and more than one application is linked against it, the system loads it only once, saving some memory and startup time (when more than one app using that libperl.so is running at the same time). But it's not too bad if it doesn't. -- __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags (full system report this time)
I could swear that there is something left off from your last installations see the different perl installations found on your system. Still this is only a wild guess you have to wait for the gurus around here. As a sidenote I always install/compile my own perl and for my apache you could also do that because you don't run the latest stable release which is 5.8.6. Compiling perl is really not that tricky, for most things you can use the default values but be aware when you want to run mod-perl in a threaded-mpm to compile this in if you run prefork leave it out because a thread-save perl is slower. Be aware to install you perl in a different location than /usr/local because then you'll wipe out your old install. Tom peter pilsl wrote: *** Packages of interest status: Apache::Request: - CGI: 3.05 LWP: - mod_perl : 1.9908, 1.9914, 1.9916 This report was generated by t/REPORT on Thu Jan 20 10:04:04 2005 GMT.
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags (full system report this time)
> What suprised me is that at the end it states that there are several > versions of mod_perl-modules installed. Is this a possible cause of my > problem? yes, quite possibly. > Apache::Request: - > CGI: 3.05 > LWP: - > mod_perl : 1.9908, 1.9914, 1.9916 if you can (like there is no mod_perl 1.0 installation you care about) I would remove all Apache related things in your site_lib, including mod_perl.pm ModPerl/* Apache/* Apache2/* as well as /usr/local/apache2/modules/mod_perl.so. then 'make realclean' in your mod_perl-1.99_16 directory and start all over again. if 'make test' passes then you should be able to 'make install' and everything should be ok. if it's not, check to make sure that the mod_perl.so in your /usr/local/apache2/modules is the same as the one you'll find under your mod_perl build directory. sorry, I know that nuking everything and starting all over isn't exciting, or exactly useful in terms of help, but... --Geoff
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags (full system report this time)
Geoffrey Young wrote: if you can (like there is no mod_perl 1.0 installation you care about) I would remove all Apache related things in your site_lib, including mod_perl.pm ModPerl/* Apache/* Apache2/* as well as /usr/local/apache2/modules/mod_perl.so. then 'make realclean' in your mod_perl-1.99_16 directory and start all over again. if 'make test' passes then you should be able to 'make install' and everything should be ok. I nuked everything I had that smelled like mod_perl and mod_perl fails at the make test: /usr/local/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \ t/TEST -clean [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/local/bin/perl /usr/src/mod_perl-1.99_16/t/TEST -clean APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER= APACHE_TEST_APXS= \ /usr/local/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \ t/TEST -bugreport -verbose=0 [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/local/bin/perl /usr/src/mod_perl-1.99_16/t/TEST -bugreport -verbose=0 [warning] root mode: changing the files ownership to 'nobody' (99:99) [warning] testing whether 'nobody' is able to -rwx /usr/src/mod_perl-1.99_16/t "/usr/local/bin/perl" -Mlib=/usr/src/mod_perl-1.99_16/Apache-Test/lib -MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(99, 99, q[/usr/src/mod_perl-1.99_16/t]) }'; [warning] result: OK [warning] the client side drops 'root' permissions and becomes 'nobody' /usr/local/apache2/bin/httpd -d /usr/src/mod_perl-1.99_16/t -f /usr/src/mod_perl-1.99_16/t/conf/httpd.conf -D APACHE2 using Apache/2.0.52 (prefork MPM) waiting 120 seconds for server to start: .Syntax error on line 12 of /usr/src/mod_perl-1.99_16/t/conf/httpd.conf: Cannot load /usr/src/mod_perl-1.99_16/src/modules/perl/mod_perl.so into server: /usr/src/mod_perl-1.99_16/src/modules/perl/mod_perl.so: undefined symbol: Perl_sv_2pv_flags [ error] server has died with status 255 (t/logs/error_log wasn't created, start the server in the debug mode) make: *** [run_tests] Error 143 which is still the very same problem ... thnx, peter -- mag. peter pilsl goldfisch.at IT-management tel +43 699 1 3574035 fax +43 699 4 3574035 [EMAIL PROTECTED]
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags (full system report this time)
> I nuked everything I had that smelled like mod_perl and mod_perl fails > at the make test: > /usr/src/mod_perl-1.99_16/t/conf/httpd.conf: > Cannot load /usr/src/mod_perl-1.99_16/src/modules/perl/mod_perl.so into > server: /usr/src/mod_perl-1.99_16/src/modules/perl/mod_perl.so: > undefined symbol: Perl_sv_2pv_flags that's the wrong mod_perl.so - your httpd.conf should be picking it up from your mod_perl build directory. so, remove that mod_perl.so and you should be ok. but that the existing mod_perl.so is used is a bug I can verify from here. we'll take care of it. --Geoff
Re: help with mod_perl: undefined symbol: Perl_sv_2pv_flags (full system report this time)
Geoffrey Young wrote: >>I nuked everything I had that smelled like mod_perl and mod_perl fails >>at the make test: > > >>/usr/src/mod_perl-1.99_16/t/conf/httpd.conf: >>Cannot load /usr/src/mod_perl-1.99_16/src/modules/perl/mod_perl.so into >>server: /usr/src/mod_perl-1.99_16/src/modules/perl/mod_perl.so: >>undefined symbol: Perl_sv_2pv_flags > > > that's the wrong mod_perl.so - your httpd.conf should be picking it up from > your mod_perl build directory. gak, I don't know what I was thinking saying that. it's obviously time for the weekend :) anyway, I tried with perl-5.8.5 and it works fine for me. the only thing I can suggest at this point is to look at lib/Apache/BuildConfig.pm and see what options it is picking up. Perl_sv_2pv_flags is defined in embed.h, which on my 5.8.5 is in /perl/perl-5.8.5/lib/5.8.5/i686-linux-thread-multi/CORE/embed.h so I grep for that base directory and find .../CORE in MODPERL_CCOPTS, MODPERL_LDOPTS, and MODPERL_LIBPERL. so, see what you find. Tom might be right, you might be picking up remnants from an old perl install or something. HTH --Geoff