[PHP-DB] independent session data for multiple browser windows
Greetings, I have a nearly-completed accounts/billing database using PHP and MySQL, and was just informed that users will want to access the database via multiple windows in one browser on the same machine, so I'm looking for a way to have each browser window have its own set of session data. I was initially using cookies, so I switched to propagating the session name via the URL, and had each window using a unique session name, but the DATA from each named session was written to the same file on disk (/private/var/tmp/whatever). I noticed that the session data file name included the session id, so I tried propagating the session id in the URL, and setting the session id right before session_start() -- that resulted in two data files on disk, but one session would occasionally write to the other session's data file. At this point, this is the code I'm trying: if (!array_key_exists('SESSION_ID', $_REQUEST)) { $_REQUEST['SESSION_ID'] = 'SESS'.uniqid(''); } session_name($_REQUEST['SESSION_ID']); session_id($_REQUEST['SESSION_ID']); session_start(); output_add_rewrite_var('SESSION_ID',$_REQUEST['SESSION_ID']); In php.ini, I now have: session.use_cookies = 0 session.use_only_cookies = 0 session.auto_start = 0 Also, I'm on Mac OS X Tiger, and everyone's using Safari. PHP 5.0.24a, MySQL 4.1.22 Any suggestions on how to have unique session data for multiple windows in the same browser on the same machine? Seems like it must be doable, but I haven't figured it out yet. Thanks to whomever can help. Charles Whitaker Technical Staff Open Door Networks
RE: [PHP-DB] independent session data for multiple browser windows
That just sounds like such recipe for disaster. What about running multiple divs with each data set in that 'window'? Then you could pass each datasets relevant ids along to keep thing separate... Another option could to create multiple [i]frames and do the same thing? Bastien To: php-db@lists.php.net From: [EMAIL PROTECTED] Date: Fri, 15 Feb 2008 15:00:36 -0800 Subject: [PHP-DB] independent session data for multiple browser windows Greetings, I have a nearly-completed accounts/billing database using PHP and MySQL, and was just informed that users will want to access the database via multiple windows in one browser on the same machine, so I'm looking for a way to have each browser window have its own set of session data. I was initially using cookies, so I switched to propagating the session name via the URL, and had each window using a unique session name, but the DATA from each named session was written to the same file on disk (/private/var/tmp/whatever). I noticed that the session data file name included the session id, so I tried propagating the session id in the URL, and setting the session id right before session_start() -- that resulted in two data files on disk, but one session would occasionally write to the other session's data file. At this point, this is the code I'm trying: if (!array_key_exists('SESSION_ID', $_REQUEST)) { $_REQUEST['SESSION_ID'] = 'SESS'.uniqid(''); } session_name($_REQUEST['SESSION_ID']); session_id($_REQUEST['SESSION_ID']); session_start(); output_add_rewrite_var('SESSION_ID',$_REQUEST['SESSION_ID']); In php.ini, I now have: session.use_cookies = 0 session.use_only_cookies = 0 session.auto_start = 0 Also, I'm on Mac OS X Tiger, and everyone's using Safari. PHP 5.0.24a, MySQL 4.1.22 Any suggestions on how to have unique session data for multiple windows in the same browser on the same machine? Seems like it must be doable, but I haven't figured it out yet. Thanks to whomever can help. Charles Whitaker Technical Staff Open Door Networks _
[PHP-DB] Importing CSV files to MySql Db issue.
Is there something that has changed in the new MySql DB ? I am trying to upload a data like this from my CSV file to a table through CSV upload and not CSV Load Data: field1,field2,field3,field4,field5,field,6,field7,field8 field1,field2,field3,field4,field5,field,6,field7,field8 Parameters I am using are: Fields Terminated By: , Fields Enclosed By: _ (space character) Fields Escaped By: _ (space character) Every time I am getting this error: Invalid field count in line 1 Is there any other workaround for this. Please suggest, Thanks, Chris -- View this message in context: http://www.nabble.com/Importing-CSV-files-to-MySql-Db-issue.-tp15514806p15514806.html Sent from the Php - Database mailing list archive at Nabble.com. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php