Reply to Format of session id and $_SERVER['REMOTE_ADDR']

Your name:

Reply:


Posted by Markus on 02/02/07 12:08

Hi

In cases where I need to store the session id and/or the remote host in
a database I used to choose tinytext fields so far. Anyway the usual
values for session ids are of 32 characters length, and IP addresses not
longer than 15 characters - so using char(32) resp. char(15) would
actually improve the database performance. But I did not find
informations whether this is safe or not.

So my questions are:
- Is a PHP session id always 32 characters long (if it is generated
normally with session_start() of course), or can it's format vary due to
PHP versions or configurations (I work in shared hosting envirnoments)?
- Can I safely expect $_SERVER['REMOTE_ADDR'] to deliver an IP address
of the format xxx.xxx.xxx.xxx, or can this also be an IPV6 address or other?

Thanks for a clarification!
Markus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация