Mam własny serwer dedykowany. Przeinstalowałem na nim system (przeszedłem z Debiana Lenny'ego na CentOS). Zmieniłem parser PHP z apache2 na httpd.
Według starej konfiguracji serwer zapisywał sesje w katalogu ustawionym w pliku php. Aktualnie jak uruchomię stronę na nowym serwerze zapisywane są pliki sesji o pustym rozmiarze. Gdy zmieniłem zapis i pozwoliłem zapisywać sesje w domyślnym katalogu, można się było logować ale w wypadku niektórych linków dziwnym trafem sesja znika.
Zauważyłem, że system dopisał mi do pliku htaccess kilka linijek:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^mojastrona.pl$ [NC] RewriteRule ^(.*)$ <a href="http://mojastrona.pl/$1" target="_blank">http://mojastrona.pl/$1</a> [L,R=301] RewriteRule ^oferta-([a-zA-Z0-9]+)-([all]) /?S-20_query=mobile&N-6_id=$1&show=all RewriteRule ^oferta-([a-zA-Z0-9]+) /?S-20_query=mobile&N-6_id=$1 RewriteRule ^marka-([a-zA-Z0-9]+)-(.*)-([all])$ /?S-20_query=marka&N-6_id=$1&show=all RewriteRule ^marka-([a-zA-Z0-9]+)-(.*)$ /?S-20_query=marka&N-6_id=$1 RewriteRule ^historia_wyszukiwania-([a-zA-Z0-9]+) /?showsearch_id=$1 ErrorDocument 400 /error.php?id=400 ErrorDocument 401 /error.php?id=401 ErrorDocument 403 /error.php?id=403 ErrorDocument 404 /error.php?id=404 ErrorDocument 500 /error.php?id=500 ErrorDocument 503 /error.php?id=503 <Files "*.inc"> deny from all </Files> <Files "*.xml"> deny from all </Files> <Files "*.adm"> deny from all </Files> <Files "*.class"> deny from all </Files> #dopisane przez system ###Start Kloxo PHP config Area ###Please Don't edit these comments or the content in between. kloxo uses this to recognize the lines it writes to the the file. If the above line is corrupted, it may fail to recognize them, leading to multiple lines. <Ifmodule mod_php4.c> php_value upload_max_filesize 1024M php_value max_execution_time 30000 php_value max_input_time 600 php_value memory_limit 128M php_value post_max_size 800M php_flag register_globals off php_flag display_errors off php_flag file_uploads on php_flag log_errors off php_flag output_buffering off php_flag register_argc_argv on php_flag magic_quotes_gpc off php_flag magic_quotes_runtime off php_flag magic_quotes_sybase off php_flag mysql.allow_persistent off php_flag register_long_arrays on php_flag allow_url_fopen off php_flag cgi.force_redirect on php_flag enable_dl on </Ifmodule> <Ifmodule mod_php5.c> php_value upload_max_filesize 1024M php_value max_execution_time 30000 php_value max_input_time 6000 php_value memory_limit 128M php_value post_max_size 800M php_flag register_globals off php_flag display_errors off php_flag file_uploads on php_flag log_errors off php_flag output_buffering off php_flag register_argc_argv on php_flag magic_quotes_gpc off php_flag magic_quotes_runtime off php_flag magic_quotes_sybase off php_flag mysql.allow_persistent off php_flag register_long_arrays on php_flag allow_url_fopen on php_flag cgi.force_redirect on php_flag enable_dl on </Ifmodule> ###End Kloxo PHP config Area
Folderowi gdzie zapisywałem sesje zmieniłem hmod na 0777 ale to nic nie dało. Pliki sesji zapisują się z hmod 0600.
plik PHP:
//ini_set('session.save_path', GLOWNY.'_SESSION/');
przykładowy link przy którym sesje znikają(jest ich więcej):
przejście np. z mojastrona.pl na mojastrona.pl/oferta-87654
może to być związane z tym, że wcześciej skrypty były uruchamiane w fastcgi a teraz w mod_php lub suphp?