Date: 01/05/01
- Next message: anonymous <email protected>: "[PHP-DEV] CVS Account Request"
- Previous message: David Clark: "[PHP-DEV] PHP4.0 Bug 8551"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Cc to php-dev -list just in case there's someone more familiar with NSAPI]
Now that you got it compiled and running, could you make a simple test,
please? This is regarding
http://bugs.php.net/bugs.php?id=7163
The bug report is about includes, but I've got similar weird error messages
when requesting a missing file. I think the problem is that NES/iPlanet
doesn't check if the requested file exists. When you make a request, NES
just forwards the request to the php module. That's why you get 'in Unknown
at line 0.'
-- Warning: Failed opening '/export/home/www/azc/htdocs/class/emp/searchresults.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0 --I made the following changes to php4_execute in nsapi.c, all suggestions are welcome:
-- int NSAPI_PUBLIC php4_execute(pblock *pb, Session *sn, Request *rq) { int retval; nsapi_request_context *request_context;
+ struct stat *statinfo = request_stat_path(NULL, rq); + char *path = pblock_findval("path", rq->vars);
SLS_FETCH();
+ /* check that the requested file exists or return Not Found */ + if (statinfo == NULL) { + log_error(LOG_WARN, "php-execute", sn, rq, + "Could not open file: %s (%s)", path, system_errmsg()); + protocol_status(sn, rq, PROTOCOL_NOT_FOUND, NULL); + return REQ_ABORTED; + }
request_context = (nsapi_request_context ... --
There's yet another problem. If you intend to use software virtual servers, you may get some weird "Not Found" errors. nsapi_request_ctor uses request_translate_uri to get the path to the requested file. The correct path can already be found in rq -parameter block (that is, it has been translated according to all the NameTrans directives in obj.conf). It seems that if you make a new translation at this point, it doesn't handle those directives correctly and uses that NES-instance's main document root.
You need to use char *path_translated = pblock_findval("path", NSG(rq)->vars);
instead of char *path_translated = NULL; ... if (uri != NULL) path_translated = request_translate_uri(uri, NSG(sn));
--
> -----Original Message----- > From: lundqv <email protected> [mailto:lundqv <email protected>] > Sent: 5. tammikuuta 2001 11:20 > To: aki.hakkila <email protected> > Subject: Re: [PHP] PHP / NSAPI / Web server support > > > Wonderful, thanks for that! > > /Danne > > Aki Hakkila wrote: > > If you get something like this: > > -- > > Making all in Zend > > make[1]: Entering directory `/tmp/php-4.0.3pl1/Zend' > > /bin/sh ../libtool --silent --mode=compile c++ -DHAVE_CONFIG_H > -I. -I. -I.. > > -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS > -D_REENTRANT -I../TSRM > > -g -O2 -pthreads -c > > zend-scanner-cc.cc > > In file included from zend-scanner-cc.cc:2570: > > zend_operators.h: In function `int is_numeric_string(char *, > int, long int > > *, double *)': > > zend_operators.h:83: implicit declaration of function `int finite(...)' > > make[1]: *** [zend-scanner-cc.lo] Error 1 > > make[1]: Leaving directory `/tmp/php-4.0.3pl1/Zend' > > make: *** [all-recursive] Error 1 > > -- > > > > You can fix it with adding to php_config.h: > > #define HAVE_IEEEFP_H > > > > Here's the bug report: > > http://bugs.php.net/bugs.php?id=7286 > > > > > >> -----Original Message----- > >> From: lundqv <email protected> [mailto:lundqv <email protected>] > >> Sent: 5. tammikuuta 2001 11:07 > >> To: jmoore <email protected> > >> Cc: php-general <email protected> > >> Subject: Re: [PHP] PHP / NSAPI / Web server support > >> > >> > >> Hi, > >> > >> I'm sorry but I should've been more precise. Currently > >> you cannot build php with nsapi-support on Solaris > >> which is the platform in use here. At least I cannot > >> build it. The error is the following if your interested. > >> > >> In file included from zend_language_scanner_cc.cc:2571: > >> zend_operators.h: In function `int is_numeric_string(char *, int, long > >> int *, double *)': > >> zend_operators.h:84: implicit declaration of function `int finite(...)' > >> > >> Thanks anyway. > >> Danne Lundqvist (dotvoid) > >> www.dotvoid.com > >> > >> > >> > >>> > >>>> -----Original Message----- > >>>> From: Danne Lundqvist [mailto:lundqv <email protected>] > >>>> Sent: 04 January 2001 16:24 > >>>> To: php-general > >>>> Subject: [PHP] PHP / NSAPI / Web server support > >>>> I must say that php is a great language/tool to > >>>> use for a huge variety of tasks. But I wonder > >>>> why there is no support for running php under > >>>> Netscape Enterprise Server (NES) as a NSAPI? > >>>> Ok, the code is there - just not functioning. > >>>> It doesn't even compile. > >>>> Not only does many still use NES, it is also > >>>> mostly larger sites that uses the server. I was > >>>> about to incorporate php in some huge sites but > >>>> with the lack of support for NSAPI, php have to > >>>> be dropped. > >>>> Also, if php is to be taken serious I think that > >>>> the manual should incorporate more accurat > >>>> descriptions of what really work and what's not. > >>>> Regards, > >>>> Danne Lundqvist (dotvoid) > >>>> www.dotvoid.com
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: anonymous <email protected>: "[PHP-DEV] CVS Account Request"
- Previous message: David Clark: "[PHP-DEV] PHP4.0 Bug 8551"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

