[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Sessions in php4 broken?



I have two near-identical apache/php installations. On my ibook sessions
don't work while that on my intel server do. Both are running testing.

Details:

I am trying to get sessions working on Linux, Apache 1.3.26 and PHP
4.1.2 (Debian testing).

<?php
   $page=$_COOKIE['hits'];
   setcookie('hits', ++$page);
   echo $page;
?>

works as expected. However

<?php
   session_start();
   session_register('hits');
   ++$hits;
   echo $hits;
?>

simply produces the number 1 after reloading the page several times.
The session_id() function registers a valid session code (I can find
the session file in my /tmp directory). Playing with $_SESSION and
$HTTP_SESSION_VARS does not solve the problem.

---------------------------------------------------------------------------
phpinfo() output (top part).

PHP Logo                                                                             
                                                                                     
PHP Version 4.1.2                                                                    


System        Linux voltaire 2.4.19-powerpc-smp #1 SMP Fri Aug 16 12:03:27 EDT 2002  
              ppc unknown                                                            
                                                                                     
Build Date    Sep 13 2002                                                            
                                                                                     
Configure      '../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs'            
Command       '--with-regex=php' '--with-config-file-path=/etc/php4/apache'          
              '--disable-rpath' '--disable-debug' '--enable-memory-limit'            
              '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm'              
              '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath'           
              '--with-bz2' '--enable-ctype' '--with-db2' '--with-iconv' '--with-ndbm'
              '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext'     
              '--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop'          
              '--enable-sockets' '--enable-wddx' '--with-xml=/usr' '--with-expat-dir=
              /usr' '--enable-yp' '--with-zlib' '--without-pgsql' '--disable-static' 
              '--with-layout=GNU' '--with-curl=shared,/usr' '--with-dom=shared,/usr' 
              '--with-zlib-dir=/usr' '--with-gd=shared,/usr' '--with-jpeg-dir=shared,
              /usr' '--with-xpm-dir=shared,/usr/X11R6' '--with-png-dir=shared,/usr'  
              '--with-freetype-dir=shared,/usr' '--with-imap=shared,/usr'            
              '--with-ldap=shared,/usr' '--with-mcal=shared,/usr' '--with-mhash=     
              shared,/usr' '--with-mm' '--with-mysql=shared,/usr' '--with-unixODBC=  
              shared,/usr' '--with-recode=shared,/usr' '--enable-xslt'               
              '--with-xslt-sablot=shared,/usr' '--with-snmp=shared'                  
              '--enable-ucd-snmp-hack' '--with-sybase-ct=shared,/usr' '--with-ttf=   
              shared,/usr' '--with-t1lib=shared,/usr'                                
                                                                                     
Server API    Apache                                                                 
                                                                                     
Virtual       disabled                                                               
Directory                                                                            
Support                                                                              
                                                                                     
Configuration /etc/php4/apache/php.ini                                               
File                                                                                 
(php.ini)                                                                            
Path                                                                                 
                                                                                     

-- 
Rory Campbell-Lange 
<rory@campbell-lange.net>
<www.campbell-lange.net>



Reply to: