Re: [PHP4BETA] sessions via mm?

From: Date: Thu, 16 Mar 2000 13:23:55 +0000
Subject: Re: [PHP4BETA] sessions via mm?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-12233@lists.php.net to get a copy of this message
On Thu, 16 Mar 2000, you wrote: >Howdy, > I'm playing with sessions in php4 to see how stable they are, and am >trying to get sessions via mm working, but I can't seem to get it to work, >but I'm not getting errors. I have set my php.ini to > >[Session] >session.save_handler = mm ; handler used to store/retrieve data >session.save_path = /tmp ; argument passed to save_handler > ; in the case of files, this is the > ; path where data files are stored >session.use_cookies = 1 ; whether to use cookies >session.name = PHPSESSID ; name of the session > ; is used as cookie name >session.auto_start = 0 ; initialize session on request startup >session.cookie_lifetime = 0 ; lifetime in seconds of cookie > ; or if 0, until browser is restarted >session.cookie_path = / ; the path the cookie is valid for >session.cookie_domain = ; the domain the cookie is valid for >session.serialize_handler = wddx ; handler used to serialize data > ; php is the standard serializer of PHP >session.gc_probability = 1 ; percentual probability that the > ; 'garbage collection' process is started > ; on every session initialization >session.gc_maxlifetime = 1440 ; after this number of seconds, stored > ; data will be seen as 'garbage' and > ; cleaned up by the gc process >session.referer_check = ; check HTTP Referer to invalidate > ; externally stored URLs containing ids >session.entropy_length = 0 ; how many bytes to read from the file >; session.entropy_file = ; specified here to create the session id ; >session.entropy_length = 16 >session.entropy_file = /dev/urandom >session.cache_limiter = nocache ; set to {nocache,private,public} to > ; determine HTTP caching aspects >session.cache_expire = 180 ; document expires after n minutes > >my config is > >./configure \ > --with-mysql \ > --with-oci8=$ORACLE_HOME \ > --with-apache=$RC_PROJ_ROOT/apache_1.3.12 \ > --with-ftp \ > --with-gd \ > --enable-xml \ > --enable-wddx \ > --enable-sysvshm \ > --enable-sysvsem \ > --enable-inline-optimization \ > --with-zlib \ > --enable-track-vars \ > --enable-magic-quotes \ > --disable-debug > > >Is there something that I'm missing? > >My simple test.php scrip looks like > ><? > session_start(); > if (!isset($ass)) > { > session_register("ass"); > $ass = 0; > } > else $ass++; >?> ><html> ><? echo "ass = $ass<br>\n"; ?> ></html> > > >the output is always >ass = 0; > >I have cookies turned on, and I'm not getting a session cookie using mm. >If I switch to save_handler = files it works fine. I've tried with the >wddx and php serialize_handler to no avail with the mm modules. >this is running on a linux box with apache 1.3.12 on Mandrake 7.0 > > >Thanks for the help >Walt > Hi Walt, first up you'll want to enable mm suport in your configure ( something like --enable-mm ? ), then before executing make you need to add a line to internal_functions.c as part of the php_builtin_extentions array ( your exact contents may vary to mine ); zend_module_entry *php_builtin_extensions[] = { phpext_xml_ptr, phpext_sysvshm_ptr, phpext_sysvsem_ptr, phpext_standard_ptr, phpext_session_ptr, phpext_ps_mm_ptr, <--- add this line phpext_ps_mysql_ptr, phpext_posix_ptr, phpext_pcre_ptr, phpext_mysql_ptr, phpext_gd_ptr, phpext_db_ptr, phpext_bcmath_ptr, }; then run make etc; BTW is there likely to be a change to the way the phpext_*_ptr are added. At the moment the pointers are added based on the php4/ext/module_name directory structure, but this doesnt work for the extra session handling modules as they are currently stuffed into the php4/etx/session directory. -- Regards, Alan van den Bosch Sanguis Pty Ltd /* All generalizations are false. */

« previous php.version4 (#12233) next »