LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-12-2005, 04:28 AM   #1
john lee
Member
 
Registered: Jun 2001
Location: Sydney, Australia
Posts: 41

Rep: Reputation: 15
Unhappy mod_perl causes segementation fault in Apache when php runs


Hi all,

I just wonder if anyone could help me in this as I have spent days trying to fix this problem.

I installed php 5.0.4, perl 5.8.7, mod_perl 1.0 and apache 1.3.33 into the same box.

Before mod_perl was installed, php programs ran fine. However, once mod_perl is installed, running php program created segment fault error and the apache log shows:

[notice] child pid 2838 exit signal Segmentation fault (11)

If I remove mod_perl from apache, the php program runs fine.

I read from http://mail-archives.apache.org/mod_...etdance.com%3E

that I need to re-configure perl with:
"
$ ./Configure --Acppflags=-DPERL_USE_SAFE_PUTENV
"
and then do:
"
along with any other Configure options you may need. Run "make",
"make test", and "make install." Then recompile mod_perl. If
your mod_perl is statically linked into apache, recompile apache
as well.
"

When I ran perl -V:cppflags, it came back with:
cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm';

I thought it is okay but but still hit the same problem.

Can anyone please help me?
 
Old 10-13-2005, 01:44 AM   #2
john lee
Member
 
Registered: Jun 2001
Location: Sydney, Australia
Posts: 41

Original Poster
Rep: Reputation: 15
Talking Fix Now!

I think I was distracted by the putenv() issue.

As it turns out, it was just a matter of dynamically linking mod_perl instead of static link. Linking mod_perl statically into Apache will cause a memory shortage to php.

So, to install Apache, mod_perl and php.

Step 1. Apache
Just install it normally.
./configure --enable-module=so \
--enable-module=rewrite \
make
make install

Don't include "--activate-module=src/modules/perl/libperl.a" in the configure script.

Step 2. mod_perl
perl Makefile.PL \
USE_APXS=1 \
WITH_APXS=/usr/local/apache/bin/apxs \ EVERYTHING=1
make
make install

Step 3. php
./configure --with-mysql=/usr/local/mysql \
--with-apxs=/usr/local/apache/bin/apxs \
--with-zlib-dir=/usr/local/include
make
make install

The community has been successfully installing php, mod_perl and apache for ages but just that there are always people who want to learn more....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Segementation Fault Error (Core Dumped) ??? Mistro116@yahoo.com Programming 8 10-17-2005 12:10 PM
Segementation fault on Multi threaded server on ia-64 Linux Latha Linux - Software 3 09-09-2004 07:40 PM
SDL Segementation Fault when calling function SDL_LockSurface fatherg Programming 2 03-29-2004 04:07 PM
Apache 2.0.45 and mod_perl arkopolo Linux - Software 0 07-03-2003 03:06 PM
Apache / Mod_Perl / PHP Please help mdkelly Linux - Software 4 02-09-2003 04:24 AM


All times are GMT -5. The time now is 04:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration