php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39192 Not including nsapi.h properly with SJSWS 7
Submitted: 2006-10-19 01:42 UTC Modified: 2006-10-27 08:50 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: ormandj at corenode dot com Assigned: thetaphi (profile)
Status: Closed Package: iPlanet related
PHP Version: 5.1.6 OS: Solaris 10 6/06
Private report: No CVE-ID: None
 [2006-10-19 01:42 UTC] ormandj at corenode dot com
Description:
------------
When I first ran:
./configure --prefix=/opt/php --with-nsapi=/sun/webserver7 --with-libxml-dir=/opt/libxml --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --enable-libgcc

It ran with no errors. I then attempted to "gmake" and got an error that nsapi.h was not found when compiling nsapi.c. 

# ls /sun/webserver7/include/nsapi.h
/sun/webserver7/include/nsapi.h
#

I had to edit "configure" and change this line (this is not the correct fix I think, I just did it as a quick fix because I don't know how configure scripts work):

*) ac_srcdir="$abs_srcdir/sapi/nsapi/"; ac_bdir="sapi/nsapi/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;

To:

*) ac_srcdir="$abs_srcdir/sapi/nsapi/"; ac_bdir="sapi/nsapi/"; ac_inc="-I$ac_bdir -I$ac_srcdir -I$NSAPI_INCLUDE" ;;

Then, ran configure as so:

./configure --prefix=/opt/php --with-nsapi=/sun/webserver7 --with-libxml-dir=/opt/libxml --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --enable-libgcc

At this point, it compiled fine, and is now running fine.

In other words, something is wrong with configure and this webserver. If more output is needed it can be provided. :)

Thanks,
David


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-19 14:54 UTC] tony2001@php.net
Look into sapi/nsapi/config.m4, this is the file you need to edit (and run ./buildconf --force after that).
I fail to see how -I/sun/webserver7/include may be missing, but I don't have a SJSWS to try it.
 [2006-10-19 17:42 UTC] ormandj at corenode dot com
If you are interested, I will setup a Solaris zone for you with everything you need to attempt to build php, so you can further diagnose this error. If you would be willing, please respond here or contact me via email. I will provide you the login information.

Thanks,
David
 [2006-10-19 19:38 UTC] ormandj at corenode dot com
http://blogs.sun.com/dzm

Look at the June 10 entry. It's the same issue experienced by somebody else.

David
 [2006-10-19 19:48 UTC] tony2001@php.net
>This is happening because PHP is looking for this header
>file in [server_root]/plugins/include/, but in Web Server
>7 that directory has been moved to [server_root]/include/. 

Wrong, PHP looks for nsapi.h in [server_root]/include/ since 2000 (at the very least). And if it fails, then it looks for [server_root]/plugins/include/.
And if this directory doesn't exist, then ./configure bails out with a nice error message.
That's why I don't understand how you succeeded to ./configure it in the first place.
 [2006-10-19 20:20 UTC] ormandj at corenode dot com
Ok, to demonstrate, I have deleted my old build directory, then untarred/gzipped php 5.1.6. I installed Sun Java Webserver 7 into /sun/webserver7. nsapi.h exists in /sun/webserver7/include/. Now I have run:

./configure --prefix=/opt/php --with-nsapi=/sun/webserver7 --with-libxml-dir=/opt/libxml --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --enable-libgcc --with-zlib=/opt/zlib --enable-mbstring

Shortly into the configure, it shows:
checking for NSAPI support... /sun/webserver7
checking for NSAPI include files... Netscape-Enterprise 3.x style
checking for /sun/webserver7/include/nsapi.h... (cached) yes


Then, I run: "gmake". It errors:

