#46020 [Com]: With Sun Java System Web Server 7.0 on HPUX, #define HPUX

2009-01-12 Thread river at wikimedia dot org
 ID:   46020
 Comment by:   river at wikimedia dot org
 Reported By:  river at wikimedia dot org
 Status:   Assigned
 Bug Type: Compile Failure
 Operating System: HP-UX 11.11
 PHP Version:  5.2.6
 Assigned To:  thetaphi
 New Comment:

I agree the problem seems to be inside the NSAPI headers, but the
response from Sun about this was 'define HPUX yourself', so it seems
they're not interested in fixing it.


Previous Comments:


[2009-01-12 09:21:26] rkl at connect dot org dot uk

Just a note that "#ifndef HPUX" is technically the wrong check for
HP-UX when compiling C/C++, it should be:

#ifndef __hpux
..Do non-HP-UX code
#endif

__hpux is defined in all C/C++ compilers (both gcc/g++ and HP's C/C++)
in all releases of HP-UX. So the blame here is with Sun's nsapi.h and
not PHP, but until Sun fix it, -DHPUX is the obvious workaround.



[2008-10-02 17:33:43] theta...@php.net

In my opinion, this is not a bug in PHP, as the compile failure happens
in nsapi.h.
I think you should also ask this question on the SJSWS discussion on
Sun's homepage. Or maybe this is a GCC bug.
In principle, it would be possible to add a compile option to PHP that
is only set on HPUX, but this would not help others to compile other
NSAPI components with GCC. Did you try the HP-UX compiler, does it set
"-DHPUX"?
I have no HP-UX machine, so I cannot test any of your configurations.
Maybe you send me a fragment to detect HP-UX in configure scripts or
what the auto-defines of GCC are for HP-UX.

With this a simple workaround would be to do:

#ifdef GCC_SPECIAL_HPUX_DEFINE
#define HPUX
#endif
include "nsapi.h"

in the nsapi module (I think nsapi.h is used nowhere else in PHP).



[2008-10-01 00:49:51] krish dot v at gmail dot com

This happened for my Sun one webserver 6.1 running in HP UX 11.11. I
tried your work around and it worked fine. Thanks for the help.

This is really a useful one.

Krish.

----------------

[2008-09-08 08:41:04] river at wikimedia dot org

Description:

When compiling --with-nsapi on HP-UX 11.11 using Sun Java System Web
Server 7.0 Update 3, compilation fails inside  because HPUX is
not #defined.  

A workaround is to build with 'CPPFLAGS=-DHPUX'.  I suggest detecting
HP-UX at compile time and defining HPUX if the NSAPI module is being
built.

Reproduce code:
---
I compiled PHP like this:

CPPFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib
-Wl,+b,/usr/local/mysql/lib:/usr/local/lib' CC=gcc CXX=g++ ./configure
--prefix=/opt/php --with-mysql=/usr/local/mysql --enable-mbstring
--enable-fastcgi --with-nsapi=/opt/webserver7


Expected result:

I expected PHP to compile.

Actual result:
--
PHP didn't compile, with the following error:

In file included from /home/river/php/php-5.2.6/sapi/nsapi/nsapi.c:62:
/opt/webserver7/include/nsapi.h:315:24: error: sys/select.h: No such
file or directory

(This include is wrapped in "#ifndef HPUX", which HP's GCC doesn't
define by default.)





-- 
Edit this bug report at http://bugs.php.net/?id=46020&edit=1



#46020 [NEW]: With Sun Java System Web Server 7.0 on HPUX, #define HPUX

2008-09-08 Thread river at wikimedia dot org
From: river at wikimedia dot org
Operating system: HP-UX 11.11
PHP version:  5.2.6
PHP Bug Type: Compile Failure
Bug description:  With Sun Java System Web Server 7.0 on HPUX, #define HPUX

Description:

When compiling --with-nsapi on HP-UX 11.11 using Sun Java System Web
Server 7.0 Update 3, compilation fails inside  because HPUX is not
#defined.  

A workaround is to build with 'CPPFLAGS=-DHPUX'.  I suggest detecting
HP-UX at compile time and defining HPUX if the NSAPI module is being built.

Reproduce code:
---
I compiled PHP like this:

CPPFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib
-Wl,+b,/usr/local/mysql/lib:/usr/local/lib' CC=gcc CXX=g++ ./configure
--prefix=/opt/php --with-mysql=/usr/local/mysql --enable-mbstring
--enable-fastcgi --with-nsapi=/opt/webserver7


Expected result:

I expected PHP to compile.

Actual result:
--
PHP didn't compile, with the following error:

In file included from /home/river/php/php-5.2.6/sapi/nsapi/nsapi.c:62:
/opt/webserver7/include/nsapi.h:315:24: error: sys/select.h: No such file
or directory

(This include is wrapped in "#ifndef HPUX", which HP's GCC doesn't define
by default.)

-- 
Edit bug report at http://bugs.php.net/?id=46020&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=46020&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=46020&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=46020&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46020&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=46020&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=46020&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=46020&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=46020&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=46020&r=support
Expected behavior:http://bugs.php.net/fix.php?id=46020&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=46020&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=46020&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46020&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=46020&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46020&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=46020&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=46020&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=46020&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=46020&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=46020&r=mysqlcfg



#44381 [NEW]: nsapi: typo in startup message

2008-03-09 Thread river at wikimedia dot org
From: river at wikimedia dot org
Operating system: Linux
PHP version:  5.2.5
PHP Bug Type: iPlanet related
Bug description:  nsapi: typo in startup message

Description:

During web server startup, the following message is logged:

[09/Mar/2008:15:53:31] info (24007): php5_init reports: Initialized PHP
Module (128 threads exspected)

"exspected" should read "expected"

(message is printed in sapi/nsapi/nsapi.c)


-- 
Edit bug report at http://bugs.php.net/?id=44381&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44381&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44381&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44381&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44381&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44381&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44381&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44381&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44381&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44381&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44381&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44381&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44381&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44381&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44381&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44381&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44381&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44381&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44381&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44381&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44381&r=mysqlcfg