Bad gateway error on both of those.
What exactly is your problem?
You've stated that your sessions are not saving and that you're using phpmyadmin and cakephp.
You've not stated any error messages. You've not shown your php.ini file. You've not shown your sessions save path setting (just commented on it) and you've not shown any basic php code to test your sessions either.
What is the issue and what have you done to test it?
What are you using? Wamp, mamp, lamp? Did you install apache, mysql and php manually with a manual config?