July 29, 200421 yr I have been experimenting with the sample files from Chapter 8 of the Bowers/Lane book, in particular the "Dog Walk" set. I am interesting in storing sessions in a database as the authors do there. All is well. However, there is a peculiar error message that appears when the session record is first created at login. It reads as follows... "Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0" I suspect that the problem involves the "global" call in three of the session_handler.php file's functions. I learned from the PHP site that as of PHP 4.1.0 the global call is no longer necessary. I run PHP 4.3.2. I'll bet the session_handler file pre-dates this version. I have register_globals disabled in php.ini. What's my best route here? Should I... 1) enable register globals (and are there any security considerations here)? 2) instruct the error message not to appear as described in the message? 3) adjust the session_handler file somehow to remove the "global" references, substituting something else as the "source of data"? I have exhausted my reference materials here and hope you can give me push. With gratitude, DSW
July 29, 200421 yr DSW, I was also looking for the same type of user and session management for one of my solutions. I tore into the examples from Bower's book and had issues with attempting to get the examples to function properly. Eventually, I called Bob Bowers at The Moyer Group and explained the errors I was getting from PHP when attempting to use his example. No help there. He said he'd have someone look at it, but never called back. I am running php 4.1.2 and Apache (RedHat Linux 7.3). One of the things I DID was set the "register_globals = On" I can't remember if that is what fixed my problem, but I eventually got it working with my own solution. Some other settings from my php.ini file are: max_execution_time = 30 memory_limit = 8M error_reporting = E_ALL & ~E_NOTICE display_errors = Off display_startup_errors = Off log_errors = On error_log = syslog track_errors = Off warn_plus_overloading = Off variables_order = "EGPCS" register_globals = On register_argc_argv = On post_max_size =8M - - - - - - - - Hope some of this helps. regards... Bob Minteer
July 30, 200421 yr Author Dear Bob, Thanks very much. I'll look this over. In the iterim, I set up my own FMP file called sessions.fp5, and I was able to duplicate all of the session activities using the commands I know. Pretty cool, actually. Good luck with your projects. I'll look for your name here again. Dave
Create an account or sign in to comment