# Custom Authentication System Issues & Solutions Documentation ## Issue #1: Cookie Not Being Set Properly **Problem:** The setcookie() function was using incorrect parameter syntax, causing authentication cookies to fail silently. **Root Cause:** The setcookie() call in CustomAuth.php was using 7 parameters but with incorrect syntax - the domain parameter was being passed as an empty string instead of being omitted or set properly. **Solution:** Fixed the setcookie() call in the login() method: