/* $Id$ */
+/* conflict between PHP and aolserver */
+#define Debug php_Debug
#include "php.h"
+#undef Debug
#ifdef HAVE_AOLSERVER
#include "SAPI.h"
#include "main.h"
-/* conflict between PHP and aolserver */
-#define Debug DEBUG_UNUSED
#include "ns.h"
-#undef Debug
#include "php_version.h"
-#if 0
-#define HERE \
- Ns_Log(Notice, "in %s:%d", __FUNCTION__, __LINE__);
-#else
-#define HERE
-#endif
-
int Ns_ModuleVersion = 1;
typedef struct {
php_ns_context *ctx;
SLS_FETCH();
- HERE;
ctx = (php_ns_context *) SG(server_context);
Ns_DStringInit(&dstr);
static char *
php_ns_sapi_read_cookies(SLS_D)
{
- HERE;
- return NULL;
+ Ns_Set *headers;
+ char *http_cookie;
+ php_ns_context *ctx = (php_ns_context *) SG(server_context);
+
+ headers = Ns_ConnHeaders(conn);
+
+ if(headers) {
+ http_cookie = Ns_SetGet(headers, "HTTP_COOKIE");
+ }
+
+ return http_cookie;
}
static sapi_module_struct sapi_module = {
ELS_FETCH();
PLS_FETCH();
- HERE;
-
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.filename = SG(request_info).path_translated;
char *server;
Ns_DString ds;
char *root;
- HERE;
server = Ns_ConnServer(ctx->conn);
static void
php_ns_request_dtor(php_ns_context *ctx SLS_DC)
{
- HERE;
-
free(SG(request_info).path_translated);
Ns_DStringFree(&ctx->content_type);
}
int status = NS_OK;
SLS_FETCH();
- HERE;
ctx->conn = conn;
php_ns_request_ctor(ctx SLS_CC);
{
php_ns_context *ctx = (php_ns_context *) context;
- HERE;
ctx->sapi_module->shutdown(ctx->sapi_module);
sapi_shutdown();
tsrm_shutdown();
free(ctx);
}
-
int Ns_ModuleInit(char *server, char *module)
{
php_ns_context *ctx;