Operating System - HP-UX
1753500 Members
3260 Online
108794 Solutions
New Discussion

Re: HP-UX 11.23 + PHP = core dump

 

HP-UX 11.23 + PHP = core dump

I'm trying to get "HAMPP" (HP-UX/Apache/MySQL/PHP/Perl) and I have everything working except PHP.

PHP compiles and installs, but if I run any script more complex than 'hello world' it dumps core. What I'm *trying* to do is get MediaWiki runnning.

I built everything with gcc 4.1.1 and gmake 3.81

I also have some cgi-stuff written in perl for which I need various modules, and the only way I found to get all that to work was to build my own perl, apache and related modules using gcc.

If I try using the hpws HAMP with MediaWiki I get
PHP 5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)

My php configure:

LDFLAGS="$LDFLAGS -lcl"
export LDFLAGS
PREFIX=/usr/local
./configure \
--prefix=$PREFIX/httpd/php \
--enable-shared \
--with-apache2=$PREFIX/httpd \
--with-apxs2=$PREFIX/httpd/bin/apxs \
--with-config-file-path=$PREFIX/httpd/php \
--with-libxml-dir=$PREFIX/lib \
--with-zlib \
--with-mysql=shared,/usr/local/mysql \
--with-zlib \
--without-pear \
--libexecdir=/usr/local/libexec

Sample script:
ini_get('extension_dir');
?>

Last lines of Tusc output from the crash:
close(3) ................................................................................................... = 0
brk(0x40100000) ............................................................................................ = 0
brk(0x40120000) ............................................................................................ = 0
brk(0x40140000) ............................................................................................ = 0
brk(0x40160000) ............................................................................................ = 0
brk(0x40180000) ............................................................................................ = 0
brk(0x401a0000) ............................................................................................ = 0
brk(0x401c0000) ............................................................................................ = 0
sigsetstatemask(0x17, NULL, 2147477792) .................................................................... = 0
open("y.php", O_RDONLY, 0666) .............................................................................. = 3
ioctl(3, TCGETA, 0x7fffe6e0) ............................................................................... ERR#25 ENOTTY
read(3, "< ? p h p \n\ti n i _ g e t ( ' ".., 8192) ........................................................ = 40
lseek(3, 0, SEEK_CUR) ...................................................................................... = 40
sigsetstatemask(0x17, NULL, 2147476160) .................................................................... = 0
time(NULL) ................................................................................................. = 1175005951
gettimeofday(0x7fffe200, NULL) ............................................................................. = 0
getpid() ................................................................................................... = 6653 (6652)
fstat(0, 0x4007ce48) ....................................................................................... = 0
lseek(0, 0, SEEK_CUR) ...................................................................................... = 934511
fstat(1, 0x4007cf38) ....................................................................................... = 0
lseek(1, 0, SEEK_CUR) ...................................................................................... = 934742
fstat(2, 0x4007d0b0) ....................................................................................... = 0
lseek(2, 0, SEEK_CUR) ...................................................................................... = 934973
sigsetstatemask(0x17, NULL, 2147476144) .................................................................... = 0
lstat(".", 0x7fffba60) ..................................................................................... = 0
lstat("/usr/local/src/php-5.2.1", 0x7fffbbb0) .............................................................. = 0
time(NULL) ................................................................................................. = 1175005951
gettune("fs_symlinks", 0x7fffbd60) ......................................................................... = 0
readlink("/usr", 0x7fffbd70, 1024) ......................................................................... ERR#22 EINVAL
readlink("/usr/local", 0x7fffbd70, 1024) ................................................................... ERR#22 EINVAL
readlink("/usr/local/src", 0x7fffbd70, 1024) ............................................................... ERR#22 EINVAL
readlink("/usr/local/src/php-5.2.1", 0x7fffbd70, 1024) ..................................................... ERR#22 EINVAL
readlink("/usr/local/src/php-5.2.1/y.php", 0x7fffbd70, 1024) ............................................... ERR#22 EINVAL
ioctl(3, TCGETA, 0x7fffccf0) ............................................................................... ERR#25 ENOTTY
read(3, 0x401a4c98, 8192) .................................................................................. = 0
read(3, 0x401a4c98, 8192) .................................................................................. = 0
close(3) ................................................................................................... = 0
Received signal 11, SIGSEGV, in user mode, [SIG_DFL], partial siginfo
Siginfo: si_code: SEGV_ACCERR, faulting address: 0x8, si_errno: 0
PC: 00000001000000a0.0 break.m 0x16000
exit(11) [implicit] ........................................................................................ WIFSIGNALED(SIGSEGV)|WCOREDUMP

