Форум сетевых администраторов
Показаны 2 сообщений на этой странице

Форум сетевых администраторов (http://netadmin.ws/forum/index.php)
- Apache (http://netadmin.ws/forum/forumdisplay.php?forumid=21)
-- Вылетает с ошибкой (http://netadmin.ws/forum/showthread.php?threadid=7699)


Помещено he][es 31-01-2004 в 09:41:

Вылетает с ошибкой

quote:

[Sat Jan 31 13:40:02 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Sat Jan 31 13:40:02 2004] [notice] Parent: Created child process 3776
[Sat Jan 31 13:40:03 2004] [notice] Child 3776: Child process is running
[Sat Jan 31 13:40:03 2004] [notice] Child 3776: Acquired the start mutex.
[Sat Jan 31 13:40:03 2004] [notice] Child 3776: Starting 250 worker threads.
[Sat Jan 31 13:40:34 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Sat Jan 31 13:40:34 2004] [notice] Parent: Created child process 3888
[Sat Jan 31 13:40:35 2004] [notice] Child 3888: Child process is running
[Sat Jan 31 13:40:35 2004] [notice] Child 3888: Acquired the start mutex.
[Sat Jan 31 13:40:35 2004] [notice] Child 3888: Starting 250 worker threads.
[Sat Jan 31 13:40:38 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Sat Jan 31 13:40:38 2004] [notice] Parent: Created child process 2512
[Sat Jan 31 13:40:39 2004] [notice] Child 2512: Child process is running
[Sat Jan 31 13:40:39 2004] [notice] Child 2512: Acquired the start mutex.
[Sat Jan 31 13:40:39 2004] [notice] Child 2512: Starting 250 worker threads.


Вот такую фигню пишет в лог и вылетает...
Происходит сие безобразие при загрузке одного Vhost-a др. грузятся без проблем. Точнее не самого хоста а скриптов (не всех) на нем. Но! Месяц я там ничего не трогал (это локальный серв. WinXP Apache 2.0.47 PHP 4.3.4)
А сейчас решил скрипт доделать загружаю апач а он так вот ругается Чего делать незнаю...

he][es добавил 31-01-2004 в 09:50:01:
Причём резко возростает загрузка ЦП...
Может быть из за корявости в скрипте?

__________________
Админ - вождь Апачей...


Помещено he][es 31-01-2004 в 19:10:

Кажется выяснил, только почему не понимаю...
Есть такая функция:

PHP:


function start_session() {
    global 
$site_body, $user_id;
    unset(
$user_id);
    
session_name("sid");
    
//session_set_cookie_params(time()+60*60*24*31);
    
session_start();
}


Если кука не стоит и session_set_cookie_params(time()+60*60*24*31); раскомментирован, то сервак вылетает. Если кука стоит и session_set_cookie_params(time()+60*60*24*31); раскомментирован то всё ОК.
А если закомментирован, то всё ОК...
Но это работало раньше....
Где то читал, о проблемах начавшихся у многих в связи с куками.
quote:

session_set_cookie_params (int lifetime [, string path [, string domain [, bool secure]]])

я не очень в этом шарю, кто понимает посчитайте плз.
Если мы воспользуемся моей "формулой" не превысит ли результат допустимое int??? Может в этом и кроется ошибка?

he][es добавил 31-01-2004 в 19:42:03:
Думаю можно закрыть тему...
Только вот я теперь думаю, кто пишет такие примеры:
quote:

junkmail at fluidideas dot com
22-Feb-2001 12:33
ok. hope this works. first time posting

heres a quick little snippet I came up with to pass sessions between lots of sub domains or c names. it also contains an array walker for reading and outputting the contents of the current array(in this case i use it for http_session_vars)

ex:
www.fluidideas.com
chat.fluidideas.com
mypage.fluidideas.com
www.mypage.fluidideas.com
these will all have access to the session.

!!!BEGIN CUT!!!

session_set_cookie_params ( time()+9999999 , "" , ".fluidideas.com" );

if ( $HTTP_COOKIE_VARS[session_id_set] )
{ session_id( $HTTP_COOKIE_VARS[session_id_set] ); }
session_start ();
Function session_walker($Array)
{
If ( !Is_Array($Array) ) Return $Array;
Reset($Array);
While( List( $Key, $Value ) = Each( $Array ) )
{
If ( Is_Array( $Array[ $Key ] ) )
{
$Array[ $Key ] = session_walker( $Array[ $Key ] );
}
Else
{
echo "key -> " . $Key . "
\n";
echo "value -> " . $Value . "
\n";
}
}
Return $Array;
}

!!!END CUT FOR SESSION INCLUDE!!!
!!!BEGIN CUT!!!

$user_session_id = session_id();
setcookie("session_id_set","$user_session_id",time()+9999999,"", ".fluidideas.com", "");

session_register("user");
session_register("password");
session_register("email");

!!!END CUT FOR LOGIN!!!

now this example will allow the session to carry the data from sub domain to sub domain and it only has one flaw that i've noticed. NS 4.7 is the only browser I've seen this in (also use mozilla .8 and IE5.5) but if the domain doesnt contain a c name the sessions wont pass.

ex: fluidideas.com not www.fluidideas.com

If someone can come up with a fix to this please email me. Thanks


Дальше смотрим
quote:

gavin_spam at skypaint dot com
26-Feb-2002 03:58
The first argument to session_set_cookie_params is the number of seconds in the future (based on the server's current time) that the session will expire. So if you want your sessions to last 100 days:

$expireTime = 60*60*24*100; // 100 days
session_set_cookie_params($expireTime);

I was using time()+$expireTime, which is WRONG (a lot of the session_set_cookie_params() examples I found get this wrong, but probably don't care because they are just doing "infinite" sessions).


И ещё дальше
quote:

steve at saturn5 dot com
16-Jun-2002 04:54
session_set_cookie_params didn't work at all, no matter how many times we yelled at the computer. we wanted to update the session expiry time after login, so we used setcookie instead, right after session_start:

$expiry = 60*60*24*100; // 100 days

session_start();
setcookie(session_name(), session_id(), time()+$expiry, "/");

if you can't get session_set_cookie_params to work, i recommend using setcookie instead. (yes, you need time()+$expiry when using setcookie.)



Англ. я знаю не в совершенстве...
Поэтому может кто нить растолкует, что к чему?
Ð_то по кудо или сколько нужно указывать???

__________________
Админ - вождь Апачей...


Формат времени GMT. Текущее время 02:55.
Показаны 2 сообщений на этой странице

Powered by: vBulletin Version 2.2.4
Copyright © Jelsoft Enterprises Limited 2000, 2001.