[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP under apache



> On 2003.02.11 12:29 Phil Carmody wrote:
> > The dear old internet provides lost of references to the following PHP
> > error, but no solutions:
> > PHP Fatal error:  Unable to start session mm module in Unknown on line
> > 0
> > It appears it's not actually PHP that's got the problem.

Doug Larrick wrote:
> Seems this is a FAQ recently.  You need to set /proc/sys/kernel/shmmax
> to 32 MB.

Thats right. I have included below the text that I wrote down for myself
detailing how to fix this.

Signs/Symptoms:

A tail of the /var/log/apache-perl/error.log file showed...
  PHP Fatal error:  Unable to start session mm module in Unknown on line
0

and one can't actually start the httpd either:
  martel:/etc/apache-perl# apache-perl-ctl start
  /usr/sbin/apache-perl-ctl start: httpd could not be started

Solution:

In the documentation for php4 is the file
/usr/share/doc/php4/README.Debian.gz
It says:

  * Problem with module and php4-cgi
  PHP Fatal error:  Unable to start session mm module in Unknown on line
0
  1) Remove /tmp/session_mm.sem or give access permission to the 
     user running php4.
  2) increase the limit on shared memmory 
     (echo "33554432" > /proc/sys/kernel/shmmax).
     This is mainly needed on non-i386 archs. The default is 8MB, but 
     that seems too low.

In my case there was no /tmp/session_mm.sem file but shmax was < 8MB
  martel:/etc/apache-perl# cat /proc/sys/kernel/shmmax
  4169728

OK I made it bigger as the doc says above:
  martel:/etc/apache-perl# echo "33554432" > /proc/sys/kernel/shmmax

  martel:/etc/apache-perl# cat /proc/sys/kernel/shmmax
  33554432

Restart httpd:
  martel:/etc/apache-perl# apache-perl-ctl start
  /usr/sbin/apache-perl-ctl start: httpd started

Hope that solves your problem.

Best wishes
Mike
-- 
--------------------------------------------------------------------
Michael Lake
Active caver, Linux enthusiast and interested in anything technical.
--------------------------------------------------------------------



Reply to: