Hi Igor, Igor R. schrieb: > But I don't want to make a new wrapper and change PHPRC variable after each > new user creation. >
I patched suexec to do this (to get rid of the wrapper-script). My suexec is allowed to only call the php-exe and nothing else. In addition, I put in PHPRC and PHP_FCGI_MAX_REQUESTS. To do this, I replaced the function call of clean_env with: static void clean_env(const char *uname) In clean_env I added some env-vars: sprintf(pathbuf, "PHP_FCGI_MAX_REQUESTS=%s", "250"); cleanenv[cidx]=strdup(pathbuf); cidx++; sprintf(pathbuf, "PHPRC=/home/%s/config/", uname); cleanenv[cidx]=strdup(pathbuf); cidx++; And I call clean_env with the current user: target_uname = argv[1]; pw = getpwuid(atoi(target_uname)); actual_uname = strdup(pw->pw_name); clean_env(actual_uname); As you can see, the PHPRC for a any user is: /home/xxx/config/ Where xxx is the username. Hope this helps ... Greetings ... Tobias ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users