/bin/sh /root/php-5.1.6/libtool --silent --preserve-dup-deps --mode=compile gcc  -IZend/ -I/root/php-5.1.6/Zend/ -DPHP_ATOM_INC -I/root/php-5.1.6/include -I/root/php-5.1.6/main -I/root/php-5.1.6 -I/opt/libxml/include/libxml2 -I/opt/zlib/include -I/root/php-5.1.6/ext/date/lib -I/root/php-5.1.6/ext/mbstring/oniguruma -I/root/php-5.1.6/ext/mbstring/libmbfl -I/root/php-5.1.6/ext/mbstring/libmbfl/mbfl -I/opt/mysql/include/mysql -I/root/php-5.1.6/TSRM -I/root/php-5.1.6/Zend  -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT  -I/usr/include -g -O2 -DZTS   -c /root/php-5.1.6/Zend/zend_execute.c -o Zend/zend_execute.lo
/bin/sh /root/php-5.1.6/libtool --silent --preserve-dup-deps --mode=compile gcc  -Isapi/nsapi/ -I/root/php-5.1.6/sapi/nsapi/ -DPHP_ATOM_INC -I/root/php-5.1.6/include -I/root/php-5.1.6/main -I/root/php-5.1.6 -I/opt/libxml/include/libxml2 -I/opt/zlib/include -I/root/php-5.1.6/ext/date/lib -I/root/php-5.1.6/ext/mbstring/oniguruma -I/root/php-5.1.6/ext/mbstring/libmbfl -I/root/php-5.1.6/ext/mbstring/libmbfl/mbfl -I/opt/mysql/include/mysql -I/root/php-5.1.6/TSRM -I/root/php-5.1.6/Zend  -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT  -I/usr/include -g -O2 -DZTS   -c /root/php-5.1.6/sapi/nsapi/nsapi.c -o sapi/nsapi/nsapi.lo
/root/php-5.1.6/sapi/nsapi/nsapi.c:62:19: nsapi.h: No such file or directory
/root/php-5.1.6/sapi/nsapi/nsapi.c:63:25: base/pblock.h: No such file or directory
/root/php-5.1.6/sapi/nsapi/nsapi.c:64:26: base/session.h: No such file or directory
/root/php-5.1.6/sapi/nsapi/nsapi.c:65:23: frame/req.h: No such file or directory
/root/php-5.1.6/sapi/nsapi/nsapi.c:66:59: frame/protocol.h: No such file or directory
/root/php-5.1.6/sapi/nsapi/nsapi.c:67:55: base/util.h: No such file or directory
/root/php-5.1.6/sapi/nsapi/nsapi.c:68:45: frame/log.h: No such file or directory
/root/php-5.1.6/sapi/nsapi/nsapi.c:89: error: syntax error before "pblock"
/root/php-5.1.6/sapi/nsapi/nsapi.c:89: warning: no semicolon at end of struct or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:90: warning: data definition has no type or storage class
/root/php-5.1.6/sapi/nsapi/nsapi.c:91: error: syntax error before '*' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:91: warning: data definition has no type or storage class
/root/php-5.1.6/sapi/nsapi/nsapi.c:96: error: syntax error before '}' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:96: warning: data definition has no type or storage class
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `nsapi_strdup':
/root/php-5.1.6/sapi/nsapi/nsapi.c:138: warning: return makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c: At top level:
/root/php-5.1.6/sapi/nsapi/nsapi.c:214: error: syntax error before '*' token
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `zif_nsapi_virtual':
/root/php-5.1.6/sapi/nsapi/nsapi.c:335: error: `Request' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:335: error: (Each undeclared identifier is reported only once
/root/php-5.1.6/sapi/nsapi/nsapi.c:335: error: for each function it appears in.)
/root/php-5.1.6/sapi/nsapi/nsapi.c:336: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:336: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:355: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:361: error: request for member `headers' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:362: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:363: error: request for member `headers' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:370: error: `REQ_PROCEED' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:385: error: `REQ_RESTART' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:387: error: request for member `status_num' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:388: error: request for member `status_num' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `zif_nsapi_request_headers':
/root/php-5.1.6/sapi/nsapi/nsapi.c:406: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:406: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:413: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:414: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:414: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:414: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:416: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `zif_nsapi_response_headers':
/root/php-5.1.6/sapi/nsapi/nsapi.c:428: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:428: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:437: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:437: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:437: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:438: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_ub_write':
/root/php-5.1.6/sapi/nsapi/nsapi.c:452: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:454: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:456: error: `IO_ERROR' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:456: error: `IO_EOF' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_header_handler':
/root/php-5.1.6/sapi/nsapi/nsapi.c:465: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:465: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_send_headers':
/root/php-5.1.6/sapi/nsapi/nsapi.c:499: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:499: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:512: error: `REQ_PROCEED' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:512: error: `REQ_NOACTION' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_read_post':
/root/php-5.1.6/sapi/nsapi/nsapi.c:521: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:521: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:525: error: `netbuf' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:525: error: `nbuf' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:562: error: `IO_ERROR' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:562: error: `IO_EOF' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_read_cookies':
/root/php-5.1.6/sapi/nsapi/nsapi.c:580: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:580: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:582: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_register_server_variables':
/root/php-5.1.6/sapi/nsapi/nsapi.c:588: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:588: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:596: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:605: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:606: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:606: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:607: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:610: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:620: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:622: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:627: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:634: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:640: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:645: error: invalid type argument of `->'
/root/php-5.1.6/sapi/nsapi/nsapi.c:647: error: invalid type argument of `->'
/root/php-5.1.6/sapi/nsapi/nsapi.c:649: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:653: warning: passing arg 2 of `php_register_variable' makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:654: error: `security_active' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:658: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:666: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `nsapi_log_message':
/root/php-5.1.6/sapi/nsapi/nsapi.c:706: error: `rc' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:706: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:708: error: `LOG_INFORM' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_get_request_time':
/root/php-5.1.6/sapi/nsapi/nsapi.c:713: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `nsapi_php_ini_entries':
/root/php-5.1.6/sapi/nsapi/nsapi.c:764: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:765: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:770: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:775: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:775: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:776: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:776: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: `LOG_WARN' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c:781: error: dereferencing pointer to incomplete type
/root/php-5.1.6/sapi/nsapi/nsapi.c: At top level:
/root/php-5.1.6/sapi/nsapi/nsapi.c:786: error: syntax error before "php5_close"
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `php5_close':
/root/php-5.1.6/sapi/nsapi/nsapi.c:805: error: `LOG_INFORM' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c: At top level:
/root/php-5.1.6/sapi/nsapi/nsapi.c:819: error: syntax error before "php5_init"
/root/php-5.1.6/sapi/nsapi/nsapi.c:819: error: syntax error before '*' token
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `php5_init':
/root/php-5.1.6/sapi/nsapi/nsapi.c:837: error: `pb' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:837: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:855: error: `LOG_INFORM' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:856: error: `REQ_PROCEED' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c: At top level:
/root/php-5.1.6/sapi/nsapi/nsapi.c:874: error: syntax error before "php5_execute"
/root/php-5.1.6/sapi/nsapi/nsapi.c:874: error: syntax error before '*' token
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `php5_execute':
/root/php-5.1.6/sapi/nsapi/nsapi.c:877: error: `request_context' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:882: error: request for member `reqpb' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:882: warning: initialization makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:883: error: request for member `reqpb' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:883: warning: initialization makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:884: error: request for member `reqpb' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:884: warning: initialization makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:885: error: request for member `headers' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:885: warning: initialization makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:886: error: request for member `headers' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:886: warning: initialization makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:887: error: `pb' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:887: warning: initialization makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:892: warning: initialization makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:898: error: request for member `vars' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:898: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:899: error: request for member `vars' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:899: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:903: error: `LOG_WARN' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:904: error: `REQ_NOACTION' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:908: error: request for member `reqpb' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:908: warning: assignment makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:920: error: `REQ_ABORTED' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c:924: error: syntax error before ')' token
/root/php-5.1.6/sapi/nsapi/nsapi.c:930: error: request for member `status_num' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:940: error: request for member `status_num' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:944: error: request for member `headers' in something not a structure or union
/root/php-5.1.6/sapi/nsapi/nsapi.c:944: warning: passing arg 1 of `php_handle_auth_data' makes pointer from integer without a cast
/root/php-5.1.6/sapi/nsapi/nsapi.c:955: error: `REQ_PROCEED' undeclared (first use in this function)
/root/php-5.1.6/sapi/nsapi/nsapi.c: At top level:
/root/php-5.1.6/sapi/nsapi/nsapi.c:1005: error: syntax error before "php5_auth_trans"
/root/php-5.1.6/sapi/nsapi/nsapi.c:1005: error: syntax error before '*' token
/root/php-5.1.6/sapi/nsapi/nsapi.c: In function `php5_auth_trans':
/root/php-5.1.6/sapi/nsapi/nsapi.c:1011: error: `REQ_PROCEED' undeclared (first use in this function)
gmake: *** [sapi/nsapi/nsapi.lo] Error 1
#

If I make the change I said earlier, it adds the "-I/sun/webserver7/include" to the compile of nsapi.c, which then completes successfully.
 [2006-10-19 20:28 UTC] tony2001@php.net
As I've said I don't use/have Sun webserver, so I can't test it (and hence can't fix).
Fix sapi/nsapi/config.m4 and send me a patch, I'll gladly review it. 
 [2006-10-19 20:35 UTC] ormandj at corenode dot com
I would love to do that, but I'm not that good with "configure". I did look in config.m4, but I don't know things well enough to fix it. If you look in the output, configure *looks* like it detected nsapi.h correctly. The problem is in the compile itself, it's not got "-I/sun/webserver7/include" which is where nsapi.h resides.

As I said, I can give you an account with access to all of this to determine the cause/provide a fix, I really do not know "configure". It just needs to add that -I$NSAPI_INCLUDE to the compile. I can't see in config.m4 where it does anything but define $NSAPI_INCLUDE, but that is already defined correctly as /sun/webserver7/include. I think the error lies elsewhere, maybe a hint?
 [2006-10-19 20:39 UTC] ormandj at corenode dot com
I think the problem is somewhere in this code in "configure", as it seems to be where it adds it to the "includes". If you have any idea what I should do, I'll give it a try:

  for ac_i in $NSAPI_INCLUDE; do
    case $ac_i in
    -I*)
      ac_ii=`echo $ac_i|cut -c 3-`

  if test "$ac_ii" != "/usr/include"; then

  if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
    ai_p=$ac_ii
  else

    ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"

    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
    ai_p="$ep_realdir/`basename \"$ac_ii\"`"
  fi



  unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`

  cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
  if test -n "$unique" && test "`eval $cmd`" = "" ; then
    eval "INCLUDEPATH$unique=set"

      if test ""; then
        INCLUDES="-I$ai_p $INCLUDES"
      else
        INCLUDES="$INCLUDES -I$ai_p"
      fi

  fi

  fi

    ;;
    esac
  done
 [2006-10-26 06:18 UTC] elving at sun dot com
The problem appears to be due to an incomplete fix for #19290. The following diff against 5.1.6 works here:

--- sapi/nsapi/config.m4        Wed Oct 25 22:44:33 2006
+++ /home/elving/39192/php-5.1.6/sapi/nsapi/config.m4   Wed Oct 25 23:14:16 2006
@@ -6,3 +6,3 @@
 AC_ARG_WITH(nsapi,
-[  --with-nsapi=DIR        Build PHP as NSAPI module for Netscape/iPlanet/SunONE],[
+[  --with-nsapi=DIR        Build PHP as NSAPI module for Netscape/iPlanet/Sun],[
   PHP_NSAPI=$withval
@@ -15,3 +15,3 @@
   if test ! -d $PHP_NSAPI/bin ; then
-    AC_MSG_ERROR(Please specify the path to the root of your Netscape/iPlanet/SunONE server using --with-nsapi=DIR)
+    AC_MSG_ERROR(Please specify the path to the root of your Netscape/iPlanet/Sun server using --with-nsapi=DIR)
   fi
@@ -19,5 +19,7 @@
   if test -d $PHP_NSAPI/include ; then
+    test -n "$NSAPI_INCLUDE" && NSAPI_INC_DIR="-I$NSAPI_INCLUDE"
     NSAPI_INCLUDE=$PHP_NSAPI/include
-    AC_MSG_RESULT(Netscape-Enterprise 3.x style)
+    AC_MSG_RESULT(Netscape 3.x style / Sun 7.x style)
     AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h])
+    NSAPI_INCLUDE="$NSAPI_INC_DIR -I$NSAPI_INCLUDE"
   fi
@@ -26,3 +28,3 @@
     NSAPI_INCLUDE="$PHP_NSAPI/plugins/include"
-    AC_MSG_RESULT(iPlanet 4.x / SunONE 6.x style)
+    AC_MSG_RESULT(iPlanet 4.x / Sun 6.x style)
     AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h])
@@ -36,3 +38,3 @@
   PHP_BUILD_THREAD_SAFE
-  AC_DEFINE(HAVE_NSAPI,1,[Whether you have a Netscape/iPlanet/SunONE Server])
+  AC_DEFINE(HAVE_NSAPI,1,[Whether you have a Netscape/iPlanet/Sun server])
   PHP_SELECT_SAPI(nsapi, shared, nsapi.c)

The critical change is to define NSAPI_INC_DIR.

The message changes are cosmetic and reflect that Sun Java System Web Server 7.0 is now supported.
 [2006-10-26 09:48 UTC] thetaphi@php.net
I will look for it and include the configure changes into PHP. I missed the bug because it was assigned to compile failure not iPlanet (we should change this bug category to something more modern).
At this time I do not have a Sun 7 server running, so I will have to install one first.
Another thing is 64 bit compatibility that I want to test.
 [2006-10-27 08:50 UTC] thetaphi@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

I get rid of the weired variable names in config.m4 and made the creation of the NSAPI_INCLUDE variable more clear. The problem was that the -I was missing when having the 3.x/7.0 style.
It is fixed in 5_2 and HEAD. Please try the latest 5.2 snapshot! I hope that the fix is in PHP 5.2.0 final, so we could say, that PHP 5.2 is compatible with Sun 7.0 webserver.
Not tested until now is compiling with an 64bit variant of the webserver. Please test this and tell me the needed CFLAGS and modifications.
I will install SJSWS 7.0 when I have time and test 64bit and will possibly announce full suport from PHP 5.2.1 on...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC