]> granicus.if.org Git - php/commitdiff
Make php start even with wrong save_path.
authorYasuo Ohgaki <yohgaki@php.net>
Wed, 6 Mar 2002 06:29:43 +0000 (06:29 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Wed, 6 Mar 2002 06:29:43 +0000 (06:29 +0000)
ext/session/mod_mm.c

index f7e85ba637c3791951c233c5e4d60d9454ce978f..e014282af072f046daff246db3123e02bc95f6b3 100644 (file)
@@ -255,11 +255,13 @@ PHP_MINIT_FUNCTION(ps_mm)
        int ret;
 
        ps_mm_instance = calloc(sizeof(*ps_mm_instance), 1);
-       if (!ps_mm_instance)
-               return FAILURE;
+       if (!ps_mm_instance) {
+               php_error(E_WARNING,"mm session save handler cannot allocate shared memory");
+       }
 
-       if (!sprintf(euid,"%d", geteuid())) 
-               return FAILURE;
+       if (!sprintf(euid,"%d", geteuid())) {
+               php_error(E_WARNING,"mm session save handler cannot get effecitve UID");
+       }
                
     /* Directory + '/' + File + Module Name + Effective UID + \0 */    
        ps_mm_path = do_alloca(save_path_len+1+sizeof(PS_MM_FILE)+mod_name_len+strlen(euid)+1);
@@ -280,7 +282,7 @@ PHP_MINIT_FUNCTION(ps_mm)
        if (ret != SUCCESS) {
                free(ps_mm_instance);
                ps_mm_instance = NULL;
-               return FAILURE;
+               php_error(E_NOTICE,"mm session save handler failed to initialize. Check your save_path.");
        }
        
        php_session_register_module(&ps_mod_mm);