Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

$_SESSION variables not working

Featured Replies

I am working on a website developed in PHP to run on a Linux Apache server. After some recent changes my session variables seem to have gone haywire. One of my pages creates a new session and then logs the value of the $_SESSION array using var_dump. Here's the result:

[25-Jun-2021 11:53:00.220 BST 1] on ,  L_TRACE Session ID = 500qbjglhu2vsvupfp5810kmi1, $_SESSION = {"54b4368deba7f09e24d876746ae2b9db3923d76b45e772c946201c80d3b23a289c629d230a0e5493e91a048b1532df4e76cb12ffce6d065e38179519f8f067e9":{"form_security_tokens":{"account_update":{"20210624":[]},
"permalink":{"20210624":{"20210624xM1EM0WHHtO5uMOLzhdWZXl_1yiPnbaw":true, "20210624M9lPBD1YzVXM8KLaM7rwJnkDg9FtzA5f":true, "202106243aJlw_Iy5aYa4CNKcL_Q3MAfWETrYTbv":true,
"20210624PYuE8WhOh11hhby1dWNF_u1T-vUGpybi":true, "20210624_SY8MAmGOE0fqTtaXqCl5fXt4YD9sZZA":true, "20210624YjJitJu-d8mxi2Or7UyPqhlOiBE73kOT":true}},
"manage_proj_update":{"20210624":{"20210624nxz7AccWkafXoNDLOotIzKA2vm9mV6zX":true, "20210624HJk2mTiaA8uWPPrShgfpCDqY86wR4o4L":true, "202106246TiBXRhlFl1vkU_FMXbwTJr5ThV5z0S5":true,
"20210624rFq5H-wyklXbjCTY53qyoof4m_-Z44ti":true}}, "manage_proj_subproj_add":{"20210624":{"20210624efF-zupy7wW5GEJlZEI2gJAKYHtFynWL":true, "20210624ULLEQoUf1J10BUGJL259P1v-2fG20tZ-":true,
"20210624ZDAuSPp9iFSQTifA0oMLkiJEcDvrUbzI":true, "20210624vzS-75bWzKN2JcFLr4GhOwxBV1iwcX2O":true}}, "manage_proj_cat_copy":{"20210624":{"20210624nxfXyJ4QUyXHgkfozskEJO6EP6YHxp2_":true,
"20210624n7ii3c8YZGfdmH5j_NFigU9tPQbG_tVf":true, "20210624QWQmc1ZS6YGe1GnP1u1gOpmAeaYGQNyY":true, "20210624fMn693XyPFPjO5fcrlpsIgWBtiAZhQSX":true}},
"manage_proj_cat_add":{"20210624":{"20210624iOBTNfEg2p56U2Gh6bPPftTh-OndKWBm":true, "20210624o_oFXFi99uPSYWCyHcgNt-UWpbZuRhlL":true, "20210624xa7mW24mM3WI_bzBi_A3ZgJrY31w0pQA":true,
"20210624Kye9oOZtNs6IgtGaOOh58bl6cIjsE-5V":true}}, "manage_proj_ver_copy":{"20210624":{"20210624yCtwU9Eh_Q8evhj0agL2ALBX-Kdq9Y15":true, "20210624G2twCmp8OWYxAc4S6h03wsgBxdSBiaX3":true,
"20210624zk6avEJ39U0Y9Wa7kjNISNEDsmpKurCg":true, "20210624qiAANl5kjuWRaJE5_1sZ7_YZLdX14gTQ":true}}, "manage_proj_ver_add":{"20210624":{"20210624-nqc6IAVlEUacFTAUuIrq6CWefCk9CX0":true,
"20210624ijNhHiwoCkXRGz4nrrlftV0-N5ftdCN3":true, "20210624def0dPDX29RFgnLtARuvTTcN1Yfg5g8w":true, "20210624c5YBW8bEMwaeWojPW2Ld4oVeILvJ2kGY":true}},
"manage_proj_custom_field_copy":{"20210624":{"20210624uAj2gYaBAjf44O9B2z3FSDZuyaaxlrPX":true, "202106244bRi43zT77-iuuYbsnkWTEgD0Pp__tH_":true, "20210624ELSRig10sRK6oZQZQ5j4uY4zW5GPFa15":true,
"20210624Jkb9NwmjtUHF_QH9jId6OZpDlmsQR_Tx":true}}, "manage_proj_custom_field_update":{"20210624":{"20210624uy1f1wWNDxjAASnF_jpfr8HF8S2gtJqZ":true, "202106249RiEAPxF8vnRddfZuE1hpRLXxWQnxgD6":true}},
"manage_proj_custom_field_remove":{"20210624":{"20210624KPTOfkBgo6i9_a3BODrkQFWuCfnU2tmr":true, "20210624tjEFBSAbgYU-YIdW5e2zG1VEpPLYKMKl":true}},
"manage_proj_user_copy":{"20210624":{"20210624oq7p3wPpURu3pV8P7A4pU597B6meZscQ":true, "20210624Hl_UI17X9v67dtx0y65EeOX6MnPAqLHp":true, "20210624IoawzezIskw_akl379LRb287c4daJI91":true,
"20210624-0Un7BjcjUux-jXAtsQER14uHWUf-4Qm":true}}, "manage_proj_user_update":{"20210624":{"20210624wOW4WAlBbmdtXTIk4eSbRe86jzEqaLxs":true, "20210624PyMu5HrLnMv4kPZCn9V6kMdfLSyrEGTE":true,
"20210624NLbcLX1lLr7BGbtsoTDrAkpfnvMkxqUd":true, "20210624Sooy5j82uBSPT3zJhpkQlizQ59r86qlX":true}}, "manage_proj_user_remove":{"20210624":{"20210624EmCq8cpyWkaDc3t8oHybALHC3GHFiB7K":true,
"2021062498fm0EQhCh3Pk2UqBOgbdFLDz1xPuPDF":true, "20210624Nx3_Q8iQbS9ir5mBIRLd135ebsAb3Bh7":true, "20210624JYOgd9KsHTbdapnZjqMJ4WqbK1XJ8Pw2":true}},
"manage_proj_user_add":{"20210624":{"20210624hdZgCQ5e7zV3klU63iptitW_UVNDEjbq":true, "20210624XJFXAa3_t8_dY-cAEZDCY9hG7U7VFdae":true, "20210624sueykQeNx3TLvNQtMUX_vhq2_1eMR8fw":true,
"20210624Vm2b_KeiuKt8c6fh-DtG0_h6hAhAuj1Q":true}}, "manage_proj_custom_field_add_existing":{"20210624":{"20210624Zfs_GoBBDr-8AW0Co_6uEdCKMqskaTkm":true,
"20210624BGzAgv0Pk8XRHCZXCkyRf44gTHGBLA_9":true}}, "bug_report":{"20210624":{"202106244ipSFZyEUEhbs3uqXmSsdF0G-2uppMm7":true}, "20210625":{"202106255ggFqd94_Pbw7xpkNXABmuOGRbaJhqf4":true}},
"bug_update_page":{"20210624":{"20210624V6io-MDvUK9ssjsrHPWQ78SFrQkXwlhc":true, "20210624f7Yi784qQbphDLqrXWtzws73au65zvbl":true, "20210624osexaQETKElgGMRKKlUM7xgQgGUVpFXp":true,
"20210624MCQiRMhDwdAiqfS8Lp-VmSJcs5Vjy4Oc":true}}, "bug_update":{"20210624":{"20210624lrqPrbU_ol0GvDMYqe83qKlvhaq19yEo":true, "20210624el-3pG7G5wgrqexRuD3q70eYJBYLq4nS":true,
"20210624SHvD_fTljhftCaERT8EaWRcNugiHkjXD":true, "20210624nN7wbCgmVsLKXnjBi1LWgvWNsc_xs4yv":true}}, "bug_monitor_add":{"20210624":{"20210624nW2fugQ_mVszNzk4uGg1iu139FebA5Ma":true,
"202106248JuJ0JjVMQdldTKbu-fYNFblU5tnFvL3":true, "20210624LWXcYzzCWBwXxKh-vimr5FitR2ay8nCo":true, "20210624714rz70Eznm_G7KOT9OnoW8IomC_9sXq":true, "20210624CuuP4oe25zOlkKdqSuHyzE-aO81I6o2V":true,
"20210624sWqPsELaRzM3Hby9AZ8TX7BZlEcOE2qn":true, "20210624b-MN0VDt3Oi3ncMW5NYbfga_xP7OuFMI":true, "20210624V1NeI5FmUhrRpE7E8WhYZhdRr0ECbHrq":true}},
"bug_stick":{"20210624":{"20210624Dt3vMbXHZ4P5s70aRfFQv4LILeCKZXiw":true, "20210624jROSXzGJvkJaV6RNJAFiVbS3QZu0Q2Yf":true, "202106240PBIELMS28-DJ3nH9bolbKdOsEd4PI60":true,
"20210624jDRjAPEWXJsYBk7naHodkUff4UsNOuC0":true}}, "bug_report_page":{"20210624":{"20210624tb3bzzh0B90ukvVAXi3pmTNg-uTZQCvv":true, "202106246RGK405w--iYtnkJ-bfXQSBPaXrgU1sT":true,
"20210624pvMrPbu5INJjmbyYOdoqpBAaJkVwQ4gB":true, "20210624OieySVVvkZytQNNt30ivajxNclMDG13i":true}}, "bug_change_status_page":{"20210624":{"20210624rNJ-tZn4goMIqCMgAp333hAD-tM0o68Z":true,
"20210624ijZ_0iYWUuiSRZRpLYWja0hJ3RZK0OUu":true, "20210624AYyZiAa3xA17ShMBuTeyH_dR--IhBFRQ":true, "202106245tNsaVnOc9QrxsvFk3NOtIX00xu-PV-4":true}},
"bug_actiongroup_page":{"20210624":{"20210624PyA-5OyEh9VODubuE3p_uvluA5sTRj0s":true, "20210624vTDVOpfTxCL9I5QMkPI4KQeELAdKYLQZ":true, "20210624c0ndZml_Hqtm99g4TuZjVH5SqqGbMCjd":true,
"202106243Wt_k4Wk_ZJUYS8VA_Be3btlobFfktke":true, "20210624wNXldn4Rck7QE-TMmuLzoZJuMkJx6NcF":true, "20210624-py2FfN9-4I5QybdVUYSkTJLk7QyqP9-":true, "20210624_ROPaWmy6L_re-zjix-1wxAUphG-kMmO":true,
"20210624i9pdsVeviWKGxHSSsNNeM1qKre9udoXu":true}}, "tag_attach":{"20210624":{"20210624tI2mfeoH_XeYVcMB32_QVBuil6gljbU3":true, "20210624EHQKRf1j-PcCARkrNCuOJpvloMMPoRK0":true,
"20210624GJP-wgrjgOuzWdy9JbWdobFm6Ee0k6e7":true, "20210624GZ4wj5IlEwxczV1OXSkMKW6QtgPYu56M":true}}, "bug_relationship_add":{"20210624":{"202106245rEM9z8nWh-Q1xqh_PCFXkh8SX5PRH0l":true,
"20210624Fw5awNOs4F6chraP5eyXy95eWfWa2PLp":true, "20210624Vq6E57QFC0WNGaZbueVHc12s9Uz_tLbV":true, "20210624h92EOfUaAROkEkGKNaTr5b0uI6yiVKVZ":true}},
"bug_file_delete":{"20210624":{"20210624-FGHy5pbXqb11QhSlD-EVHUuH1itzTHq":true}}, "file_show_inline":{"20210624":{"20210624os6ny6dHn8D5YyI0g4wjbvdL_K7uM8HD":true}},
"bugnote_add":{"20210624":{"20210624224tdorca79kVrjJV994cRGisjiG5Eai":true, "20210624nBY25_0lRLJkqI3m9FskiwcyLTJk0vCL":true}},
"bugnote_delete":{"20210624":{"20210624VdaP5twbolVq7m0uZQewsDdSbOUF5vzw":true, "20210624AKZInAJZXScYpoeJzrbpTJ-EX3EZew65":true}},
"bugnote_set_view_state":{"20210624":{"20210624dlTy4NyaWMGwEQiLa5Vn612Ht12UNv5l":true, "20210624mBoeiw49ik4xuSFA7dF8z0PPAmuYHAaw":true}}}, "secure_session":false},
"session_id":"500qbjglhu2vsvupfp5810kmi1", "lasttouch":1624618379, "breadcrumbs":[{"shortname":"Login", "filename":"index.php"}, {"shortname":"EditMember", "filename":"edit_member.php"}],
"request_index":53, "test_mode":0, "current_role":"1", "username_entered":"test.member", "login_member":null, "login_name":"Test Member", "auth_level":3, "Redirected":true,
"redirect_time":1624618379.964, "edit_member_mode":"new_password", "edit_memberid":"136", "formdata":{"MemberId":"136", "FirstName":"Test", "LastName":"Member", "ChoirNum":"0",
"Username":"test.member", "PasswordHash":"$2y$10$kicyiCZTVCjUUy8G\/6fJ2.BokRlOUVwCK6NJP60lE2xKGkKeOJhtG", "Email":"test.member@sylvesterbradley.org", "Address1":"", "Address2":"", "Town":"",
"County":"", "Postcode":"", "Phone":"", "Mobile":"", "Student":"0", "DivisionAbbrev":"B2", "SectionId":"1", "Birthday":943920000, "Joined":943920000, "DefaultRole":"1", "MustChangePW":"0",
"LastChangedPW":1549535706, "PasswordStatus":"2", "CPKey":"8UhlbhWnJ74q3twnREPqyXLFlquqgAAo", "CPExpires":1624625572, "LastTouch":1549536507, "SendReminders":"0", "Status":"1", "ChangedBy":"4",
"ChangedOn":1493461887, "Enabled":"1", "Welcome":0, "OldPassword":"", "NewPassword":"", "ConfirmPassword":""}, "authenticated":"key", "pageerror":"There were errors in the data you entered. Please
correct them and try again.", "fielderrors":{"LastName":"You must provide a last name.", "Email":"You must supply a valid e-mail address.", "NewPassword":"If you wish to change your password,  please
enter your desired new password (twice). If you do <u>not<\/u> wish to change your password,  please leave both boxes empty."}} at line 805 in file: /home/sylvest/include/functions.php
    Called from my_session_start() at line 190 in file /home/sylvest/include/basic_init.php
    Called from require(/home/sylvest/include/basic_init.php) at line 135 in file /home/sylvest/public_html/swchoir/edit_member.php
 

The first variable with the cryptic name makes no sense to me. I am 99.9% certain that I am not creating this session variable. So what is creating it? Where is it coming from? Does it matter?

Thank you - Rowan

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.