По поводу последней проблемы пока ничего не готов сообщить, а для Михаила Григорьева дублирую интересующую его информацию с форума
news://novell.devsup.php от 29 янв. 2003г.:
Anantha Kesari wrote:
uniqid() works now. You could expect that in the March NDK release.
Thanks,
Ananth.
"Paul Jones" <pjones@novell.com> wrote in message
news:O9dY9.695$EM3.14@prv-forum2.provo.novell.com...
> This is a bug. I will report it to the engineers. Setting the second
> parameter to uniqid to 1 will return unique ids.
>
> Paul Jones
> Novell, Inc.
>
www.novell.com
>
>
>
mcu@elthamhs.vic.edu.au wrote:
> > Reading a thread previously on PHPBB2, a number of us have been
> > floundering on trying to use this good open source bulletin board.
> > Critical error: Error creating new session. I have finally got to the
> > cause of the problem - uniqid()not working properly. The fact that it
may
> > not work properly is in the text file accompanying the Netware version
of
> > PHP I have that goes with Apache 1.3
> >
> > If in PHPBB2 you turn on debug (in includes/constants.php) you get a
more
> > detailed error message refering to duplicates in an index in
> > phpbb_sessions table.
> >
> > It seems this line '$session_id = md5(uniqid($user_ip));' (from
> > includes/sessions.php) does not create a unique identifier for the
session
> > if coming from the same IP address. I used phpMyAdmin to empty this
table
> > and saved a no change edit of the corrupted index to fix the index. My
fix
> > for session ID was to change it to '$session_id =
md5(uniqid(rand(),1));'
> >
> > Given that phpbb_sessions table is a heap table, maybe restarting MySQL
> > may also have cleaned up the table.
> >
> > Apparently uniqid() is meant to be based on microseconds from the clock
> > and the string passed should make it unique if happens at the same
> > microsecond. It seems here that if the string is the same then it
> > generates the same result all the time. md5 converts to a 32 byte hash.
>