Re: [Mod-fcgid-users] mod_fcgid, php-fcgi and PHPRC

2008-06-13 Thread Tobias Wiersch
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


Re: [Mod-fcgid-users] Debian Etch: Strange delay upon first start of fcgi-application (PHP)

2008-03-11 Thread Tobias Wiersch
Hi Gabriel,

first of all: I solved it.

Gabriel Barazer schrieb:

 can you tell what is the mod_fcgid version on each server? If the 
 version is the same, you may be facing the same bug on each server, but 
 for some reason it's not triggered on Debian Sarge.
   
Debian is a little conservative with the upgrade of versions.
So Sarge is running the old 1.05 and Etch (latest Debian-release!) is 
running the old 1.10.
Phew...

 very good to know, except if the module on etch is an old version. Have 
 you set the same fcgid directives in your apache configuration?
   
Yes, same directives.
Because Debian Etch is running the old 1.10, I compiled the current 
version by myself. After I figured out that I have to use 
--with-suexec-bin and SharememPath, I was able to install the new 
module. :-)

And it worked!
Just for the records:
First request: real0m0.056s
Second request: real0m0.007s

Very great ... thanks for the help.

Tobias


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users