[PHP] Re: Turning serialize data into an array
Looks like your serialized data isn't right. I added two curly brackets }} to the end, and unserialized the string with no problems. Richard Kurth [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How can I get the data out of this string that has been serialize I need to get it into an array so I can access the data with something like $testdata[1] I have tried $testdata= unserialize($testdata); also $sst= base64_encode(serialize($testdata)); $testdata1= unserialize(base64_decode($sst)); I ether get an error bool(false) or the same data back. I do not have control of the script that serializes it $testdata='a:17:{s:11:event_start;s:4:2230;s:9:event_end;s:4:2300;s: 14:start_unixtime;i:1173076200;s:12:end_unixtime;i:1173078000;s:10:even t_text;s:37:Call+NANCYADKINS+-+%28276%29+681-6548;s:12:event_length;i:1 800;s:13:event_overlap;i:0;s:11:description;s:17:This+is+test+Data;s:6 :status;s:0:;s:5:class;s:7:CONTACT;s:9:spans_day;b:0;s:8:location ;s:0:;s:9:organizer;s:6:a:0:{};s:8:attendee;s:6:a:0:{};s:9:calnu mber;i:1;s:7:calname;s:5:admin;s:3:url;s:0:'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Turning serialize data into an array
btw, the code: $testdata='a:17:{s:11:event_start;s:4:2230;s:9:event_end;s:4:2300;s:14:start_unixtime;i:1173076200;s:12:end_unixtime;i:1173078000;s:10:event_text;s:37:Call+NANCYADKINS+-+%28276%29+681-6548;s:12:event_length;i:1800;s:13:event_overlap;i:0;s:11:description;s:17:This+is+test+Data;s:6:status;s:0:;s:5:class;s:7:CONTACT;s:9:spans_day;b:0;s:8:location;s:0:;s:9:organizer;s:6:a:0:{};s:8:attendee;s:6:a:0:{};s:9:calnumber;i:1;s:7:calname;s:5:admin;s:3:url;s:0:}}'; $testdata = unserialize($testdata); print_r($testdata); Richard Kurth [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How can I get the data out of this string that has been serialize I need to get it into an array so I can access the data with something like $testdata[1] I have tried $testdata= unserialize($testdata); also $sst= base64_encode(serialize($testdata)); $testdata1= unserialize(base64_decode($sst)); I ether get an error bool(false) or the same data back. I do not have control of the script that serializes it $testdata='a:17:{s:11:event_start;s:4:2230;s:9:event_end;s:4:2300;s: 14:start_unixtime;i:1173076200;s:12:end_unixtime;i:1173078000;s:10:even t_text;s:37:Call+NANCYADKINS+-+%28276%29+681-6548;s:12:event_length;i:1 800;s:13:event_overlap;i:0;s:11:description;s:17:This+is+test+Data;s:6 :status;s:0:;s:5:class;s:7:CONTACT;s:9:spans_day;b:0;s:8:location ;s:0:;s:9:organizer;s:6:a:0:{};s:8:attendee;s:6:a:0:{};s:9:calnu mber;i:1;s:7:calname;s:5:admin;s:3:url;s:0:'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_Start() error
Also make sure you don't have empty lines before the ?php or ? tags Helder Lopes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] *hi people, Hi have this error in the session cookie, how to solve this??? Warning*: session_start() [function.session-starthttp://localhost/function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\PHP\xampp\htdocs\index.php:10) in *D:\PHP\xampp\htdocs\verifica.php* on line *3* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session Problem
Also, make sure the session's are being saved properly. I had this same problem when PHP wasn't able to write to the temp directory. You can set up your own sessions dir with session.save_path in php.ini LoneWolf [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am having a problem where it appears that the session is not being saved properly. While on a page, I can start a session and set variables to it. however, when I go to the next page.. the session variables appear to have been cleared out. first page: session_start(); $_SESSION[user_level] = test; second page: session_start(); echo $_SESSION[user_level] ; We just installed php on the 2003 server. Is there maybe a problem with the php.ini file that I need to fix? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php