Forum Moderators: coopster

Message Too Old, No Replies

Segfault

         

Jase

1:31 am on Dec 10, 2008 (gmt 0)

10+ Year Member



This is my current setup

Apache 2.2.10 MPM Worker and fastcgi.

php.conf

PHP Code:
# Fastcgi configuration for PHP5
LoadModule fcgid_module modules/mod_fcgid.so
MaxRequestsPerProcess 500
MaxProcessCount 1000
DefaultMaxClassProcessCount 100
IPCConnectTimeout 60
IPCCommTimeout 60
PHP_Fix_Pathinfo_Enable 1
IdleTimeout 900
IdleScanInterval 120
BusyTimeout 300
BusyScanInterval 120
ErrorScanInterval 9
ZombieScanInterval 9
ProcessLifeTime 3600

AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php55
Action php4-fastcgi /cgi-bin/php44

AddType application/x-httpd-php .php

and user must have in cgi-bin

php55 (chattr +i)

PHP Code:
#!/bin/sh
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=10
exec /usr/local/cpanel/cgi-sys/php5

Then you can add to .htaccess

PHP Code:
AddHandler php5-fastcgi .html
Action php5-fastcgi /cgi-bin/php55

This is the error I get

root@s1 [~]# tail -f /var/log/messages
Dec 8 22:27:47 s1 kernel: php5[526]: segfault at 000000000000000f rip 00002ab9044a4dec rsp 00007fffa6be2a50 error 4
Dec 8 22:27:47 s1 kernel: php5[529]: segfault at 000000000000000f rip 00002ac3297d7dec rsp 00007fff818b1720 error 4
Dec 8 22:27:47 s1 kernel: php5[530]: segfault at 000000000000000f rip 00002b492a3c2dec rsp 00007fff80cc4b30 error 4
Dec 8 22:27:47 s1 kernel: php5[531]: segfault at 000000000000000f rip 00002aebc35c5dec rsp 00007fffe7ac3930 error 4

strace -o output.txt /usr/local/cpanel/cgi-sys/php5

stat("/opt/xml2/lib/x86_64", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/opt/xml2/lib/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/xml2/lib", {st_mode=S_IFDIR¦0755, st_size=4096, ...}) = 0
open("/opt/curl//lib64/tls/x86_64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/curl//lib64/tls/x86_64", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/opt/curl//lib64/tls/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/curl//lib64/tls", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/opt/curl//lib64/x86_64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/curl//lib64/x86_64", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/opt/curl//lib64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/curl//lib64", {st_mode=S_IFDIR¦0755, st_size=4096, ...}) = 0
open("/opt/php_with_imap_client//lib64/tls/x86_64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/php_with_imap_client//lib64/tls/x86_64", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/opt/php_with_imap_client//lib64/tls/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/php_with_imap_client//lib64/tls", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/opt/php_with_imap_client//lib64/x86_64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/php_with_imap_client//lib64/x86_64", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/opt/php_with_imap_client//lib64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/opt/php_with_imap_client//lib64", {st_mode=S_IFDIR¦0755, st_size=4096, ...}) = 0
open("/usr/lib64/tls/x86_64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", {st_mode=S_IFDIR¦0755, st_size=4096, ...}) = 0
open("/usr/lib64/x86_64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7ffffe06acf0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\364$]<\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG¦0755, st_size=976312, ...}) = 0
mmap(NULL, 4096, PROT_READ¦PROT_WRITE, MAP_PRIVATE¦MAP_ANONYMOUS, -1, 0) = 0x2ac3aca3c000
mmap(0x3c5d200000, 3145600, PROT_READ¦PROT_EXEC, MAP_PRIVATE¦MAP_DENYWRITE, 3, 0) = 0x3c5d200000
mprotect(0x3c5d2e6000, 2093056, PROT_NONE) = 0
mmap(0x3c5d4e5000, 36864, PROT_READ¦PROT_WRITE, MAP_PRIVATE¦MAP_FIXED¦MAP_DENYWRITE, 3, 0xe5000) = 0x3c5d4e5000
mmap(0x3c5d4ee000, 73600, PROT_READ¦PROT_WRITE, MAP_PRIVATE¦MAP_FIXED¦MAP_ANONYMOUS, -1, 0) = 0x3c5d4ee000
close(3) = 0
open("/opt/curl//lib/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/xml2/lib/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/curl//lib64/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/php_with_imap_client//lib64/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG¦0644, st_size=73406, ...}) = 0
mmap(NULL, 73406, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ac3aca3d000
close(3) = 0
open("/lib64/libcrypt.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\t\300\3518\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG¦0755, st_size=48600, ...}) = 0
mmap(0x38e9c00000, 2322880, PROT_READ¦PROT_EXEC, MAP_PRIVATE¦MAP_DENYWRITE, 3, 0) = 0x38e9c00000
mprotect(0x38e9c09000, 2093056, PROT_NONE) = 0
mmap(0x38e9e08000, 8192, PROT_READ¦PROT_WRITE, MAP_PRIVATE¦MAP_FIXED¦MAP_DENYWRITE, 3, 0x8000) = 0x38e9e08000
mmap(0x38e9e0a000, 184768, PROT_READ¦PROT_WRITE, MAP_PRIVATE¦MAP_FIXED¦MAP_ANONYMOUS, -1, 0) = 0x38e9e0a000
close(3) = 0
open("/opt/curl//lib/libmysqlclient_r.so.15", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/xml2/lib/libmysqlclient_r.so.15", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/curl//lib64/libmysqlclient_r.so.15", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/php_with_imap_client//lib64/libmysqlclient_r.so.15", O_RDONLY) = -1 ENOENT (No such file or directory)

Jase

1:36 am on Dec 10, 2008 (gmt 0)

10+ Year Member



This might help too

'./configure' '--disable-pdo' '--enable-bcmath' '--enable-calendar' '--enable-fastcgi' '--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-maintainer-zts' '--enable-sockets' '--prefix=/usr' '--with-config-file-path=/usr/local/lib' '--with-config-file-scan-dir=/usr/local/lib/php.ini.d' '--with-curl=/opt/curl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pic' '--with-png-dir=/usr' '--with-ttf' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'