Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Samuel Harrison
3,484 PointsMAMP Session Already started.
Hi There,
I really love the idea of MAMP as its got a nice development Environment and its local to your machine. I absolutely hate it how it reacts slightly different to a hosting server.
e.g. It never used to display errors (Changed php.ini file to fix) PHP Redirects didn't work (Changed php.ini file to fix)
This latest one is really bugging me:
Notice: A session had already been started - ignoring session_start() in /Users/thebegerks/Desktop/DESIGN WORK/Clients/Web Devlopment/wwwroot/PHP/DJRequests/admin/functions.php on line 2
Why can't I just not get these messages and it comes out of the box set up correctly?
session_start();
$_SESSION['username'] = isset($_SESSION['username']) ? $_SESSION['username'] : false;
$_SESSION['id'] = isset($_SESSION['id']) ? $_SESSION['id'] : false;
$_SESSION['nickname'] = isset($_SESSION['nickname']) ? $_SESSION['nickname'] : false;
$_SESSION['rank'] = isset($_SESSION['rank']) ? $_SESSION['rank'] : false;
That is code I have on the pages that require Sessions ect...