cvs: php4 /ext/midgard README.session config.m4.session session.modules.c

From: Date: Thu, 08 Mar 2001 10:39:32 +0000
Subject: cvs: php4 /ext/midgard README.session config.m4.session session.modules.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4437@lists.php.net to get a copy of this message
davidg Thu Mar 8 02:39:32 2001 EDT Added files: /php4/ext/midgard session.modules.c README.session config.m4.session Log: More on session installation. Index: php4/ext/midgard/session.modules.c +++ php4/ext/midgard/session.modules.c /* * To add a PHP session module, #include its header file and * add a ps_xxx_ptr in the struct... */ #include "mod_files.h" #include "mod_mm.h" #include "mod_user.h" #if HAVE_MIDGARD_SESSION #include "../midgard/mgd_session.h" #endif static ps_module *ps_modules[] = { ps_files_ptr, ps_mm_ptr, ps_user_ptr, #if HAVE_MIDGARD_SESSION ps_midgard_ptr, #endif }; Index: php4/ext/midgard/README.session +++ php4/ext/midgard/README.session To enable the session management: - add session.c in the Makefile.in to the LTLIBRARY_SOURCES: LTLIBRARY_SOURCES = mgd_errno.c midgard.c article.c \ parameter.c attachment.c oop.c \ topic.c element.c mail.c \ group.c file.c host.c image.c member.c \ calendar.c event.c eventmember.c page.c \ pageelement.c pagelink.c person.c \ preferences.c snippet.c \ snippetdir.c style.c sitegroup.c \ preparser-parser.c preparser-scanner.c \ preparser.c session.c - copy config.m4.session over config.m4 - copy session.modules.c over ext/session/modules.c Then run: $ phpize $ ./configure --with-midgard[=/path/to/midgard] --enable-mgd-session $ make # make install Then edit your php.ini: session.save_handler = midgard session.auto_start = 0 Restart apache. To test it, insert in a Midgard page the following code: ------------------8<---------------------------------- <?php session_register ("count"); $count++; ?> Hello visitor, you have seen this page &(count); times.<p> <php? # the <?=SID?> is necessary to preserve the session id # in the case that the user has disabled cookies ?> To continue, <A HREF="&(midgard.uri);?<?=SID?>">click here</A> ------------------8<---------------------------------- Index: php4/ext/midgard/config.m4.session +++ php4/ext/midgard/config.m4.session dnl $Id: config.m4.session,v 1.1 2001/03/08 10:39:31 davidg Exp $ dnl Copyright (C) 1999 Jukka Zitting <jukka.zitting@iki.fi> dnl Copyright (C) 2000 The Midgard Project ry dnl Copyright (C) 2000 Emile Heyns, Aurora SA <emile@iris-advies.com> dnl dnl This program is free software; you can redistribute it and/or modify it dnl under the terms of the GNU Lesser General Public License as published dnl by the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA AC_PROG_YACC AC_DECL_YYTEXT AC_PROG_LEX PHP_ARG_WITH(midgard, for midgard support, [ --with-midgard Include midgard 1.4 support]) if test "$PHP_MIDGARD" != "no"; then if test "$PHP_MIDGARD" != "yes"; then AC_ADD_LIBRARY_WITH_PATH(midgard, "$PHP_MIDGARD/lib", MIDGARD_SHARED_LIBADD) AC_ADD_INCLUDE("$PHP_MIDGARD/include") else AC_ADD_LIBRARY(midgard) fi AC_DEFINE(HAVE_MIDGARD, 1, [ ]) PHP_EXTENSION(midgard, $ext_shared) dnl EEH/TODO: Add checks for apache-static compilation AC_PATH_PROG(APXS, apxs) if test -z $APXS; then AC_MSG_ERROR(apxs not found.) fi APACHE_INCLUDES=$APXS -q INCLUDEDIR AC_ADD_INCLUDE($APACHE_INCLUDES) AC_PATH_PROG(GLIBCONFIG, glib-config) dnl Ackackack... why do people do this? if test -z $GLIBCONFIG; then AC_PATH_PROG(GLIBCONFIG, glib12-config) fi if test -z $GLIBCONFIG; then AC_MSG_ERROR(glib-config not found. Did you install glib?) fi CFLAGS="$CFLAGS "$GLIBCONFIG --cflags LIBS="$LIBS "$GLIBCONFIG --libs LFLAGS="$LFLAGS -Pmgd -olex.yy.c" PHP_SUBST(GLIBCONFIG) AC_MSG_CHECKING(for midgard experimental functions support) AC_ARG_ENABLE(mgd-experimental, [ --enable-mgd-experimental Enable midgard 1.4.1 experimental functions support], PHP_MIDGARD_EXPERIMENTAL=[$]enableval, PHP_MIDGARD_EXPERIMENTAL="no") echo "$PHP_MIDGARD_EXPERIMENTAL"; if test "$PHP_MIDGARD_EXPERIMENTAL" != "no"; then AC_DEFINE(YOU_WANT_TO_TEST, 1, [ ]) fi AC_MSG_CHECKING(for midgard [experimental] session support) AC_ARG_ENABLE(mgd-session, [ --enable-mgd-session Enable midgard 1.4.1 [experimental] session support], PHP_MIDGARD_SESSION=[$]enableval, PHP_MIDGARD_SESSION="no") echo "$PHP_MIDGARD_SESSION"; if test "$PHP_MIDGARD_SESSION" != "no"; then AC_DEFINE(HAVE_MIDGARD_SESSION, 1, [ ]) fi fi

« previous php.cvs (#4437) next »