I replicated a current and effectively running site to a different development server.

The login around the new server has become damaged, and that i monitored it lower that even though session cookie is re-named ...

ini_set('session.name', 'DOMAIN1');

... the browser keeps storing the sesssion cookie as PHPSESSID.

After I take away the above line in the application around the new server, the login works again. But this isn't a great choice, because another application also uses PHPSESSID under this title.

And That I would rather find the reason behind the strange behavior rather than utilizing a workaround. Basically don't repair it it might bite me elsewhere.

Maybe this really is already enough information for somebody to provide us a hint. Otherwise, what information could be helpful?

This machine would be a very naked and fundamental ubuntu 8.04 server, and that i installed apache2, mysql and php5 with aptitude. I additionally up-to-date lokales and also the timezone.

Solution:

I changed the road above with this particular code from in the recognized answer ...

if(ini_set('session.name', 'DOMAIN1') === false || !session_name('DOMAIN1'))
{
    die('Unable to set sesssion scope');
}

... and also the login now creates the brand new server.

Sometimes ini_set plays up and it is not able to create the ini values properly, may be lower to permissions.

the below doesn't fully resolve the problem with ini_set, and when anybody knows the main reason(s) why ini_set doesn't work on some type's of host, then please share!

Try the next:

<?
if(ini_set('session.name', 'DOMAIN1') === false || !session_name('DOMAIN1'))
{
    die('Unable to set sesssion scope');
}

phpinfo();
?>

alternatively you can easily use session_name() to create it, and ill always counsel you to not just run functions and hope the check the within an if statement and get ready for the worst situation scenario, thats whenever your application becomes reliable and fewer error_prone.