the use of session is not correct. :( if u use > php 4.1x .. as u do... u got to follow new standard.
(see below) 乌有 无 wrote: > Hello: > I want your help! > The session sometime works well,sometime works badly! > It creates new empty file in /tmp.I also find this problem > with apache1.3.12&php4.1.1&sybase11.9.2&linux > My php.ini is fault > my server config: > php4.3.3 > httpd2.0.44 > linux 9 > sybase-11.9.2 > tar-vzxf php-4.3.3.tar.gz > ./configure ?with-apxs2=/home/apache/bin/apxs > ?with-sybase-ct=/opt/Sybase-11.9.2 ?enable-ftp ?enable-track-vars > ?disable-cli > make > make install > cp php.ini-dist /usr/local/lib/php.ini > > > Thanks a lot > > Reproduce code: > --------------- > login.php: > $user_array=sybase_fetch_row($result); > session_start(); > session_register("user_array"); $_SESSION["yoursession"] = $yourvars; > ... > index.php: > session_start(); > $user_name=$user_array[1]; what's your intension here? do u want to validate whether a user is logged in or not. then do this way. if (isset($_SESSION{"yoursession"])) { echo "you are a user"; } else { echo "plz login !!!"; } :) > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php