This topic is locked

session variables for sub sub folders

2/6/2026 21:05:07
PHPRunner General questions
C
chopperpilot author

I have main application in 3rd to 5th level I have custom files where i am trying add $_SESSION["UserID"] but its not finding my files are deep down here
img alt
Can some one help me how to add this session because it gives this erro
img alt
can someone help pls

C
chopperpilot author 2/6/2026

this is how I am trying to include
<?php
/* Path: active/modules/scheduling/scheduler_view1.php /
@session_start();

// 1. Point specifically to the session folder used by your main site
@session_save_path(dirname(FILE, 4) . "/templates_c");
@session_name("PHPRunner");
@session_start();

// 2. The Sandbox Security Check
if (!isset($_SESSION["UserID"]) || empty($_SESSION["UserID"])) {
echo "<div style='background:#ff7675; color:white; padding:20px; text-align:center; font-family:sans-serif; border:5px solid #d63031;'>";
echo "## ⚠️ Sandbox Security: Session Not Found";
echo "Current Session Status: <b>Disconnected</b>
";
echo "Please ensure you have a logged-in tab open on the main site.";
echo "

<a href='https://popeyes.restaurants4u.ca/login.php' target='_blank' style='background:white; color:#d63031; padding:10px 20px; text-decoration:none; border-radius:5px; font-weight:bold;'>Open Main Login</a>";
echo "</div>";
exit();
}