All your base are belong to us
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: HP-UX 11.23 + PHP = core dump

Shalom,

What about the HP port of apache at http://software.hp.com

There are a bunch of available versions that include all components.

mysql is part of the Internet Express package.

Why compile when you can swinstall.

I know there are problems with some of these releases, but people have gotten them working.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: HP-UX 11.23 + PHP = core dump

The HPWS package for 11.23 does not support the MySQL extension for php :(

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXWSATW217

# php -m
[PHP Modules]
ctype
date
filter
hash
json
libxml
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
All your base are belong to us
Dennis Handly
Acclaimed Contributor

Re: HP-UX 11.23 + PHP = core dump SIGSEGV

>Received signal 11, SIGSEGV, in user mode, [SIG_DFL], partial siginfo
Siginfo: si_code: SEGV_ACCERR, faulting address: 0x8, si_errno: 0
PC: 00000001000000a0.0 break.m 0x16000

It looks like it is taking a wild branch. Or something went wrong with longjmp. You need to see if gdb's bt can tell you the caller.

 

It appears tusc is broken and doesn't report the PC address correctly for Integrity.

Marcel Burggraeve
Trusted Contributor

Re: HP-UX 11.23 + PHP = core dump

I'm pretty sure I've the combination of apache, mysql and php in the past with the HP packages.
According to http://www.hp.com/products1/unix/webservers/apache/faqs/index.html you need to enable it.
From this site :
Q: What PHP extensions are enabled by default?
By default no extensions are enabled. However substantial functionality including MySQL database connectivity is built into PHP.

Q: How do I add PHP extensions to Apache?
You need to edit two directives in the file:
/opt/hpws/apache/conf/php.ini
A. The location of the extensions.
extension_dir = /opt/hpws/apache/php/lib/php/extensions
B. The name of the extension.
extension = foo.sl

Re: HP-UX 11.23 + PHP = core dump

>However substantial functionality including
>MySQL database connectivity is built into PHP.

...except on 11.23 IA-64 - the red-headed love child of the HP-UX family...

>It looks like it is taking a wild branch. Or
>something went wrong with longjmp. You need >to see if gdb's bt can tell you the caller.

You may be on to something here. Right now I'm working on a new build of the HAMPP packages with a more tightly controlled linking options.
All your base are belong to us
Marcel Burggraeve
Trusted Contributor

Re: HP-UX 11.23 + PHP = core dump

It might be possible something has changed in the past or is there a difference between the hpws which you get installed together with the OS and the one you can download ?

This is on a RX4640 running Foundation OE B.11.23.0505 and hpuxwsApache B.2.0.53.00
# /opt/hpapache2/php/bin/php -m
[PHP Modules]
ctype
mysql
overload
pcre
posix
session
standard
tokenizer
xml

[Zend Modules]

Re: HP-UX 11.23 + PHP = core dump

>This is on a RX4640 running Foundation OE >B.11.23.0505 and hpuxwsApache B.2.0.53.00

Could you get me the name/product # of the what you installed? I'm running 11.23 OE-Enterprise on an RX3600

My installation of hpws doesn't have the apache2 directory that you reference in your reply.
All your base are belong to us
Marcel Burggraeve
Trusted Contributor

Re: HP-UX 11.23 + PHP = core dump

More information about this release can be found at :
http://www.hp.com/softwarereleases/releases-media2/latest/0505.htm
The apache version B.2.0.53 is mentioned there as well.
At the moment I can't find the installation media but partnumbers and such for this release can be found in the following document :
http://www.hp.com/softwarereleases/releases-media2/latest/0505_media.pdf
hpux_defiance
Occasional Visitor

Re: HP-UX 11.23 + PHP = core dump

I installed HP-UX_11.31_HPUXWS22ATW-B321-64.depot on HP-UX 11i v2 Itanium 2.

PHP version: 5.2.17

 

I would like to enable pdo_mysql (PHP Module). Please guide me how to active the module.

 

Thanks in advance.

-Muthusamy.S