php-general Digest 20 Mar 2011 18:39:34 -0000 Issue 7235 Topics (messages 311975 through 311976):
Re: PHP session replication 311975 by: Alessandro Ferrucci Problem with PHP 5.3.3 under Debian/Squeeze 311976 by: Michelle Konzack Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net ----------------------------------------------------------------------
--- Begin Message ---Hi Florin, thank you for your write up, actually the main reason why I asked the original question was because I mainly write servlet based webapps currently but I've decided to use PHP for my next project mainly for exploratory reasons. On Sat, Mar 19, 2011 at 10:06 AM, Florin Jurcovici < florin.jurcov...@gmail.com> wrote: > Hi. > > Just for comparison: > > PHP does not provide sessions in the same way a servlet-based platform > provides. PHP actually destroys the in-mem representation of sessions > after each request is served, whereas a servlet-based platform caches > the sessions in mem between requests. > > ASP.Net also serializes session state, but not into a cookie - it uses > a hidden field instead. Which works around cookie size limitation. You > don't even have a choice of database sessions with ASP.Net. OTOH, even > if performance might suffer, scalability, as far as the sessions > mechanism is concerned, is excellent - you don't need session > replication. > > Servlet-based platforms provide the most complicated solution, when > compared to the other two. They keep sessions in mem, which improves > performance (no serialization/deserialization for each request), but > creates potential scalability problems. You won't hit the wall at a > few thousands of users, but replicating maybe a million sessions among > no more than a hundred servers causes the replication process to > consume quite a lot of resources, the resources being used for > replication increasing faster than linearly with each added server > (not quite exponentially, though). You can use sticky sessions with > most servlet-based platforms, but these come with their own problems > (already described by a previous poster). Nevertheless, in mem > sessions a la servlets are a very convenient mechanism to use - the > session replication is provided by the platform, and the app > programmer doesn't have to worry about it. > > All three approaches rely on every piece of data in the session being > serializable, so you can't store interesting objects, like an open > file or the like, in sessions. > > Does anybody know of any fundamentally different session > sharing/replication mechanism? > > br, > > flj > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Signed, Alessandro Ferrucci
--- End Message ---
--- Begin Message ---Hello *, since I have re-installed <mail.tamay-dogan.net> with Debian/Squeeze on a new machine, my /srv/log/apache/error.log ist arround 450 times bigger then the access.log du to following (and similar) entries ----[ '/srv/log/apache/error.log' ]------------------------------------- [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of undefined constant DIR_BASE - assumed 'DIR_BASE' in /srv/htdocs/index.php on line 3 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of undefined constant DIR_TOOL - assumed 'DIR_TOOL' in /srv/htdocs/index.php on line 5 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of undefined constant DEF_DIR_TOOL - assumed 'DEF_DIR_TOOL' in /srv/tdphp-vserver/includes/00_main.inc on line 42 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of undefined constant DEF_DIR_BASE - assumed 'DEF_DIR_BASE' in /srv/tdphp-vserver/includes/00_main.inc on line 65 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of undefined constant DIR_HOST - assumed 'DIR_HOST' in /srv/tdphp-vserver/includes/00_main.inc on line 88 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of undefined constant SCRIPT_FILENAME - assumed 'SCRIPT_FILENAME' in /srv/tdphp-vserver/includes/00_main.inc on line 88 <snip> ------------------------------------------------------------------------ ----[ '/srv/htdocs/index.php' ]------------------------------------- <?php define(DIR_BASE, "/srv"); define(DIR_TOOL, "/srv/tdphp-vserver"); include DIR_TOOL . "/includes/00_main.inc"; ?> ------------------------------------------------------------------------ Maybe I am sitting on the line? This index.php file and the website is working since ages. Whats the name of the error loging setting which produce this and WHY are they now reported? I have switched off anything but it continue to create more then 46 GByte error files (18) per day. Also I get ----[ '/srv/log/apache/error.log' ]------------------------------------- [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Undefined offset: 1 in /srv/tdphp-vserver/includes/04_l10n.inc on line 56 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Undefined offset: 1 in /srv/tdphp-vserver/includes/04_l10n.inc on line 56 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Undefined offset: 1 in /srv/tdphp-vserver/includes/04_l10n.inc on line 56 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Undefined variable: locale in /srv/tdphp-vserver/includes/04_l10n.inc on line 74 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Undefined index: what in /srv/tdphp-vserver/includes/00_main.inc on line 249 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Undefined index: csslink in /srv/tdphp-vserver/includes/00_main.inc on line 284 [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Undefined index: cookie in /srv/tdphp-vserver/includes/00_main.inc on line 298 ------------------------------------------------------------------------ ----[ '/srv/tdphp-vserver/includes/04_l10n.inc' ]----------------------- [0051] if ( $_SERVER['HTTP_ACCEPT_LANGUAGE'] != '') { [0052] foreach(explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $ACC1) { [0053] $ACC2=explode(';', $ACC1); [0054] $ACC3=explode('-', $ACC2[0]); [0055] $LL=$ACC3[0]; [0056] $CC=strtoupper($ACC3[1]); [0057] if ( $CC != '') { [0058] $LOC=$LL . "_" . $CC; [0059] } else { [0060] $LOC=$LL; [0061] } [0062] if ( stristr(" " . LOCALES . " ", " $LOC ") ) { [0063] $TMP_FILE=LOCALE_DIR . "/" . $LOC . "/LC_MESSAGES/" . $_SERVER['SERVER_NAME'] . ".mo"; [0064] if (is_file($TMP_FILE)) { [0065] $locale=$LOC; [0066] break; [0067] } [0068] } [0069] } [0070] } else { [0071] $locale=(isset($_GET['lang']))? $_GET['lang'] : DEFAULT_LOCALE; [0072] } [0073] [0074] T_setlocale(LC_MESSAGES, $locale); [0075] $domain=$_SERVER['SERVER_NAME']; [0076] T_bind_textdomain_codeset($domain, $encoding); [0077] T_bindtextdomain($domain, LOCALE_DIR); [0078] T_textdomain($domain); [0079] /* *************************** END gettext stuff *************************** */ [0080] ?> ------------------------------------------------------------------------- ----[ '/srv/tdphp-vserver/includes/00_main.inc' ]------------------------ [0248] /* ************************ DISPLAY admin ************************* */ [0249] if ( $_POST['what'] == 'admin' ) { [0250] [0251] function do_auth() { <snip> [0283] /* *************************** FIX CSS **************************** */ [0284] if ($_GET['csslink'] != '') { [0285] if ($_GET['csslink'] == 'foo') { <snip> [0297] /* ******************** SET and UNSET COOKIES ********************* */ [0298] if ( $_GET['cookie'] != '' ) { [0299] if ($_GET['cookie'] == 'set') { <snip> ------------------------------------------------------------------------- I am something missing here... Thanks, Greetings and nice Day/Evening Michelle Konzack -- ##################### Debian GNU/Linux Consultant ###################### Development of Intranet and Embedded Systems with Debian GNU/Linux itsystems@tdnet France EURL itsystems@tdnet UG (limited liability) Owner Michelle Konzack Owner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix <http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/> <http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/> Jabber linux4miche...@jabber.ccc.de Linux-User #280138 with the Linux Counter, http://counter.li.org/signature.pgp
Description: Digital signature
--- End Message ---