Cześć,

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:
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteCond %{HTTP_HOST} !^mojastrona.pl$ [NC]
  4. RewriteRule ^(.*)$ <a href="http://mojastrona.pl/$1" target="_blank">http://mojastrona.pl/$1</a> [L,R=301]
  5. RewriteRule ^oferta-([a-zA-Z0-9]+)-([all]) /?S-20_query=mobile&N-6_id=$1&show=all
  6. RewriteRule ^oferta-([a-zA-Z0-9]+) /?S-20_query=mobile&N-6_id=$1
  7. RewriteRule ^marka-([a-zA-Z0-9]+)-(.*)-([all])$ /?S-20_query=marka&N-6_id=$1&show=all
  8. RewriteRule ^marka-([a-zA-Z0-9]+)-(.*)$ /?S-20_query=marka&N-6_id=$1
  9. RewriteRule ^historia_wyszukiwania-([a-zA-Z0-9]+) /?showsearch_id=$1
  10. ErrorDocument 400 /error.php?id=400
  11. ErrorDocument 401 /error.php?id=401
  12. ErrorDocument 403 /error.php?id=403
  13. ErrorDocument 404 /error.php?id=404
  14. ErrorDocument 500 /error.php?id=500
  15. ErrorDocument 503 /error.php?id=503
  16.  
  17. <Files "*.inc">
  18. deny from all
  19. </Files>
  20.  
  21. <Files "*.xml">
  22. deny from all
  23. </Files>
  24. <Files "*.adm">
  25. deny from all
  26. </Files>
  27.  
  28. <Files "*.class">
  29. deny from all
  30. </Files>
  31.  
  32. #dopisane przez system
  33. ###Start Kloxo PHP config Area
  34. ###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.
  35. <Ifmodule mod_php4.c>
  36. php_value error_log /home/mojastrona/__processed_stats/mojastrona.pl.phplog
  37. php_value upload_max_filesize 1024M
  38. php_value max_execution_time 30000
  39. php_value max_input_time 600
  40. php_value memory_limit 128M
  41. php_value post_max_size 800M
  42. php_flag register_globals off
  43. php_flag display_errors off
  44. php_flag file_uploads on
  45. php_flag log_errors off
  46. php_flag output_buffering off
  47. php_flag register_argc_argv on
  48. php_flag magic_quotes_gpc off
  49. php_flag magic_quotes_sybase off
  50. php_flag mysql.allow_persistent off
  51. php_flag register_long_arrays on
  52. php_flag allow_url_fopen off
  53. php_flag cgi.force_redirect on
  54. php_flag enable_dl on
  55. </Ifmodule>
  56. <Ifmodule mod_php5.c>
  57. php_value error_log /home/autos/autos/_ERROR/
  58. php_value upload_max_filesize 1024M
  59. php_value max_execution_time 30000
  60. php_value max_input_time 6000
  61. php_value memory_limit 128M
  62. php_value post_max_size 800M
  63. php_flag register_globals off
  64. php_flag display_errors off
  65. php_flag file_uploads on
  66. php_flag log_errors off
  67. php_flag output_buffering off
  68. php_flag register_argc_argv on
  69. php_flag magic_quotes_gpc off
  70. php_flag magic_quotes_sybase off
  71. php_flag mysql.allow_persistent off
  72. php_flag register_long_arrays on
  73. php_flag allow_url_fopen on
  74. php_flag cgi.force_redirect on
  75. php_flag enable_dl on
  76. </Ifmodule>
  77. ###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:
  1. ini_set('mysql.connect_timeout', 300000);
  2. ini_set('max_execution_time', 300000);
  3. ini_set('max_input_time', 60000);
  4. //ini_set('session.save_path', GLOWNY.'_SESSION/');
  5. ini_set('session.cookie_lifetime', 6000*24);
  6. ini_set('display_errors', '0');
  7. ini_set('log_errors', 'On');
  8. ini_set('error_log', GLOWNY.'_ERROR/');



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?