Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid
No promises this will work as I am not a maintainer nor developer of mod_fcgid, but I have prepared a patch for you that should achieve the same effect. I'm not able to test compilation with mpm-itk (mainly because I'm not sure which package you're using), but it compiles cleanly without mpm-itk libraries installed. Go ahead and give it a shot, I guess; make sure you compile this against an apache where MPM_ITK is defined and hopefully it will do what you desire. Apply the patch from the mod_fcgid/modules/fcgid directory with patch -p1 mpm-itk_mod-fcgid.patch Josiah On Thu, Feb 21, 2013 at 7:45 AM, m...@unimx.de m...@unimx.de wrote: Hello Group, the problem using ITK+mod_fcgid is the fcgid socket. the socket is owned by wwwuser (wwwrun / www-data) of apache. ITK set vhost to user1, so fcgid says: Permission denied: mod_fcgid: can't lock process table in pid socket dir: srwx-- 1 wwwrun wwwrun 0 21. Feb 14:11 11585.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.1 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:17 3083.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:25 3938.0 The way using fcgi is, we have different php-versions and per user php.ini The way we use ITK is, we want to safe homedirs of all user not have to be readable by wwwrun (f.e. remember symlink problem) So we think, we must patch mod_fcgid (source http://httpd.apache.org/mod_fcgid/) May like modwsgi: http://code.google.com/p/modwsgi/issues/detail?id=187 if (!geteuid()) { +#if defined(MPM_ITK) +if (chown(process-socket, process-uid, -1) 0) { +#else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { +#endif ap_log_error(APLOG_MARK, WSGI_LOG_ALERT(errno), wsgi_server, mod_wsgi (pid=%d): Couldn't change owner of unix domain socket '%s'., getpid(), Thus, set UNIX listener socket to be owned by the same user as daemon process runs as. Any ideas how to PATCH mod_fcgid ? mpm-itk with mod_fcgid would be more than great :) OR: Any way to user mpm-itk and different php-versions / per user php.ini ? Thanks Martin -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users mpm-itk_mod-fcgid.patch Description: Binary data -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid
Thanks, but it does not work: srwx-- 1 wwwrun wwwrun 0 23. Feb 02:26 10055.6 error_log: (13)Permission denied: mod_fcgid: can't lock process table in pid patch and compile without error greets martin Von: Josiah Purtlebaugh [mailto:josiah.purtleba...@gmail.com] Gesendet: Freitag, 22. Februar 2013 21:08 An: mod-fcgid-users@lists.sourceforge.net Betreff: Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid No promises this will work as I am not a maintainer nor developer of mod_fcgid, but I have prepared a patch for you that should achieve the same effect. I'm not able to test compilation with mpm-itk (mainly because I'm not sure which package you're using), but it compiles cleanly without mpm-itk libraries installed. Go ahead and give it a shot, I guess; make sure you compile this against an apache where MPM_ITK is defined and hopefully it will do what you desire. Apply the patch from the mod_fcgid/modules/fcgid directory with patch -p1 mpm-itk_mod-fcgid.patch Josiah On Thu, Feb 21, 2013 at 7:45 AM, m...@unimx.de mailto:m...@unimx.de m...@unimx.de mailto:m...@unimx.de wrote: Hello Group, the problem using ITK+mod_fcgid is the fcgid socket. the socket is owned by wwwuser (wwwrun / www-data) of apache. ITK set vhost to user1, so fcgid says: Permission denied: mod_fcgid: can't lock process table in pid socket dir: srwx-- 1 wwwrun wwwrun 0 21. Feb 14:11 11585.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.1 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:17 3083.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:25 3938.0 The way using fcgi is, we have different php-versions and per user php.ini The way we use ITK is, we want to safe homedirs of all user not have to be readable by wwwrun (f.e. remember symlink problem) So we think, we must patch mod_fcgid (source http://httpd.apache.org/mod_fcgid/) May like modwsgi: http://code.google.com/p/modwsgi/issues/detail?id=187 if (!geteuid()) { +#if defined(MPM_ITK) +if (chown(process-socket, process-uid, -1) 0) { +#else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { +#endif ap_log_error(APLOG_MARK, WSGI_LOG_ALERT(errno), wsgi_server, mod_wsgi (pid=%d): Couldn't change owner of unix domain socket '%s'., getpid(), Thus, set UNIX listener socket to be owned by the same user as daemon process runs as. Any ideas how to PATCH mod_fcgid ? mpm-itk with mod_fcgid would be more than great :) OR: Any way to user mpm-itk and different php-versions / per user php.ini ? Thanks Martin -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net mailto:Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid
I'm sorry, I should have considered that an unprivileged user would be unable to change ownership of an existing socket created with a different uid. I'll have to consider further what additional changes might be necessary. Josiah On Feb 22, 2013 5:34 PM, m...@unimx.de wrote: Thanks, but it does not work: ** ** srwx-- 1 wwwrun wwwrun 0 23. Feb 02:26 10055.6 ** ** error_log: (13)Permission denied: mod_fcgid: can't lock process table in pid ** ** patch and compile without error ** ** greets martin ** ** *Von:* Josiah Purtlebaugh [mailto:josiah.purtleba...@gmail.com] *Gesendet:* Freitag, 22. Februar 2013 21:08 *An:* mod-fcgid-users@lists.sourceforge.net *Betreff:* Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid ** ** No promises this will work as I am not a maintainer nor developer of mod_fcgid, but I have prepared a patch for you that should achieve the same effect. I'm not able to test compilation with mpm-itk (mainly because I'm not sure which package you're using), but it compiles cleanly without mpm-itk libraries installed. ** ** Go ahead and give it a shot, I guess; make sure you compile this against an apache where MPM_ITK is defined and hopefully it will do what you desire. ** ** Apply the patch from the mod_fcgid/modules/fcgid directory with patch -p1 mpm-itk_mod-fcgid.patch ** ** Josiah ** ** On Thu, Feb 21, 2013 at 7:45 AM, m...@unimx.de m...@unimx.de wrote: Hello Group, the problem using ITK+mod_fcgid is the fcgid socket. the socket is owned by wwwuser (wwwrun / www-data) of apache. ITK set vhost to user1, so fcgid says: Permission denied: mod_fcgid: can't lock process table in pid socket dir: srwx-- 1 wwwrun wwwrun 0 21. Feb 14:11 11585.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.1 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:17 3083.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:25 3938.0 The way using fcgi is, we have different php-versions and per user php.ini The way we use ITK is, we want to safe homedirs of all user not have to be readable by wwwrun (f.e. remember symlink problem) So we think, we must patch mod_fcgid (source http://httpd.apache.org/mod_fcgid/) May like modwsgi: http://code.google.com/p/modwsgi/issues/detail?id=187 if (!geteuid()) { +#if defined(MPM_ITK) +if (chown(process-socket, process-uid, -1) 0) { +#else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { +#endif ap_log_error(APLOG_MARK, WSGI_LOG_ALERT(errno), wsgi_server, mod_wsgi (pid=%d): Couldn't change owner of unix domain socket '%s'., getpid(), Thus, set UNIX listener socket to be owned by the same user as daemon process runs as. Any ideas how to PATCH mod_fcgid ? mpm-itk with mod_fcgid would be more than great :) OR: Any way to user mpm-itk and different php-versions / per user php.ini ? Thanks Martin -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users ** ** -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid
We test: /* Correct the file owner */ if (!geteuid()) { //#if defined(MPM_ITK) //if (chown(unix_addr.sun_path, procnode-uid, -1) 0) { if (chown(unix_addr.sun_path, web589, -1) 0) { //#else //if (chown(unix_addr.sun_path, ap_unixd_config.user_id, -1) 0) { //#endif ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, mod_fcgid: couldn't change owner of unix domain socket %s, unix_addr.sun_path); close(unix_socket); return errno; } } But the same: srwx-- 1 wwwrun wwwrun 0 23. Feb 02:44 5690.2 (13)Permission denied: mod_fcgid: can't lock process table in pid Von: m...@unimx.de [mailto:m...@unimx.de] Gesendet: Samstag, 23. Februar 2013 02:33 An: mod-fcgid-users@lists.sourceforge.net Betreff: Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid Thanks, but it does not work: srwx-- 1 wwwrun wwwrun 0 23. Feb 02:26 10055.6 error_log: (13)Permission denied: mod_fcgid: can't lock process table in pid patch and compile without error greets martin Von: Josiah Purtlebaugh [mailto:josiah.purtleba...@gmail.com] Gesendet: Freitag, 22. Februar 2013 21:08 An: mod-fcgid-users@lists.sourceforge.net mailto:mod-fcgid-users@lists.sourceforge.net Betreff: Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid No promises this will work as I am not a maintainer nor developer of mod_fcgid, but I have prepared a patch for you that should achieve the same effect. I'm not able to test compilation with mpm-itk (mainly because I'm not sure which package you're using), but it compiles cleanly without mpm-itk libraries installed. Go ahead and give it a shot, I guess; make sure you compile this against an apache where MPM_ITK is defined and hopefully it will do what you desire. Apply the patch from the mod_fcgid/modules/fcgid directory with patch -p1 mpm-itk_mod-fcgid.patch Josiah On Thu, Feb 21, 2013 at 7:45 AM, m...@unimx.de mailto:m...@unimx.de m...@unimx.de mailto:m...@unimx.de wrote: Hello Group, the problem using ITK+mod_fcgid is the fcgid socket. the socket is owned by wwwuser (wwwrun / www-data) of apache. ITK set vhost to user1, so fcgid says: Permission denied: mod_fcgid: can't lock process table in pid socket dir: srwx-- 1 wwwrun wwwrun 0 21. Feb 14:11 11585.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.1 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:17 3083.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:25 3938.0 The way using fcgi is, we have different php-versions and per user php.ini The way we use ITK is, we want to safe homedirs of all user not have to be readable by wwwrun (f.e. remember symlink problem) So we think, we must patch mod_fcgid (source http://httpd.apache.org/mod_fcgid/) May like modwsgi: http://code.google.com/p/modwsgi/issues/detail?id=187 if (!geteuid()) { +#if defined(MPM_ITK) +if (chown(process-socket, process-uid, -1) 0) { +#else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { +#endif ap_log_error(APLOG_MARK, WSGI_LOG_ALERT(errno), wsgi_server, mod_wsgi (pid=%d): Couldn't change owner of unix domain socket '%s'., getpid(), Thus, set UNIX listener socket to be owned by the same user as daemon process runs as. Any ideas how to PATCH mod_fcgid ? mpm-itk with mod_fcgid would be more than great :) OR: Any way to user mpm-itk and different php-versions / per user php.ini ? Thanks Martin -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net mailto:Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid
Right. The Unix socket is already owned by wwwrun and the chown is being executed by a different uid, I think. We need to enforce not only the chown but also the creation of the socket. It will be in another function. Josiah On Feb 22, 2013 5:48 PM, m...@unimx.de wrote: We test: ** ** /* Correct the file owner */ ** ** if (!geteuid()) { ** ** ** ** //#if defined(MPM_ITK) //if (chown(unix_addr.sun_path, procnode-uid, -1) 0) { if (chown(unix_addr.sun_path, web589, -1) 0) { //#else //if (chown(unix_addr.sun_path, ap_unixd_config.user_id, -1) 0) { //#endif ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, mod_fcgid: couldn't change owner of unix domain socket %s, unix_addr.sun_path); close(unix_socket); return errno; } } ** ** But the same: ** ** srwx-- 1 wwwrun wwwrun 0 23. Feb 02:44 5690.2 ** ** (13)Permission denied: mod_fcgid: can't lock process table in pid ** ** ** ** *Von:* m...@unimx.de [mailto:m...@unimx.de] *Gesendet:* Samstag, 23. Februar 2013 02:33 *An:* mod-fcgid-users@lists.sourceforge.net *Betreff:* Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid ** ** Thanks, but it does not work: ** ** srwx-- 1 wwwrun wwwrun 0 23. Feb 02:26 10055.6 ** ** error_log: (13)Permission denied: mod_fcgid: can't lock process table in pid ** ** patch and compile without error ** ** greets martin ** ** *Von:* Josiah Purtlebaugh [mailto:josiah.purtleba...@gmail.comjosiah.purtleba...@gmail.com] *Gesendet:* Freitag, 22. Februar 2013 21:08 *An:* mod-fcgid-users@lists.sourceforge.net *Betreff:* Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid ** ** No promises this will work as I am not a maintainer nor developer of mod_fcgid, but I have prepared a patch for you that should achieve the same effect. I'm not able to test compilation with mpm-itk (mainly because I'm not sure which package you're using), but it compiles cleanly without mpm-itk libraries installed. ** ** Go ahead and give it a shot, I guess; make sure you compile this against an apache where MPM_ITK is defined and hopefully it will do what you desire. ** ** Apply the patch from the mod_fcgid/modules/fcgid directory with patch -p1 mpm-itk_mod-fcgid.patch ** ** Josiah ** ** On Thu, Feb 21, 2013 at 7:45 AM, m...@unimx.de m...@unimx.de wrote: Hello Group, the problem using ITK+mod_fcgid is the fcgid socket. the socket is owned by wwwuser (wwwrun / www-data) of apache. ITK set vhost to user1, so fcgid says: Permission denied: mod_fcgid: can't lock process table in pid socket dir: srwx-- 1 wwwrun wwwrun 0 21. Feb 14:11 11585.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.1 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:17 3083.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:25 3938.0 The way using fcgi is, we have different php-versions and per user php.ini The way we use ITK is, we want to safe homedirs of all user not have to be readable by wwwrun (f.e. remember symlink problem) So we think, we must patch mod_fcgid (source http://httpd.apache.org/mod_fcgid/) May like modwsgi: http://code.google.com/p/modwsgi/issues/detail?id=187 if (!geteuid()) { +#if defined(MPM_ITK) +if (chown(process-socket, process-uid, -1) 0) { +#else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { +#endif ap_log_error(APLOG_MARK, WSGI_LOG_ALERT(errno), wsgi_server, mod_wsgi (pid=%d): Couldn't change owner of unix domain socket '%s'., getpid(), Thus, set UNIX listener socket to be owned by the same user as daemon process runs as. Any ideas how to PATCH mod_fcgid ? mpm-itk with mod_fcgid would be more than great :) OR: Any way to user mpm-itk and different php-versions / per user php.ini ? Thanks Martin -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users ** ** -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid
Yes the socket -i think- is created by apache with user root, only the child get wwwrun and his child with mpm-itk get f.e. web589 So if we find the function create the socket, there it have to be created with the user of mpm-itk. May at this time the user is unknown. May it is possible to create socket with 0777 instead of 0700 (may sec issue but in test cases). But i did not find the create function Von: Josiah Purtlebaugh [mailto:josiah.purtleba...@gmail.com] Gesendet: Samstag, 23. Februar 2013 02:51 An: mod-fcgid-users@lists.sourceforge.net Betreff: Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid Right. The Unix socket is already owned by wwwrun and the chown is being executed by a different uid, I think. We need to enforce not only the chown but also the creation of the socket. It will be in another function. Josiah On Feb 22, 2013 5:48 PM, m...@unimx.de mailto:m...@unimx.de wrote: We test: /* Correct the file owner */ if (!geteuid()) { //#if defined(MPM_ITK) //if (chown(unix_addr.sun_path, procnode-uid, -1) 0) { if (chown(unix_addr.sun_path, web589, -1) 0) { //#else //if (chown(unix_addr.sun_path, ap_unixd_config.user_id, -1) 0) { //#endif ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, mod_fcgid: couldn't change owner of unix domain socket %s, unix_addr.sun_path); close(unix_socket); return errno; } } But the same: srwx-- 1 wwwrun wwwrun 0 23. Feb 02:44 5690.2 (13)Permission denied: mod_fcgid: can't lock process table in pid Von: m...@unimx.de mailto:m...@unimx.de [mailto:m...@unimx.de mailto:m...@unimx.de ] Gesendet: Samstag, 23. Februar 2013 02:33 An: mod-fcgid-users@lists.sourceforge.net mailto:mod-fcgid-users@lists.sourceforge.net Betreff: Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid Thanks, but it does not work: srwx-- 1 wwwrun wwwrun 0 23. Feb 02:26 10055.6 error_log: (13)Permission denied: mod_fcgid: can't lock process table in pid patch and compile without error greets martin Von: Josiah Purtlebaugh [mailto:josiah.purtleba...@gmail.com] Gesendet: Freitag, 22. Februar 2013 21:08 An: mod-fcgid-users@lists.sourceforge.net mailto:mod-fcgid-users@lists.sourceforge.net Betreff: Re: [Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid No promises this will work as I am not a maintainer nor developer of mod_fcgid, but I have prepared a patch for you that should achieve the same effect. I'm not able to test compilation with mpm-itk (mainly because I'm not sure which package you're using), but it compiles cleanly without mpm-itk libraries installed. Go ahead and give it a shot, I guess; make sure you compile this against an apache where MPM_ITK is defined and hopefully it will do what you desire. Apply the patch from the mod_fcgid/modules/fcgid directory with patch -p1 mpm-itk_mod-fcgid.patch Josiah On Thu, Feb 21, 2013 at 7:45 AM, m...@unimx.de mailto:m...@unimx.de m...@unimx.de mailto:m...@unimx.de wrote: Hello Group, the problem using ITK+mod_fcgid is the fcgid socket. the socket is owned by wwwuser (wwwrun / www-data) of apache. ITK set vhost to user1, so fcgid says: Permission denied: mod_fcgid: can't lock process table in pid socket dir: srwx-- 1 wwwrun wwwrun 0 21. Feb 14:11 11585.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.1 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:17 3083.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:25 3938.0 The way using fcgi is, we have different php-versions and per user php.ini The way we use ITK is, we want to safe homedirs of all user not have to be readable by wwwrun (f.e. remember symlink problem) So we think, we must patch mod_fcgid (source http://httpd.apache.org/mod_fcgid/) May like modwsgi: http://code.google.com/p/modwsgi/issues/detail?id=187 if (!geteuid()) { +#if defined(MPM_ITK) +if (chown(process-socket, process-uid, -1) 0) { +#else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { +#endif ap_log_error(APLOG_MARK, WSGI_LOG_ALERT(errno), wsgi_server, mod_wsgi (pid=%d): Couldn't change owner of unix domain socket '%s'., getpid(), Thus, set UNIX listener socket to be owned by the same user as daemon process runs as. Any ideas how to PATCH mod_fcgid ? mpm-itk with mod_fcgid would be more than great :) OR: Any way to user mpm-itk and different php-versions / per user php.ini ? Thanks Martin -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free
[Mod-fcgid-users] apache2-mpm-itk different php versions per user php.ini / mod_fcgid
Hello Group, the problem using ITK+mod_fcgid is the fcgid socket. the socket is owned by wwwuser (wwwrun / www-data) of apache. ITK set vhost to user1, so fcgid says: Permission denied: mod_fcgid: can't lock process table in pid socket dir: srwx-- 1 wwwrun wwwrun 0 21. Feb 14:11 11585.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:12 2666.1 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:17 3083.0 srwx-- 1 wwwrun wwwrun 0 21. Feb 13:25 3938.0 The way using fcgi is, we have different php-versions and per user php.ini The way we use ITK is, we want to safe homedirs of all user not have to be readable by wwwrun (f.e. remember symlink problem) So we think, we must patch mod_fcgid (source http://httpd.apache.org/mod_fcgid/) May like modwsgi: http://code.google.com/p/modwsgi/issues/detail?id=187 if (!geteuid()) { +#if defined(MPM_ITK) +if (chown(process-socket, process-uid, -1) 0) { +#else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { +#endif ap_log_error(APLOG_MARK, WSGI_LOG_ALERT(errno), wsgi_server, mod_wsgi (pid=%d): Couldn't change owner of unix domain socket '%s'., getpid(), Thus, set UNIX listener socket to be owned by the same user as daemon process runs as. Any ideas how to PATCH mod_fcgid ? mpm-itk with mod_fcgid would be more than great :) OR: Any way to user mpm-itk and different php-versions / per user php.ini ? Thanks Martin -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] [newbie] Delay after editing script?
On Mon, 1 Oct 2012 09:08:39 +0600, Anton Khalikov an...@khalikov.ru wrote: ps aux | grep fcgi returns nothing. Can it run under a different name? You need to run ps axu | grep $(id -un) instead Thank you. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] [newbie] Delay after editing script?
On Sat, 29 Sep 2012 11:41:06 -0700, Josiah Purtlebaugh josiah.purtleba...@gmail.com wrote: Sure Anton, assuming that the mod_fcgid process is running as the same user that he has shell access as. ps aux | grep fcgi returns nothing. Can it run under a different name? -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] [newbie] Delay after editing script?
ps aux | grep fcgi returns nothing. Can it run under a different name? You need to run ps axu | grep $(id -un) instead -- Best regards Anton Khalikov -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] [newbie] Delay after editing script?
Unfortunately, without access to the mod_fcgid configuration you are at the mercy of the timeout or max requests variables defined by the administrator. That is why it appears to take so long for your scripts to update. This is not exactly true. If you have an access to server's shell via ssh or console, you can terminate running fcgi processes using shell command 'kill'. If your fastcgi processes are running under python, you can run 'pkill python' to finish them without waiting until timeout occurs. --- Best regards Anton Khalikov -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] [newbie] Delay after editing script?
Hello I'm only getting started with FCGI to run Python web applications. On a shared host with Apache + mod_fcgid + the Flup FastCGI server that takes care of translating between FastCGI and WSGI, I noticed that there's a several minute delay between when I edit a script and when the change shows up in a browser. I read the docs (http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html), but didn't find a directive that would explain this. But anyway, on a shared host, is there a way to reduce this delay, or is it off-limit to non-root users? Thank you. -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] [newbie] Delay after editing script?
Hello Gilles, Are you familiar with how mod_fcgid executes scripts? Basically, the executable is run and stays in memory so that it can serve any future requests without forking additional processes per request. Once the process reaches the timeout defined in the mod_fcgid configuration (or the max number of requests) the process will die and a new process will be created by the next request. Unfortunately, without access to the mod_fcgid configuration you are at the mercy of the timeout or max requests variables defined by the administrator. That is why it appears to take so long for your scripts to update. Sorry for the bad news but I hope this helps. Josiah Purtlebaugh On Fri, Sep 28, 2012 at 4:38 PM, Gilles codecompl...@free.fr wrote: Hello I'm only getting started with FCGI to run Python web applications. On a shared host with Apache + mod_fcgid + the Flup FastCGI server that takes care of translating between FastCGI and WSGI, I noticed that there's a several minute delay between when I edit a script and when the change shows up in a browser. I read the docs (http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html), but didn't find a directive that would explain this. But anyway, on a shared host, is there a way to reduce this delay, or is it off-limit to non-root users? Thank you. -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] [newbie] Delay after editing script?
On Fri, 28 Sep 2012 16:56:39 -0700, Josiah Purtlebaugh josiah.purtleba...@gmail.com wrote: Unfortunately, without access to the mod_fcgid configuration you are at the mercy of the timeout or max requests variables defined by the administrator. That is why it appears to take so long for your scripts to update. Thanks for the confirmation. I'll just work on the scripts on a test host, and only upload files once they're ready for showtime. -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
Exact Oliver, I have the exact same issue, have you managed to solve the problem? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] uploadprogress working with mod_fcgid?
Hi, how can i get uploadprogress (http://pecl.php.net/package/uploadprogress) working with mod_fcgid? The progress bar gets no progress update. Anyone the same problem? Best regards sunfire -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] uploadprogress working with mod_fcgid?
Josiah Purtlebaugh josiah.purtlebaugh at gmail.com writes: Hello, From the page you linked: It is only known to work on Apache with mod_php, other SAPI implementations unfortunately still have issues. At least PHP 5.2 is needed. mod_php and mod_fcgid are fundamentally different; as this script is known to work only on mod_php that means it is not meant to function through CGI interfaces (like mod_fcgid uses). I would seek out another script, but short of tearing the code apart I cannot tell you exactly why it won't work. Josiah Purtlebaugh Hello, i read that on the linked page. But it is still working in mod_fastcgi, that's why i ask? I read something about disable output_buffering but without success. Best regards sunfire -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Connection timed out: mod_fcgid:ap_pass_brigade failed in handle_request_ipc function
Walter Heck walterheck at gmail.com writes: Hi list, I'm running: [09-02-11 15:07:09] [root at server02.yomamma.com] [~] # dpkg -l | egrep '{fcgi|php|apache|http}' ii apache2 2.2.16-4~bpo50+1 Apache HTTP Server metapackage ii apache2-mpm-worker 2.2.16-4~bpo50+1 Apache HTTP Server - high speed threaded model ii apache2-suexec 2.2.9-10+lenny9 Standard suexec program for Apache 2 mod_suexec ii apache2-utils 2.2.9-10+lenny9 utility programs for webservers ii apache2.2-bin 2.2.16-4~bpo50+1 Apache HTTP Server common binary files ii apache2.2-common 2.2.16-4~bpo50+1 Apache HTTP Server common files ii apachetop 0.12.6-9 Realtime Apache monitoring tool ii libapache2-mod-fcgid 1:2.3.6-1~bpo50+1 an alternative module compat with mod_fastcgi ii libapache2-mod-passenger 2.2.11debian-1~bpo50+1 Rails and Rack support for Apache2 rc libapache2-mod-php5 5.2.17-0.dotdeb.0 server-side, HTML-embedded scripting language (Apache 2 module ii php5 5.2.17-0.dotdeb.0 server-side, HTML-embedded scripting language (metapackage) ii php5-cgi 5.2.17-0.dotdeb.0 server-side, HTML-embedded scripting language (CGI binary) ii php5-cli 5.2.17-0.dotdeb.0 command-line interpreter for the php5 scripting language ii php5-common 5.2.17-0.dotdeb.0 Common files for packages built from the php5 source ii php5-curl 5.2.17-0.dotdeb.0 CURL module for php5 ii php5-gd 5.2.17-0.dotdeb.0 GD module for php5 ii php5-mysql 5.2.17-0.dotdeb.0 MySQL module for php5 I'm seeing this error in my apache logs: [Wed Feb 09 12:05:51 2011] [warn] [client 62.233.X.Y] mod_fcgid: read data timeout in 60 seconds [Wed Feb 09 12:05:51 2011] [warn] [client 62.233.X.Y] (110)Connection timed out: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function The only solution google comes up with is http://www.virtualmin.com/node/7529, but just increasing a timeout without understanding what's going on feels wrong to me. Any of you wizards can explain to me what this means? A timeout of 60 seconds seems high enough? I can imagine you need more info, but I'm not sure what. Feel free to ask :) kind regards, -- Walter Heck--follow at walterheck on twitter to see what I'm up to! --Check out my new startup: Server Monitoring as a Service at http://tribily.comFollow at tribily on Twitter and/or 'Like' our Facebook page at http://www.facebook.com/tribily -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Mod-fcgid-users mailing list Mod-fcgid-users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users [Mon Jun 03 09:43:45 2011] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: HTTP request length 136736 (so far) exceeds MaxRequestLen (131072) [Mon Jun 03 09:44:16 2011] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: read data timeout in 30 seconds [Mon Jun 03 09:44:16 2011] [warn] [client xxx.xxx.xxx.xxx] (110)Connection timed out: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function After upgrading wordpress to 3+ and not being able to upload anything via admin - images, xml(import/export), themes, etc. Here's the error I found in Apache2 log above... the fix is to change the MaxRequestLen of (131072) in the mod_fcgid config, your httpd.conf, or under cpanel/whm in Apache Global Config Post Virtual and add this line: IfModule mod_fcgid.c MaxRequestLen 10 /IfModule The timeout error is usually the result of some IO/Connect server config issue, and yes 60 seconds is plenty. Mike BoonJack Media -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] problems with fcgid + suexec + userdir
What do you mean by RAM is almost full. Under normal usage the OS will allocate most RAM not used by active processes to disk cache leaving only a small amount free. What is the load average and CPU idle percent when it gets bogged down. Are your apps using a lot of disk resources? What is the disk utilization? (The %util column of 'iostat -x 5' where 5 is the sampling interval) -- Bryan White -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Fwd: mod_fcgid with php CGI hangs on interrupted downloads
Hi Josiah, There was a strace snippet in the linked serverfault page, as follows root@some-machine:~# strace -p 24837 Process 24837 attached - interrupt to quit write(3, \5|A\313%\35\337\376\275\237\230\266\242\371\37YjzD\322\215\357\336:M\362P\335\242\214\341..., 17432 Just hanging on that, or something like it, each time. I assume this is blocking trying to write back to the fcgid handler. Thanks, Liam On Tue, Feb 22, 2011 at 12:12 PM, Josiah Purtlebaugh josiah.purtleba...@gmail.com wrote: I don't have any solutions for you, but I'd recommend trying to discover where or why it's hanging. The tool 'strace' would be most useful in figuring this out. The ideas that come to mind off the top of my head are problems with file size, the memory of the child processes, or something like that. A dump of the php-cgi process might lead to you figuring out the true issue, though. Josiah Purtlebaugh josiah.purtleba...@gmail.com +1 253 797 4233 On Feb 21, 2011, at 4:12 PM, Liam O'Boyle wrote: Morning, I still haven't had any luck addressing this problem; I'm posting this in the hope that someone has some sort of idea, otherwise I will have to scrap mod_fcgid and revert to mod_php this evening, as this is causing considerable problems for our users. Thanks for any assistance, Liam -- Forwarded message -- From: Liam O'Boyle l...@elyobo.net Date: Tue, Feb 8, 2011 at 4:46 PM Subject: mod_fcgid with php CGI hangs on interrupted downloads To: mod-fcgid-users@lists.sourceforge.net Hi there, I'm having an issue with downloads through PHP when using mod_fcgid; if the download is interrupted before it's complete, the php-cgi process seems to block until the execution timeout is reached, rather than aborting immediately. Further requests to the server by the same user that interrupted the download hang until the process aborts and the php-cgi process starts serving more requests, but requests by other users do not appear to be affected. It doesn't appear to be a PHP problem, as the same code, when run using mod_php, executes correctly. Does anyone have any suggestions that I could look into to fix this? A full explanation is up on ServerFault - http://serverfault.com/questions/226464/php-fcgid-hangs-if-download-interrupted Thanks for any help, Liam -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Fwd: mod_fcgid with php CGI hangs on interrupted downloads
Liam, Someone else commented that you should increase the value of your IPCCommTimeout setting; I'd recommend this as well, though I have to ask, as these uploads taking multiple minutes to complete or do they hang fairly quickly? Josiah Purtlebaugh josiah.purtleba...@gmail.com +1 253 797 4233 On Feb 22, 2011, at 6:03 AM, Liam O'Boyle wrote: Hi Josiah, There was a strace snippet in the linked serverfault page, as follows root@some-machine:~# strace -p 24837 Process 24837 attached - interrupt to quit write(3, \5|A\313%\35\337\376\275\237\230\266\242\371\37YjzD\322\215\357\336:M\362P\335\242\214\341..., 17432 Just hanging on that, or something like it, each time. I assume this is blocking trying to write back to the fcgid handler. Thanks, Liam On Tue, Feb 22, 2011 at 12:12 PM, Josiah Purtlebaugh josiah.purtleba...@gmail.com wrote: I don't have any solutions for you, but I'd recommend trying to discover where or why it's hanging. The tool 'strace' would be most useful in figuring this out. The ideas that come to mind off the top of my head are problems with file size, the memory of the child processes, or something like that. A dump of the php-cgi process might lead to you figuring out the true issue, though. Josiah Purtlebaugh josiah.purtleba...@gmail.com +1 253 797 4233 On Feb 21, 2011, at 4:12 PM, Liam O'Boyle wrote: Morning, I still haven't had any luck addressing this problem; I'm posting this in the hope that someone has some sort of idea, otherwise I will have to scrap mod_fcgid and revert to mod_php this evening, as this is causing considerable problems for our users. Thanks for any assistance, Liam -- Forwarded message -- From: Liam O'Boyle l...@elyobo.net Date: Tue, Feb 8, 2011 at 4:46 PM Subject: mod_fcgid with php CGI hangs on interrupted downloads To: mod-fcgid-users@lists.sourceforge.net Hi there, I'm having an issue with downloads through PHP when using mod_fcgid; if the download is interrupted before it's complete, the php-cgi process seems to block until the execution timeout is reached, rather than aborting immediately. Further requests to the server by the same user that interrupted the download hang until the process aborts and the php-cgi process starts serving more requests, but requests by other users do not appear to be affected. It doesn't appear to be a PHP problem, as the same code, when run using mod_php, executes correctly. Does anyone have any suggestions that I could look into to fix this? A full explanation is up on ServerFault - http://serverfault.com/questions/226464/php-fcgid-hangs-if-download-interrupted Thanks for any help, Liam -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Free Software Download: Index, Search Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights.
[Mod-fcgid-users] Fwd: mod_fcgid with php CGI hangs on interrupted downloads
Morning, I still haven't had any luck addressing this problem; I'm posting this in the hope that someone has some sort of idea, otherwise I will have to scrap mod_fcgid and revert to mod_php this evening, as this is causing considerable problems for our users. Thanks for any assistance, Liam -- Forwarded message -- From: Liam O'Boyle l...@elyobo.net Date: Tue, Feb 8, 2011 at 4:46 PM Subject: mod_fcgid with php CGI hangs on interrupted downloads To: mod-fcgid-users@lists.sourceforge.net Hi there, I'm having an issue with downloads through PHP when using mod_fcgid; if the download is interrupted before it's complete, the php-cgi process seems to block until the execution timeout is reached, rather than aborting immediately. Further requests to the server by the same user that interrupted the download hang until the process aborts and the php-cgi process starts serving more requests, but requests by other users do not appear to be affected. It doesn't appear to be a PHP problem, as the same code, when run using mod_php, executes correctly. Does anyone have any suggestions that I could look into to fix this? A full explanation is up on ServerFault - http://serverfault.com/questions/226464/php-fcgid-hangs-if-download-interrupted Thanks for any help, Liam -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Fwd: mod_fcgid with php CGI hangs on interrupted downloads
I don't have any solutions for you, but I'd recommend trying to discover where or why it's hanging. The tool 'strace' would be most useful in figuring this out. The ideas that come to mind off the top of my head are problems with file size, the memory of the child processes, or something like that. A dump of the php-cgi process might lead to you figuring out the true issue, though. Josiah Purtlebaugh josiah.purtleba...@gmail.com +1 253 797 4233 On Feb 21, 2011, at 4:12 PM, Liam O'Boyle wrote: Morning, I still haven't had any luck addressing this problem; I'm posting this in the hope that someone has some sort of idea, otherwise I will have to scrap mod_fcgid and revert to mod_php this evening, as this is causing considerable problems for our users. Thanks for any assistance, Liam -- Forwarded message -- From: Liam O'Boyle l...@elyobo.net Date: Tue, Feb 8, 2011 at 4:46 PM Subject: mod_fcgid with php CGI hangs on interrupted downloads To: mod-fcgid-users@lists.sourceforge.net Hi there, I'm having an issue with downloads through PHP when using mod_fcgid; if the download is interrupted before it's complete, the php-cgi process seems to block until the execution timeout is reached, rather than aborting immediately. Further requests to the server by the same user that interrupted the download hang until the process aborts and the php-cgi process starts serving more requests, but requests by other users do not appear to be affected. It doesn't appear to be a PHP problem, as the same code, when run using mod_php, executes correctly. Does anyone have any suggestions that I could look into to fix this? A full explanation is up on ServerFault - http://serverfault.com/questions/226464/php-fcgid-hangs-if-download-interrupted Thanks for any help, Liam -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Fwd: mod_fcgid with php CGI hangs on interrupted downloads
Hi Liam, Try adding this to the VirtualHost configuration for the intended website: IPCCommTimeout 300 In addition, I'd recommend starting with a bare-bones Apache (without any additional 3rd party module, like Suhosin and others) and then activating only FastCGI with PHP. Best is when you compile PHP from sources. I run Apache 2.2, FCGI, PHP5 on Debian and have no issues for years. The only difference than your configuration is: I compile PHP5 from sources. Actually I do that all the time in FreeBSD servers, but since Debian is a development machine, I only build PHP5 from sources. /Noor On Tue, Feb 22, 2011 at 12:12 AM, Liam O'Boyle l...@elyobo.net wrote: Morning, I still haven't had any luck addressing this problem; I'm posting this in the hope that someone has some sort of idea, otherwise I will have to scrap mod_fcgid and revert to mod_php this evening, as this is causing considerable problems for our users. Thanks for any assistance, Liam -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Connection timed out: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
Hi list, I'm running: [09-02-11 15:07:09] [r...@server02.yomamma.com] [~] # dpkg -l | egrep '{fcgi|php|apache|http}' ii apache2 2.2.16-4~bpo50+1Apache HTTP Server metapackage ii apache2-mpm-worker 2.2.16-4~bpo50+1Apache HTTP Server - high speed threaded model ii apache2-suexec 2.2.9-10+lenny9 Standard suexec program for Apache 2 mod_suexec ii apache2-utils 2.2.9-10+lenny9 utility programs for webservers ii apache2.2-bin 2.2.16-4~bpo50+1Apache HTTP Server common binary files ii apache2.2-common2.2.16-4~bpo50+1Apache HTTP Server common files ii apachetop 0.12.6-9Realtime Apache monitoring tool ii libapache2-mod-fcgid1:2.3.6-1~bpo50+1 an alternative module compat with mod_fastcgi ii libapache2-mod-passenger2.2.11debian-1~bpo50+1 Rails and Rack support for Apache2 rc libapache2-mod-php5 5.2.17-0.dotdeb.0 server-side, HTML-embedded scripting language (Apache 2 module ii php55.2.17-0.dotdeb.0 server-side, HTML-embedded scripting language (metapackage) ii php5-cgi5.2.17-0.dotdeb.0 server-side, HTML-embedded scripting language (CGI binary) ii php5-cli5.2.17-0.dotdeb.0 command-line interpreter for the php5 scripting language ii php5-common 5.2.17-0.dotdeb.0 Common files for packages built from the php5 source ii php5-curl 5.2.17-0.dotdeb.0 CURL module for php5 ii php5-gd 5.2.17-0.dotdeb.0 GD module for php5 ii php5-mysql 5.2.17-0.dotdeb.0 MySQL module for php5 I'm seeing this error in my apache logs: [Wed Feb 09 12:05:51 2011] [warn] [client 62.233.X.Y] mod_fcgid: read data timeout in 60 seconds [Wed Feb 09 12:05:51 2011] [warn] [client 62.233.X.Y] (110)Connection timed out: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function The only solution google comes up with is http://www.virtualmin.com/node/7529, but just increasing a timeout without understanding what's going on feels wrong to me. Any of you wizards can explain to me what this means? A timeout of 60 seconds seems high enough? I can imagine you need more info, but I'm not sure what. Feel free to ask :) kind regards, -- Walter Heck -- follow @walterheck on twitter to see what I'm up to! -- Check out my new startup: Server Monitoring as a Service @ http://tribily.com Follow @tribily on Twitter and/or 'Like' our Facebook page at http://www.facebook.com/tribily -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] mod_fcgid with php CGI hangs on interrupted downloads
Hi there, I'm having an issue with downloads through PHP when using mod_fcgid; if the download is interrupted before it's complete, the php-cgi process seems to block until the execution timeout is reached, rather than aborting immediately. Further requests to the server by the same user that interrupted the download hang until the process aborts and the php-cgi process starts serving more requests, but requests by other users do not appear to be affected. It doesn't appear to be a PHP problem, as the same code, when run using mod_php, executes correctly. Does anyone have any suggestions that I could look into to fix this? A full explanation is up on ServerFault - http://serverfault.com/questions/226464/php-fcgid-hangs-if-download-interrupted Thanks for any help, Liam -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Premature end of script headers, p_pass_brigade failed and others...
So, in my apache error_log i have often : mod_fcgid: can't apply process slot for /home/site1/www/index.php Any idea ? Thanks 2010/10/29 Julien Jabouin chatlumo@gmail.com: Hello, I update mod_fcgid to the last stable version 2.3.5 and i added FcgidMaxRequestsPerProcess 1000 and comment PHP_FCGI_CHILDREN but now my website is very slow (about 5 to 10 seconds to have a page), do you know why ? Thanks, Julien 2010/9/25 Travers Carter tcar...@noggin.com.au: Hi, I'm not sure if this is the exact cause of your problem, but a few config changes I would try are below: On Sat, 25 Sep 2010 04:11:18 +0200, Julien Jabouin chatlumo@gmail.com wrote: #cat /etc/apache2/mods-available/fcgid.conf IfModule mod_fcgid.c AddHandler fcgid-script .fcgi IPCConnectTimeout 20 # IdleTimeout 300 # IdleScanInterval 240 # BusyTimeout 300 # BusyScanInterval 120 # ErrorScanInterval 6 # ZombieScanInterval 3 # ProcessLifeTime 3600 # SpawnScoreUpLimit 10 # IPCConnectTimeout 300 # IPCCommTimeout 300 /IfModule You should add MaxRequestsPerProcess 1000 to the above list, where 1000 is whatever value you set PHP_FCGI_MAX_REQUESTS to. If the two don't match some requests can fail. For the newer (Apache) version of mod_fcgid the directive is called FcgidMaxRequestsPerProcess, but it is the same thing. See http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestsperprocess # cat /var/www/site1/php-cgi #!/bin/bash PHP_FCGI_CHILDREN=4 PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_CHILDREN export PHP_FCGI_MAX_REQUESTS exec /usr/bin/php5-cgi Don't set PHP_FCGI_CHILDREN, mod_fcgid won't send more than one request at a time to a process, so you should increase the (Fcgid)MaxProcessesPerClass setting in apache instead. See http://wherethebitsroam.com/blogs/jeffw/apache-php-fastcgi-and-phpfcgichildren -- Travers Carter - Noggin - http://www.noggin.com.au/ -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Premature end of script headers, p_pass_brigade failed and others...
Thanks, I go to try this. 2010/9/25 Travers Carter tcar...@noggin.com.au: Hi, I'm not sure if this is the exact cause of your problem, but a few config changes I would try are below: On Sat, 25 Sep 2010 04:11:18 +0200, Julien Jabouin chatlumo@gmail.com wrote: #cat /etc/apache2/mods-available/fcgid.conf IfModule mod_fcgid.c AddHandler fcgid-script .fcgi IPCConnectTimeout 20 # IdleTimeout 300 # IdleScanInterval 240 # BusyTimeout 300 # BusyScanInterval 120 # ErrorScanInterval 6 # ZombieScanInterval 3 # ProcessLifeTime 3600 # SpawnScoreUpLimit 10 # IPCConnectTimeout 300 # IPCCommTimeout 300 /IfModule You should add MaxRequestsPerProcess 1000 to the above list, where 1000 is whatever value you set PHP_FCGI_MAX_REQUESTS to. If the two don't match some requests can fail. For the newer (Apache) version of mod_fcgid the directive is called FcgidMaxRequestsPerProcess, but it is the same thing. See http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestsperprocess # cat /var/www/site1/php-cgi #!/bin/bash PHP_FCGI_CHILDREN=4 PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_CHILDREN export PHP_FCGI_MAX_REQUESTS exec /usr/bin/php5-cgi Don't set PHP_FCGI_CHILDREN, mod_fcgid won't send more than one request at a time to a process, so you should increase the (Fcgid)MaxProcessesPerClass setting in apache instead. See http://wherethebitsroam.com/blogs/jeffw/apache-php-fastcgi-and-phpfcgichildren -- Travers Carter - Noggin - http://www.noggin.com.au/ -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Premature end of script headers, p_pass_brigade failed and others...
Hello, From few days, i have an issue with mod_fcgi (?). For one url which is good, sometimes i can acces to it, sometimes not. When it's not, sometimes i have an error in the browser web or sometimes, the webpage is partially shown. So this is an extract of my apache log : [Fri Sep 24 16:57:05 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Fri Sep 24 16:57:05 2010] [error] [client 88.XXX.XXX.176] Premature end of script headers: index.php, referer: http://www.site1.com/index.php/_admin/sales_order/view/order_id/1631/ [Fri Sep 24 16:57:07 2010] [notice] mod_fcgid: process 16282 going graceful shutdown, sending SIGTERM [Fri Sep 24 16:57:13 2010] [notice] mod_fcgid: process /home/site1/www/index.php(16282) exit(communication error), terminated by calling exit(), return code: 0 [Fri Sep 24 16:57:15 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Fri Sep 24 16:57:15 2010] [warn] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request function [Fri Sep 24 16:57:19 2010] [notice] mod_fcgid: process 16277 going graceful shutdown, sending SIGTERM [Fri Sep 24 16:57:19 2010] [notice] mod_fcgid: call /home/site1/www/afa/public/xmlrpc-cart.php with wrapper /var/www/site1/php-cgi [Fri Sep 24 19:04:27 2010] [error] [client 83.XXX.XXX.139] Premature end of script headers: index.php, referer: http://www.site1.com/nos-bases-pour-vos-creations/flacons-et-contenants?limit=allmanufacturer=71p=3 [Fri Sep 24 19:04:32 2010] [notice] mod_fcgid: process 21906 going graceful shutdown, sending SIGTERM [Fri Sep 24 19:04:38 2010] [notice] mod_fcgid: process /home/site1/www/index.php(21906) exit(communication error), terminated by calling exit(), return code: 0 [Fri Sep 24 19:15:50 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Fri Sep 24 19:15:50 2010] [warn] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request function [Fri Sep 24 19:15:52 2010] [notice] mod_fcgid: process 22115 going graceful shutdown, sending SIGTERM [Fri Sep 24 19:15:58 2010] [notice] mod_fcgid: process /home/site1/www/index.php(22115) exit(communication error), terminated by calling exit(), return code: 0 [Sat Sep 25 03:00:31 2010] [notice] mod_fcgid: process /home/site1/www/index.php(9299) exit(communication error), terminated by calling exit(), return code: 0 [Sat Sep 25 03:02:13 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Sat Sep 25 03:02:13 2010] [error] [client 88.XXX.XXX.176] Premature end of script headers: index.php, referer: http://www.site1.com/index.php/_admin/catalog_product/edit/id/702/ [Sat Sep 25 03:02:16 2010] [notice] mod_fcgid: process 9630 going graceful shutdown, sending SIGTERM [Sat Sep 25 03:02:22 2010] [notice] mod_fcgid: process /home/site1/www/index.php(9630) exit(communication error), terminated by calling exit(), return code: 0 [Sat Sep 25 03:08:27 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Sat Sep 25 03:08:27 2010] [error] [client 88.XXX.XXX.176] Premature end of script headers: index.php, referer: http://www.site1.com/index.php/_admin/system_config/edit/section/sales/ [Sat Sep 25 03:08:30 2010] [notice] mod_fcgid: process 9304 going graceful shutdown, sending SIGTERM [Sat Sep 25 03:08:36 2010] [notice] mod_fcgid: process /home/site1/www/index.php(9304) exit(communication error), terminated by calling exit(), return code: 0 Do you know why i have this issue ? I don't know what to do… I put now my configuration, maybe it can help you… Sorry for my bad english. # uname -a Linux xx.domain.tld 2.6.34.6--std-ipv6-64 #3 SMP Fri Sep 17 16:19:12 UTC 2010 x86_64 GNU/Linux # apache2 -v Server version: Apache/2.2.9 (Debian) Server built: Nov 14 2009 21:03:32 # apache2ctl -t -D DUMP_MODULES Loaded Modules: core_module (static) log_config_module (static) logio_module (static) mpm_worker_module (static) http_module (static) so_module (static) actions_module (shared) alias_module (shared) auth_basic_module (shared) authn_file_module (shared) authz_default_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgid_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) expires_module (shared) fcgid_module (shared) mime_module (shared) negotiation_module (shared) rewrite_module (shared) setenvif_module (shared) ssl_module (shared) status_module (shared) suexec_module (shared) vhost_alias_module (shared) Syntax OK #cat /etc/apache2/mods-available/fcgid.load LoadModule fcgid_module /usr/lib/apache2/modules/mod_fcgid.so #cat /etc/apache2/mods-available/fcgid.conf IfModule mod_fcgid.c AddHandlerfcgid-script .fcgi IPCConnectTimeout 20 # IdleTimeout 300 # IdleScanInterval 240 # BusyTimeout
[Mod-fcgid-users] Cryptic warning with mod_fcgid
Hi Guys, I'm seeing this in my logs: [Tue Sep 07 23:24:43 2010] [warn] [client 59.167.223.XXX] mod_fcgid: stderr: 2 = '9ce34f1f91ed9b4031f7fd9490a3d in /var/www/virtual/tribily.com/htdocs/piwik/core/Tracker/Db/Pdo/Mysql.php on line 178, referer: http://tribily.com/ The code of that php looks like this: 143 /** 144 * Executes a query, using optional bound parameters. 145 * 146 * @param string Query 147 * @param array|string Parameters to bind array('idsite'= 1) 148 * 149 * @return PDOStatement or false if failed 150 * @throws Exception if an exception occured 151 */ 152 public function query($query, $parameters = array()) 153 { 154 if(is_null($this-connection)) 155 { 156 return false; 157 } 158 159 try { 160 if(self::$profiling) 161 { 162 $timer = $this-initProfiler(); 163 } 164 165 if(!is_array($parameters)) 166 { 167 $parameters = array( $parameters ); 168 } 169 $sth = $this-connection-prepare($query); 170 $sth-execute( $parameters ); 171 172 if(self::$profiling) 173 { 174 $this-recordQueryProfile($query, $timer); 175 } 176 return $sth; 177 } catch (PDOException $e) { 178 throw new Exception(Error query: .$e-getMessage() . 179 In query: $query 180 Parameters: .var_export($parameters, true)); 181 } 182 } Any idea what could be up? I tried googling mod_fcgid: stderr: 2 but no luck.. -- Walter Heck -- Checkout my new startup: Server Monitoring as a Service @ http://tribily.com -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Cryptic warning with mod_fcgid
On Wed, Sep 08, 2010 at 03:35:44PM +0800, Walter Heck wrote: Hi Guys, I'm seeing this in my logs: [Tue Sep 07 23:24:43 2010] [warn] [client 59.167.223.XXX] mod_fcgid: stderr: 2 = '9ce34f1f91ed9b4031f7fd9490a3d in /var/www/virtual/tribily.com/htdocs/piwik/core/Tracker/Db/Pdo/Mysql.php on line 178, referer: http://tribily.com/ 178 throw new Exception(Error query: .$e-getMessage() . Hi Walter, I don't think that this has anything to do with mod_fcgid, its just some forwarding from the error channel (2 aka stderr), that the process executed through fcgi (here php), has written something on the error channel. It seems that you encountered that Exception within your php code. So this has really nothing to do with mod_fcgid. bye ingo -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] auto_prepend_file not working
On Fri, Aug 27, 2010 at 8:16 PM, Tears ! unix...@gmail.com wrote: Dear Users, I am facing strange problem regarding (php value auto_prepend_file) with mod_fcgid. through .htaccess This is the error [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] Unknown(0) : Warning - Unknown: failed to open stream: No such file or directory [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] PHP Fatal error: Unknown: Failed opening required 'server.php [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] ' (include_path='.:/usr/local/www/include') in Unknown on line 0 [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] Unknown(0) : Fatal error - Unknown: Failed opening required 'server.php [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] ' (include_path='.:/usr/local/www/include') * server.php files is available in /usr/local/www/include/* I am using htscanner for .htacess files for php_modfcgid *here is .htacess file* IfModule Mod_php.c php_value auto_prepend_file server.php /IfModule Here is my virtualhost setting VirtualHost *:80 ServerAdmin u...@example.org DocumentRoot /usr/local/www/mydata ServerName lime.example.org ErrorLog /var/log/apache/lime-error_log CustomLog /var/log/apache/lime-access_log common /VirtualHost *here is the php-cgi * #!/bin/sh PHP_CGI=/usr/local/bin/php-cgi PHP_FCGI_CHILDREN=16 PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_CHILDREN export PHP_FCGI_MAX_REQUESTS exec $PHP_CGI *this is php.conf under /usr/local/apache/Include/ * AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php.fcgi DirectoryIndex index.php ** would you please help how i can solve this issue because this is working through mod_php Hi Umar, Your log is saying that php can't locate your prepend file server.php. maybe you need to use a full path for it. -- Marc -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] strang problem with mod_fcgid
Dear Users, I am facing strange problem with mod_fcgid while using mod_rewrite. Here is my rewrite rule. *RewriteRule ^/.*-jobs-apply-(\d+) /imran.php [L]* When i am trying to access http://www.mysite.org/netadmin30-jobs-apply-293 Its not working. *Here is the rewrite log* 119.158.119.130 - - [29/Aug/2010:06:48:43 +0500] [ www.mysite.org/sid#28932018][rid#289af058/initial] (2) init rewrite engine with requested uri /abcd-jobs-apply-200 119.158.119.130 - - [29/Aug/2010:06:48:43 +0500] [ www.mysite.org/sid#28932018][rid#289af058/initial] (3) applying pattern '^/.*-jobs-apply-(\d+)' to uri '/abcd-jobs-apply-200' 119.158.119.130 - - [29/Aug/2010:06:48:43 +0500] [ www.mysite.org/sid#28932018][rid#289af058/initial] (2) rewrite '/abcd-jobs-apply-200' - '/imran.php' 119.158.119.130 - - [29/Aug/2010:06:48:43 +0500] [ www.mysite.org/sid#28932018][rid#289af058/initial] (2) local path result: /imran.php 119.158.119.130 - - [29/Aug/2010:06:48:43 +0500] [ www.mysite.org/sid#28932018][rid#289af058/initial] (2) prefixed with document_root to /usr/local/www/mydata/imran.php 119.158.119.130 - - [29/Aug/2010:06:48:43 +0500] [ www.mysite.org/sid#28932018][rid#289af058/initial] (1) go-ahead with /usr/local/www/mydata/imran.php [OK] *Here is www error log* [Sun Aug 29 06:48:43 2010] [warn] [client 119.158.119.130] (53)Software caused connection abort: mod_fcgid: error reading data from FastCGI server [Sun Aug 29 06:48:43 2010] [error] [client 119.158.119.130] Premature end of script headers: imran.php But if i change my rewrite rule something like this. *RewriteRule ^/netadmin30-jobs-apply-(\d+) /imran.php [L]* Then its work perfect, that means problem with* ^/.** Would you please help how i can solve this Regards, Umar -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] auto_prepend_file not working
Dear Users, I am facing strange problem regarding (php value auto_prepend_file) with mod_fcgid. through .htaccess This is the error [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] Unknown(0) : Warning - Unknown: failed to open stream: No such file or directory [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] PHP Fatal error: Unknown: Failed opening required 'server.php [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] ' (include_path='.:/usr/local/www/include') in Unknown on line 0 [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] Unknown(0) : Fatal error - Unknown: Failed opening required 'server.php [Fri Aug 27 18:12:50 2010] [error] [client 119.158.109.31] ' (include_path='.:/usr/local/www/include') * server.php files is available in /usr/local/www/include/* I am using htscanner for .htacess files for php_modfcgid *here is .htacess file* IfModule Mod_php.c php_value auto_prepend_file server.php /IfModule Here is my virtualhost setting VirtualHost *:80 ServerAdmin u...@example.org DocumentRoot /usr/local/www/mydata ServerName lime.example.org ErrorLog /var/log/apache/lime-error_log CustomLog /var/log/apache/lime-access_log common /VirtualHost *here is the php-cgi * #!/bin/sh PHP_CGI=/usr/local/bin/php-cgi PHP_FCGI_CHILDREN=16 PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_CHILDREN export PHP_FCGI_MAX_REQUESTS exec $PHP_CGI *this is php.conf under /usr/local/apache/Include/ * AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php.fcgi DirectoryIndex index.php ** would you please help how i can solve this issue because this is working through mod_php Regards, Umar -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] auto_prepend issue please help
Dear users I am already using mod_php in my apache server. Now I have configured mod_fcgid. I have configured different .php file as auto_preped for my virtualhost. But php_value auto_prepend not working through mod_fcgid, Would you please help me how i can solve this issue. VirtualHost *:80 php_value auto_prepend_file server.php ServerAdmin u...@example.org DocumentRoot /home/www/example ServerName www.example.org /VirtualHost -- Umar Draz Network Administrator -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] auto_prepend issue please help
Hello, php_value is only for php running as an apache module. Martin Korous Tears ! wrote: Dear users I am already using mod_php in my apache server. Now I have configured mod_fcgid. I have configured different .php file as auto_preped for my virtualhost. But php_value auto_prepend not working through mod_fcgid, Would you please help me how i can solve this issue. VirtualHost *:80 php_value auto_prepend_file server.php ServerAdmin u...@example.org mailto:u...@example.org DocumentRoot /home/www/example ServerName www.example.org http://www.example.org /VirtualHost -- Umar Draz Network Administrator -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] auto_prepend issue please help
Dear Martin, Then what is the other way ? Regards, Umar On Tue, Aug 24, 2010 at 5:57 PM, Martin Korous kor...@thinline.cz wrote: Hello, php_value is only for php running as an apache module. Martin Korous Tears ! wrote: Dear users I am already using mod_php in my apache server. Now I have configured mod_fcgid. I have configured different .php file as auto_preped for my virtualhost. But php_value auto_prepend not working through mod_fcgid, Would you please help me how i can solve this issue. VirtualHost *:80 php_value auto_prepend_file server.php ServerAdmin u...@example.org mailto:u...@example.org DocumentRoot /home/www/example ServerName www.example.org http://www.example.org /VirtualHost -- Umar Draz Network Administrator -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Umar Draz Network Administrator -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] 一个关于权限的问题
[Sat Oct 31 20:29:37 2009] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Sat Oct 31 20:29:37 2009] [error] [client 127.0.0.1] Premature end of script headers: zpyweb.fcgi 貌似是suexec的问题,一旦加上了suexec就有这问题 怎么解决呢,原来升级前是好的 -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] 一个关于权限的问题
原来用的是debian的state版本,一切正常,然后今天升级到了unstate Zues:/var/log/apache2# apache2 -v Server version: Apache/2.2.14 (Debian) Server built: Sep 29 2009 19:41:44 Package: libapache2-mod-fcgid State: installed Automatically installed: no Version: 1:2.2-1 Priority: optional Section: httpd Maintainer: Tatsuki Sugiura s...@nemui.org Uncompressed Size: 135k Depends: libc6 (= 2.6.1-1), apache2.2-common Description: an alternative module compat with mod_fastcgi It is a binary compatibility alternative to Apache module mod_fastcgi. mod_fcgid has a new process management strategy, which concentrates on reducing the number of fastcgi server, and kick out the corrupt fastcgi server as soon as possible. 我访问的时候总是出现这个错误 [Sat Oct 31 11:40:57 2009] [warn] mod_fcgid: can't apply process slot for /home/vhost/s6/nttnhj/zpyweb.fcgi 网上google,貌似都是说是log文件夹权限的问题 于是我重写指定了文件夹 IfModule mod_fcgid.c SocketPath /var/log/apache2/fcgidsock AddHandlerfcgid-script .fcgi IdleTimeout 60 IPCCommTimeout 10 IPCConnectTimeout 5 /IfModule 。。。 VirtualHost *:81 ServerName nttnhj.cn SuexecUserGroup s6 vhost # SuexecUserGroup www www MaxClientsVHost 400 NiceValue 5 DocumentRoot /home/vhost/s6/nttnhj/ ErrorLog /maindata/log/vhost_apache/6_nttnhj_err.log CustomLog /maindata/log/vhost_apache/6_nttnhj_access.log combined ScriptAlias /nttnhj /home/vhost/s6/nttnhj/zpyweb.fcgi Directory /home/vhost/s6/nttnhj/ #AddHandler fcgid-script .fcgi #RewriteEngine On #RewriteCond %{REQUEST_URI} ^/nttnhj #RewriteRule ^/nttnhj(.*)$ zpyweb.fcgi/$1 [QSA,L] /Directory /VirtualHost 用一个普通用户身份查看 Zues:s6 /var/log/apache2/fcgidsock:pwd /var/log/apache2/fcgidsock Zues:s6 /var/log/apache2:ls -alh drwxr-xr-x 2 www root 4.0K 2009-10-31 11:43 fcgidsock -rwxr-xr-x 1 root root 21K 2009-10-31 11:02 other_vhosts -rwxr-xr-x 1 root www-data 42 2009-10-31 10:25 suexec.log 但是,还是用同样的错误 我很郁闷 -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] ap_pass_brigade
Hello, We have tons of this error message in our logfile: Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function It seams, that this happens when the client cancels the connection: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537922 Thanks Marcus -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] mod_fcgid has moved to the ASF
Chris Darroch schrieb: See the CHANGES-FCGID file in the distribution, or look at http://svn.apache.org/repos/asf/httpd/mod_fcgid/trunk/CHANGES-FCGID for the latest trunk info. Chris. Hi Chris, The reason, why we still stick to mod_fastcgi is the upload behaviour. We support uploads up to 30 GB. The problem: mod_fcgid caches the POST-data and dumps the request to the fastcgi-application, as soon as the upload is finished. Are there any plans to improve this? Thank you very much! Greetings from Switzerland Marcus -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Problem serving binary content with Apache 2.2.13 - PHP 5.3.0 - mod_fcgid 2.2
Hi, i ran into a problem with mod_fcgid and i wonder whether anybody can replicate my problem. There is also a bug report in here: http://sourceforge.net/tracker/?func=detailaid=2854396group_id=174879atid=870991 Since i wrote the bug report, i did update to Apache 2.2.13, PHP 5.3.0 and mod_fcgid 2.2 (was 2.1 before) but the error remains (should have upgraded before sigh but that is why i write here now). My server: Operating systemLinux 2.6.9-023stab048.6-smp CPUAuthenticAMD, Quad-Core AMD Opteron(tm) Processor 2352 Trying to replicate the problem just put a image.jpg file into a folder (i.e. 800x600 pixels) and another watermark.jpg like a banner 486x60 (size does not matter, it should just be smaller than the original image). Then put the following .htaccess into the same folder: #--- RewriteEngine on Options FollowSymlinks RewriteBase / AddHandler wtmrk jpg action wtmrk /modify.php #--- The code of the modify.php is this: --- ?php /* activeWatermark Free script that places watermark on images in folder Copyright (C) 2005 ActiveUnit.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // IMAGE WATERMARK (comment line below if you do not want to use image watermark) Define('WATERMARK_IMAGE', $_SERVER['DOCUMENT_ROOT'] . '/watermark.jpg'); // path to watermark image Define('WATERMARK_PERCENT', '50'); // Intensity of the transition (in percent) // TEXT WATERMARK (comment line below if you do not want to use text) //Define('WATERMARK_TEXT', 'Copyright (c) 2005 www.activeunit.com'); // text to place (image will not be used) Define('WATERMARK_TEXT_FONT', '3'); // font 1 / 2 / 3 / 4 / 5 Define('TEXT_SHADOW', '1'); // 1 - yes / 0 - no Define('TEXT_COLOR', '#FF'); // text color // GENERAL SETTINGS Define('WATERMARK_ALIGN_H', 'right'); // left / right / center Define('WATERMARK_ALIGN_V', 'bottom'); // top / bottom / center Define('WATERMARK_MARGIN', '10'); // margin // /* FIX for switching between php4 and php5 */ if (!isset($_SERVER['PATH_INFO'])) { $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO']; } $dr=preg_replace('/modify\.php.+/', '', $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO']); $filename=str_replace($dr, './', $_SERVER['PATH_INFO']); $lst=GetImageSize($filename); $image_width=$lst[0]; $image_height=$lst[1]; $image_format=$lst[2]; if ($image_format==1) { // GIF format, send proper content-type and do not process Header(Content-Type: image/gif); readfile($filename); exit; } elseif ($image_format==2) { // JPEG format, send proper content-type and process Header(Content-Type: image/jpg); $old_image=imagecreatefromjpeg($filename); } elseif ($image_format==3) { // PNG format, send proper content-type and process Header(Content-Type: image/png); $old_image=imagecreatefrompng($filename); } else { // Show error message instead Header(Content-Type: text/plain); echo Unknown file format: $filename; exit; } if (Defined('WATERMARK_TEXT') WATERMARK_TEXT!='') { // text $color = eregi_replace(#,, TEXT_COLOR); $red = hexdec(substr($color,0,2)); $green = hexdec(substr($color,2,2)); $blue = hexdec(substr($color,4,2)); $text_color = imagecolorallocate ($old_image, $red, $green, $blue); $text_height=imagefontheight(WATERMARK_TEXT_FONT); $text_width=strlen(WATERMARK_TEXT)*imagefontwidth(WATERMARK_TEXT_FONT); $wt_y=WATERMARK_MARGIN; if (WATERMARK_ALIGN_V=='top') { $wt_y=WATERMARK_MARGIN; } elseif (WATERMARK_ALIGN_V=='bottom') { $wt_y=$image_height-$text_height-WATERMARK_MARGIN; } elseif (WATERMARK_ALIGN_V=='center') { $wt_y=(int)($image_height/2-$text_height/2); } $wt_x=WATERMARK_MARGIN; if (WATERMARK_ALIGN_H=='left') { $wt_x=WATERMARK_MARGIN; } elseif (WATERMARK_ALIGN_H=='right') { $wt_x=$image_width-$text_width-WATERMARK_MARGIN; } elseif (WATERMARK_ALIGN_H=='center') { $wt_x=(int)($image_width/2-$text_width/2); } if (TEXT_SHADOW=='1') { imagestring($old_image, WATERMARK_TEXT_FONT, $wt_x+1, $wt_y+1, WATERMARK_TEXT, 0); } imagestring($old_image, WATERMARK_TEXT_FONT, $wt_x, $wt_y, WATERMARK_TEXT, $text_color); } if (Defined('WATERMARK_IMAGE') WATERMARK_IMAGE!='' file_exists(WATERMARK_IMAGE) ($image_width 200)) {
Re: [Mod-fcgid-users] Weird behavior or what?
2009/8/19 Noor mlist-fc...@orientalsensation.com: tldr; According to these findings, the best benchmark is when MaxProcessCount is set to 8 (which is number of CPU's). Is this just an accident? According to so many tips and pages I read on the No. In general, a thread-pool design, which is what mod_fcgid+PHP effectively emulates, will peak with the number of worker threads equal to the number of active CPUs. Note that this is in fact a very logical result, since PHP processing is CPU-bound. Internet (and even its default value,) this variable should be around 100. If you notice the last benchmark, when I put 64 in this variable, This might be true in the general case if PHP is used as mod_php and Apache handles not only PHP requests but also other, static content delivery (which make serving IO and network latency bound). In that case, and interpolated over real-life workload, increasing the number of server threads or processes to high number will be beneficial simply because the vast majority of them will sleep in a point in time. I got 26 failed transactions. While when I put only 8 working processes, I got no failures and the benchmark had the best times and records! Overloading your CPUs can do that, yes. And while you're at it, I'll through in another question: How does eAccelerator/FastCGI manage the shared memory segments? According to Very, very badly, and for silly reasons too. APC and eAccelerator could be upgraded with code that would make them use truly shared memory, but for whatever reasons (possibly nobody has paid for the development), they don't. -- f+rEnSIBITAhITAhLR1nM9F4cIs5KJrhbcsVtUIt7K1MhWJy1A== -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Yet more weird results...
On Thu, 20 Aug 2009, Noor wrote: According to the results, setting a top of 8 processes for the FastCGI-launched php-cgi process would achieve a remarkable boost in performance. Even better than setting 100 processes, and each equipped with an eAccelerator opcode. Hi, Were these 100 php processess spawned before launching the benchmark? Spawning 100 heavy PHP processess is very resource-greedy. mod_fcgid additionaly holds new process spawning if spawn rate is to high (that's dependent on config). Start logging vmstat (i.e. vmstat -w 5) output on benchmarked server just before launching each benchmark, run it while benchmark is running and some time after it ends. Compare vmstat output for benchmarks. Take a look on http server error log too. -- Piotr Gackiewicz Intertele S.A. - operator systemów ITL.PL i DOMENY.ITL.PL al. T. Rejtana 1, 35-326 Rzeszów TEL: +48 17 8507580, FAX: +48 17 8520275, INFOLINIA: 0 801 335523 http://www.itl.pl - niezawodne serwery wirtualne http://domeny.itl.pl- tanie domeny internetowe http://www.intertele.pl-- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Yet more weird results...
Hello list, On a previous post (http://sourceforge.net/mailarchive/message.php?msg_name=d5fcc4ff0908191445x18dbadd8rdad145aa4e0c1c1f%40mail.gmail.com), I've reported weird statistics after runnning siege on a heavy PHP application. Those tests were done on localhost and were blazing-fast even for a T3 user. So, I re-did the same tests but this time I installed siege on another server (hosted in a different country altogether). I've attached a CSV file with the test's results. The (MinProcess) and (MaxProcess) are values for minimum and maximum processes that mod-fcgid is allowed to spawn. I've yet to get a response on the following: According to the results, setting a top of 8 processes for the FastCGI-launched php-cgi process would achieve a remarkable boost in performance. Even better than setting 100 processes, and each equipped with an eAccelerator opcode. Anyone? Noor siege.csv Description: Binary data -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Weird behavior or what?
Hello list. (I hope I'm posting to the right mailing list. If not, then I apologize already and ask you to direct me to the right list. Thanks!) I've setup the following configuration on a Dell 2940 2 x Quad-Core with 4GB RAM: - FreeBSD 7.2-STABLE amd64 bit. Kernel recompiled with minimal options, no optimizations done. - /etc/sysctl.conf includes: kern.ipc.shmmax=134217728, kern.ipc.semvmx=131068 - Apache worker-MPM V2.2.11_7 from ports -- required modules active only, no optimizations done. - mod_fcgid V2.2 from ports, no optimizations done. - PHP 5.2.10, compiled from source with options to activate FastCGI. - eAccelerator 0.9.5.3, compiled from source with options to activate shared memory. Now, I've been testing load using siege and I'm either not understanding the whole concept of processes/threads of Apache (and fcgid's processes) or every other documentation and tip I found on the Internet is irrelevant! I will detail next: Siege configuration: version: 2.66 verbose: false debug: true protocol: HTTP/1.1 connection: close concurrent users: 100 time to run: n/a repetitions: 50 socket timeout: 30 delay: 1 sec internet simulation: false benchmark mode: false failures until abort: 1024 named URL: none URLs file: /usr/local/etc/urls.txt logging: true log file: /var/log/siege.log resource file: /root/.siegerc allow redirects: true allow zero byte data: true allow chunked encoding: true Base httpd.conf include the following settings: ServerLimit: 64 ThreadLimit: 128 MaxClients: 1024 The following 3 snippets detail loads I've done with siege. For all tests, I've setup eAccelerator (compiled from source with shared-memory enabled) with 32MB of mem_only optimization. Parameters I've setup for siege are detailed before the (+++) signs, results after them: StartServers 4 ThreadsPerChild 64 MinSpareThreads 32 MaxSpareThreads 64 MaxProcessCount 8 DefaultMaxClassProcessCount 8 DefaultMinClassProcessCount 0 ransactions: 5092 hits Availability: 99.98 % Elapsed time: 170.01 secs Data transferred: 78.40 MB Response time: 2.46 secs Transaction rate: 29.95 trans/sec Throughput: 0.46 MB/sec Concurrency: 73.78 Successful transactions: 4720 Failed transactions: 1 Longest transaction: 27.70 Shortest transaction: 0.05 StartServers 4 ThreadsPerChild 64 MinSpareThreads 32 MaxSpareThreads 64 MaxProcessCount 16 DefaultMaxClassProcessCount 16 DefaultMinClassProcessCount 0 ransactions: 5091 hits Availability: 99.96 % Elapsed time: 242.89 secs Data transferred: 78.38 MB Response time: 3.75 secs Transaction rate: 20.96 trans/sec Throughput: 0.32 MB/sec Concurrency: 78.70 Successful transactions: 4719 Failed transactions: 2 Longest transaction: 26.10 Shortest transaction: 0.06 StartServers 4 ThreadsPerChild 64 MinSpareThreads 32 MaxSpareThreads 64 MaxProcessCount 128 DefaultMaxClassProcessCount 64 DefaultMinClassProcessCount 0 ransactions: 5067 hits Availability: 99.49 % Elapsed time: 322.76 secs Data transferred: 78.11 MB Response time: 5.31 secs Transaction rate: 15.70 trans/sec Throughput: 0.24 MB/sec Concurrency: 83.30 Successful transactions: 4695 Failed transactions: 26 Longest transaction: 29.34 Shortest transaction: 0.10 According to these findings, the best benchmark is when MaxProcessCount is set to 8 (which is number of CPU's). Is this just an accident? According to so many tips and pages I read on the Internet (and even its default value,) this variable should be around 100. If you notice the last benchmark, when I put 64 in this variable, I got 26 failed transactions. While when I put only 8 working processes, I got no failures and the benchmark had the best times and records! Anyone please care to explain why this is happening? And while you're at it, I'll through in another question: How does eAccelerator/FastCGI manage the shared memory segments? According to eAccelerator's homepage, it'll share such segments when the spawning process is shared. In the case of FastCGI (mod_fcgid), *who* is the spawning process? And this spawning process, how many cgi-php processes it'll spawn? (which if I understand correctly, such cgi-php processes would share eAccelerator's cached scripts as they've got one father). Kindly, someone knowledgeable with all these technologies care to explain and shed more light, for me and for others maybe... Thanks in advance. Noor -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net
Re: [Mod-fcgid-users] Weird behavior or what?
Way too involved of a question for this list :) I'd suspect that your application is fairly heavy judging from avg response times and that if you ran it from a script without involving fastcgi or apache you'd see similar throughput. On Wed, Aug 19, 2009 at 2:45 PM, Noor mlist-fc...@orientalsensation.comwrote: Hello list. (I hope I'm posting to the right mailing list. If not, then I apologize already and ask you to direct me to the right list. Thanks!) I've setup the following configuration on a Dell 2940 2 x Quad-Core with 4GB RAM: - FreeBSD 7.2-STABLE amd64 bit. Kernel recompiled with minimal options, no optimizations done. - /etc/sysctl.conf includes: kern.ipc.shmmax=134217728, kern.ipc.semvmx=131068 - Apache worker-MPM V2.2.11_7 from ports -- required modules active only, no optimizations done. - mod_fcgid V2.2 from ports, no optimizations done. - PHP 5.2.10, compiled from source with options to activate FastCGI. - eAccelerator 0.9.5.3, compiled from source with options to activate shared memory. Now, I've been testing load using siege and I'm either not understanding the whole concept of processes/threads of Apache (and fcgid's processes) or every other documentation and tip I found on the Internet is irrelevant! I will detail next: Siege configuration: version: 2.66 verbose: false debug: true protocol: HTTP/1.1 connection: close concurrent users: 100 time to run: n/a repetitions: 50 socket timeout: 30 delay: 1 sec internet simulation: false benchmark mode: false failures until abort: 1024 named URL: none URLs file: /usr/local/etc/urls.txt logging: true log file: /var/log/siege.log resource file: /root/.siegerc allow redirects: true allow zero byte data: true allow chunked encoding: true Base httpd.conf include the following settings: ServerLimit: 64 ThreadLimit: 128 MaxClients: 1024 The following 3 snippets detail loads I've done with siege. For all tests, I've setup eAccelerator (compiled from source with shared-memory enabled) with 32MB of mem_only optimization. Parameters I've setup for siege are detailed before the (+++) signs, results after them: StartServers 4 ThreadsPerChild 64 MinSpareThreads 32 MaxSpareThreads 64 MaxProcessCount 8 DefaultMaxClassProcessCount 8 DefaultMinClassProcessCount 0 ransactions: 5092 hits Availability: 99.98 % Elapsed time: 170.01 secs Data transferred: 78.40 MB Response time: 2.46 secs Transaction rate: 29.95 trans/sec Throughput: 0.46 MB/sec Concurrency: 73.78 Successful transactions: 4720 Failed transactions: 1 Longest transaction: 27.70 Shortest transaction: 0.05 StartServers 4 ThreadsPerChild 64 MinSpareThreads 32 MaxSpareThreads 64 MaxProcessCount 16 DefaultMaxClassProcessCount 16 DefaultMinClassProcessCount 0 ransactions: 5091 hits Availability: 99.96 % Elapsed time: 242.89 secs Data transferred: 78.38 MB Response time: 3.75 secs Transaction rate: 20.96 trans/sec Throughput: 0.32 MB/sec Concurrency: 78.70 Successful transactions: 4719 Failed transactions: 2 Longest transaction: 26.10 Shortest transaction: 0.06 StartServers 4 ThreadsPerChild 64 MinSpareThreads 32 MaxSpareThreads 64 MaxProcessCount 128 DefaultMaxClassProcessCount 64 DefaultMinClassProcessCount 0 ransactions: 5067 hits Availability: 99.49 % Elapsed time: 322.76 secs Data transferred: 78.11 MB Response time: 5.31 secs Transaction rate: 15.70 trans/sec Throughput: 0.24 MB/sec Concurrency: 83.30 Successful transactions: 4695 Failed transactions: 26 Longest transaction: 29.34 Shortest transaction: 0.10 According to these findings, the best benchmark is when MaxProcessCount is set to 8 (which is number of CPU's). Is this just an accident? According to so many tips and pages I read on the Internet (and even its default value,) this variable should be around 100. If you notice the last benchmark, when I put 64 in this variable, I got 26 failed transactions. While when I put only 8 working processes, I got no failures and the benchmark had the best times and records! Anyone please care to explain why this is happening? And while you're at it, I'll through in another question: How does eAccelerator/FastCGI manage the shared memory segments? According to eAccelerator's homepage, it'll share such segments when the spawning process is shared. In the case of FastCGI (mod_fcgid), *who* is the spawning process? And this spawning process, how many cgi-php processes it'll spawn? (which if I understand correctly, such cgi-php processes would share eAccelerator's cached scripts as they've got one father). Kindly, someone knowledgeable with all these technologies care to explain and shed more light, for me and for others maybe... Thanks in advance. Noor
Re: [Mod-fcgid-users] Weird behavior or what?
Travers Carter a écrit : On Thu, 20 Aug 2009 00:45:36 +0300, Noor mlist-fc...@orientalsensation.com wrote: And while you're at it, I'll through in another question: How does eAccelerator/FastCGI manage the shared memory segments? According to eAccelerator's homepage, it'll share such segments when the spawning process is shared. In the case of FastCGI (mod_fcgid), *who* is the spawning process? And this spawning process, how many cgi-php processes it'll spawn? (which if I understand correctly, such cgi-php processes would share eAccelerator's cached scripts as they've got one father). As I understand it in FastCGI mode a php process will launch a number of children equal to the value of the PHP_FCGI_CHILDREN environment variable, I believe that this is the spawning process referred to in the eAccelerator docs, meaning that the shared memory segment would be shared by those PHP_FCGI_CHILDREN processes. But mod_fcgid (unlike mod_fastcgi) assumes that each process it starts directly can only handle a single concurrent request so PHP_FCGI_CHILDREN should be set to 0, meaning that no children will be launched and the shared memory segment will only be used by a single php process. PHP will shutdown the process after 500 request, so if you don't use PHP_FCGI_CHILDREN the opcode cache (eaccelerator/xcache/apc) will be lost. For this type of setup I generally set PHP_FCGI_CHILDREN to 1 and increase the ProcessLifeTime fastcgi parameter to 86400 seconds instead of 3600. Olivier -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] mod_fcgi and Digest Authorization
Janis Volbergs schrieb: Hi! Mod_fcgid is a nice substitute for mod_fastcgi, however, it really fails, when we talk about FastCgiAuthentication or AccessChecking. It just won't work.. We had interesting protection engine built and enabled using mod_fastcgi and it worked fine. With Mod_fcgid however it didnot :( So, if you need to setup custom Authentication/Access checking software, go for mod_fastcgi. Regards And you can't use mod_fcgid for big file uploads. Because it caches the post-data, you can't make an upload status bar. Greetings -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] mod_fcgi error: Premature end of script headers
Hi, Since switching to mod_fcgid, our production server periodically throws a 500-error when handling a PHP-backed request. The Apache error log shows: [Mon May 11 11:26:40 2009] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Mon May 11 11:26:40 2009] [error] [client 195.215.203.98] Premature end of script headers: page.php We're running Apache 2.2.9 with the worker MPM and mod_fcgid 2.2 on Ubuntu 8.10. mod_fcgid configuration follows: LoadModule fcgid_module /usr/lib/apache2/modules/mod_fcgid.so IfModule mod_fcgid.c AddHandlerfcgid-script .fcgi AddHandler fcgid-script .php FCGIWrapper /usr/lib/cgi-bin/php5 .php IPCConnectTimeout 20 /IfModule Any clue what is going on here? Thanks, With best regards Christian Rishøj T: +45 6130 0669 E: christ...@jetment.com smime.p7s Description: S/MIME cryptographic signature -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Parse POST data
2009/3/13 double nin...@gmx.at: Hello, If I am uploading a video to a mod-fcgid server, the POST data is collected and submitted to the fastcgi-application in bulk. Is there any chance to configure mod-fcgid, so that the application can read from stdin what is already uploaded? I want to create a upload status bar. No, this is pretty frequently needed feature but AFAIK fcgid will always buffer data. -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
Olivier B. wrote: Yes, but in that case why PHP forks ? children will never be used !? AFAIK (?) mod_fcgid can't multiplex multiple request on one fcgi-socket. The fcgi-connection is 1:1 (http request -- fcgi connection) and can't be shared across childs/threads of apache. .max -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
On 28.2.2009, at 12:10, Max Dittrich wrote: Olivier B. wrote: Yes, but in that case why PHP forks ? children will never be used !? AFAIK (?) mod_fcgid can't multiplex multiple request on one fcgi- socket. The fcgi-connection is 1:1 (http request -- fcgi connection) and can't be shared across childs/threads of apache. PHP forks because you tell it to. If you ever set PHP_FCGI_CHILDREN to anything, PHP will fork *that many* processes right away regardless of how many requests you receive. mod_fcgid doesn't know anything about this, so you're essentially spawning processes at two levels (mod_fcgid and PHP itself). My suggestion is to yank our PHP_FCGI_CHILDREN completely. Just leave the process management to mod_fcgid. -- Filip Hajny -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
Max Dittrich a écrit : AFAIK (?) mod_fcgid can't multiplex multiple request on one fcgi-socket. The fcgi-connection is 1:1 (http request -- fcgi connection) and can't be shared across childs/threads of apache. .max Ok, it is what I see too. Thanks. Filip Hajny a écrit : PHP forks because you tell it to. If you ever set PHP_FCGI_CHILDREN to anything, PHP will fork *that many* processes right away regardless of how many requests you receive. mod_fcgid doesn't know anything about this, so you're essentially spawning processes at two levels (mod_fcgid and PHP itself). My suggestion is to yank our PHP_FCGI_CHILDREN completely. Just leave the process management to mod_fcgid. -- Filip Hajny Of course PHP forks because I ask to do it. But the question is why this feature exists if it is _totally_ useless ? I will ask on the PHP mailing list, maybe they know why they add that strange behavior. Thanks. Olivier -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
So, I simply read the file sapi/cgi/README.FastCGI in the PHP source. If I well understand, this feature is usefull when you run directly PHP as the fcgi daemon. I have the end of my explanation, thanks and sorry for noise ;) Olivier Olivier B. a écrit : Max Dittrich a écrit : AFAIK (?) mod_fcgid can't multiplex multiple request on one fcgi-socket. The fcgi-connection is 1:1 (http request -- fcgi connection) and can't be shared across childs/threads of apache. .max Ok, it is what I see too. Thanks. Filip Hajny a écrit : PHP forks because you tell it to. If you ever set PHP_FCGI_CHILDREN to anything, PHP will fork *that many* processes right away regardless of how many requests you receive. mod_fcgid doesn't know anything about this, so you're essentially spawning processes at two levels (mod_fcgid and PHP itself). My suggestion is to yank our PHP_FCGI_CHILDREN completely. Just leave the process management to mod_fcgid. -- Filip Hajny Of course PHP forks because I ask to do it. But the question is why this feature exists if it is _totally_ useless ? I will ask on the PHP mailing list, maybe they know why they add that strange behavior. Thanks. Olivier -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
On 28.2.2009, at 15:24, Olivier B. wrote: So, I simply read the file sapi/cgi/README.FastCGI in the PHP source. If I well understand, this feature is usefull when you run directly PHP as the fcgi daemon. It's also useful when you want memory shared among the PHP processes (e.g. for caching). It's not shared if spawned by mod_fcgid. -F -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
Yes I was thinking that but what is the interest to share memory between processes which never run simultaneously ? Olivier Filip Hajny a écrit : On 28.2.2009, at 15:24, Olivier B. wrote: So, I simply read the file sapi/cgi/README.FastCGI in the PHP source. If I well understand, this feature is usefull when you run directly PHP as the fcgi daemon. It's also useful when you want memory shared among the PHP processes (e.g. for caching). It's not shared if spawned by mod_fcgid. -F -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
On 28.2.2009, at 17:05, Olivier B. wrote: Yes I was thinking that but what is the interest to share memory between processes which never run simultaneously ? They do. If you let PHP spawn them, they all start right away, and keep running until you kill them. They are not killed when idle etc. F -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
On 28.2.2009, at 17:27, Olivier B. wrote: my first question was about that : it seems that fcgid will _never_ use this concurrent PHP instances. If there is 2 concurrent access, fcgid will spawn an other group of PHP to handle that, it will not use the first group of php instance which have idled children. So in this groups of PHP, there is only one php child really used. If it is just to keep the opcode cache after PHP die (by default all the 500 queries), well, just 1 fork in necessary. Yes, well, my point was... if you care about shared memory, then constrain mod_fcgid to a single PHP process only, let the PHP process fork its own children and hope they will be able to process all requests before mod_fcgid considers the single process busy and you end up getting 503. If you do not care about shared memory, then leave out the PHP forks altogether (not setting PHP_FCGI_CHILDREN), and let mod_fcgid do its job. But it doesn't make much sense to intermix the two forking levels. -F -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
Filip Hajny a écrit : Yes, well, my point was... if you care about shared memory, then constrain mod_fcgid to a single PHP process only, let the PHP process fork its own children and hope they will be able to process all requests before mod_fcgid considers the single process busy and you end up getting 503. My english is not really good, so maybe I very badly explained my original problem, but all the problem is here : letting PHP do that doesn't work at all. I use this configuration for mod_fcgid : DefaultMaxClassProcessCount 1 DefaultMinClassProcessCount 1 And in the PHP wrapper : export PHP_FCGI_CHILDREN=8 So I obtain this php5-cgi processes : init(1)─┬─apache2(1591)─┬─apache2(22940)───php5-cgi(23015)─┬─php5-cgi(23017) │ │ ├─php5-cgi(23018) │ │ ├─php5-cgi(23019) │ │ ├─php5-cgi(23020) │ │ ├─php5-cgi(23021) │ │ ├─php5-cgi(23022) │ │ ├─php5-cgi(23023) │ │ └─php5-cgi(23024) I test with that PHP script : ?php sleep(5); echo 'OK'; ? Then I launch 4 concurrent access though that script : #!/bin/sh wget http://localhost/test.php -q -O test1.log wget http://localhost/test.php -q -O test2.log wget http://localhost/test.php -q -O test3.log wget http://localhost/test.php -q -O test4.log wait Then : time ./test.sh scrubby:~# time ./check real 0m21.012s user 0m0.004s sys 0m0.012s Or also : ab -c 4 -n 4 http://localhost/test.php Concurrency Level: 4 Time taken for tests: 22.2176 seconds Complete requests: 4 Failed requests: 0 Write errors: 0 Total transferred: 684 bytes HTML transferred: 8 bytes Requests per second: 0.18 [#/sec] (mean) Time per request: 22002.176 [ms] (mean) Time per request: 5500.544 [ms] (mean, across all concurrent requests) The benchmark should past 5 seconds per page, no ? The php forks are not usefull with mod_fgid, or my setup have a serious problem. Of course, if I remove PHP_FCGI_CHILDREN and increase DefaultMaxClassProcessCount, this works very well but loose all the shared memory stuff (APC, Xcache, etc) : scrubby:~# time ./check real 0m5.008s user 0m0.004s sys 0m0.004s Olivier -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Spawning explanation
Yes, but in that case why PHP forks ? children will never be used !? Olivier Ivan Voras a écrit : 2009/2/27 Olivier B. fcgid.l...@daevel.fr: The DefaultMaxClassProcessCount is reached, but why fcgid try have launched 4 process ? Just one or two should be sufficient in the case of five concurrent users, since each PHP process can handle 5 of them. No ? Or maybe I misunderstood this fork feature of PHP, and FCGID can't use this children in parallel ? But in that case, what is the interest of this fork() ? I think mod_fcgid spawns 1 PHP process per parallel request, so in your case you need 5 processes. -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Spawning explanation
Hello, I use mod-fcgid 2.2 with Apache 2.2.9 (worker), and php 5.2.6 on a Debian Lenny 64bits. My fcgid conf (for tests) : MaxProcessCount 32 DefaultMaxClassProcessCount 4 DefaultMinClassProcessCount 2 the PHP wrapper : #!/bin/dash export PHP_FCGI_CHILDREN=5 export PHP_FCGI_MAX_REQUESTS=1000 exec /usr/bin/php5-cgi $@ I reload Apache (apache2ctl graceful) then I access to the website, there is 6 php-cgi process : it seems ok since PHP do a fork() to maintain 5 children per fcgid process. So this configuration should allow 20 (4 * 5) simultaneous php queries, no ? So I run ab with only five concurrent users (-n 5000 and -c 5). And I obtain in my logs : [Fri Feb 27 01:18:45 2009] [notice] mod_fcgid: too much /home//http/v2/index.php process(current:4, max:4), skip the spawn request The DefaultMaxClassProcessCount is reached, but why fcgid try have launched 4 process ? Just one or two should be sufficient in the case of five concurrent users, since each PHP process can handle 5 of them. No ? Or maybe I misunderstood this fork feature of PHP, and FCGID can't use this children in parallel ? But in that case, what is the interest of this fork() ? Thanks for any explanation, Olivier B. -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] listen on ip address?
How can I run the fcgi on one machine, and display it on another? For example, with the fastcgi module I could use: FastCgiServer /path/to/exe -port 33666 and FastCgiExternalServer /blah -host hostname:33666 I don't see the equivalent of either client or server in the docs. If it truly doesn't exist, is there a workaround? a socket-inet proxy? Brian -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] mod_fcgid on FreeBSD amd64
2008/9/7 Richard Tector [EMAIL PROTECTED]: I'm having problems on FreeBSD 7.0 amd64 with mod_fcgid 2.2. I can reproduce the problem on 3 different amd64 based machines. One with apache 2.0.51 and the others with apache 2.2.9. Apache fails to start with: [Sun Sep 07 16:29:17 2008] [emerg] (12)Cannot allocate memory: mod_fcgid: Can't create share memory for size %zu byte Setting SharememPath makes no difference (and it's set to a sane default by the ports system). Exactly the same configuration works just fine on a FreeBSD 7.0 box, but running the i386 variant. Any thoughts? Assuming you adequately configured shmmax and other configuration variables, it should just work - I have many servers with the configuration you described. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Do virtual hosts have to be separated into classes?
Hi there, I have a fixed ceiling of PHP processes, but multiple virtual hosts. As I understand it, PHP processes are allocated to a class based on virtualhost the request comes from. Is there a way of putting all PHP requests from any virtual host into the same class? I.e. I want to have a MaxProcesses of 30 and a MaxProcessesPerClass of 30 and then make all PHP scripts go to that single class. Is that possible? Cheers, Nick. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Overriding DefaultMaxClassProcessCount in vhost config
Hi list, I have set DefaultMaxClassProcessCount to 10 globally in my httpd.conf to restrict each vhost to running to more than 10 php processes. I would like to increase this setting for a couple vhosts, but when I put DefaultMaxClassProcessCount in a vhost, it seems to have no effect. I.e. I still can't create more that 10 php processes for that vhost. I have also tried not specifying DefaultMaxClassProcessCount globally, but rather specifying it in every vhost, but the setting seems to still be ignored. In this case, each vhost seems to be able to run many php instances (I am assuming 100, the default setting for DefaultMaxClassProcessCount). Are you able to specify DefaultMaxClassProcessCount on a per-vhost basis? If so, what am I doing wrong here? Cheers, Brad signature.asc Description: PGP signature - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Limit maximum number of processes
Hi On 07/15/2008 5:45:54 PM +0200, Ron [EMAIL PROTECTED] wrote: IdleTimeout 10 IdleScanInterval 5 MaxProcessCount 0 DefaultMaxClassProcessCount 1 SpawnScoreUpLimit 0 Setting values to 0 cannot make mod_fcgid behave as expected. More on this below. The browser opens this script 2-2-2 etc (possibly due to the maxSimultanousPersistentConnections setting in browsers). When we open this script however in multiple browsers a fatal DOS-like number of processes is forked, even when we use the settings above (MaxProcessCount = 0). You have to use MaxProcessCount = 1 to limit to one process. Using 0 is not really handled, so I think it could mean unlimited. We understand that each 'main fcgi process' has 4 children, so 5 processes in total. There appears however to be one 'main fcgi process' per (running) browser without a limit. When we close all browsers and neatly run the iframe-page in only one browser, then no more extra processes are forked. Setting PHP children is completely independant of the fcgid module. So mod_fcgid will only rely on the processes it spawned itself, not the ones PHP spawned afterwards. How can we prevent that this many processes are forked? Ideally we want only a maximum of one 'main fcgi process'. Try setting MaxClassProcessCount to 1 in the global scope (not inside a VirtualHost). I'm not sure how local scopes are handled/merged with the global config. What you are really looking for is not a dynamic process spawning, but a static process handling like the old mod_fastcgi behavior. This method is not available in mod_fcgid, so you may have to use mod_fastcgi instead and switch to mod_fcgid later. Some background information is that we also use the module xcache. This module loads php-opcode in a mmap shared between forked processes. So each time a new 'main fcgi process' is created the xcache re-caches all opcode for the php pages. When only one 'main fcgi process' with its children stays running the xcache also remains in memory for optimal performance. This doesn't really matters. You will have a duplicated cache and a bit of memory waste when spawning multiple main processes, but except if you are very tight on memory, that is not really a problem. In fact, by doing this, you are reducing the pressure on the xcache shared memory area because you are spreading the read and write locks onto multiple independant areas. (we also use suexec if that matters) You should always use it :) Using PHP without suexec shouldn't even be possible, given how big the security hole is without suexec and with multiple PHP users. Gabriel - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Authorizer vs. Responder role.
I have been using mod_fastcgi for years. The apps are all C++ with my own code for handling the fastcgi socket. Today I was experimenting with with using mod_fcgid instead with an eye toward comparing performance. For the most part it worked straight away. However I have one problem. Some of the web pages required 'authorization'. For this purpose there is an authorizer app as well as the cgi responder app. Each of these are separate programs written to use FastCGI. The problem I am seeing is that occasionally mod_fcgid seems to send the 'authorizer' request to the 'responder' and the 'responder' request to the 'authorizer'. I am inferring this by logging the role string. The parameter contents seem to confirm this. What could cause this? In the httpd config for the VirtualHost I have: Location /cgi-bin AuthType Basic AuthName ArcaMaxEC FastCgiAuthenticator /home/bryan/arcamax/ecbin/ecauth require valid-user Allow from all /Location Location /cgi-bin/ec4 SetHandler fcgid-script /Location This is on Centos 5 with the supplied apache 2.2.3. mod_fcgid.so was produced with the apxs method as documented in the INSTALL.txt file. Note, the install instructions state the .so will be created in the .lib directory but I found it in the .libs directory. -- Bryan White - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] basic authentication in php is not passed through mod_fcgid
Hi people, I have an application that I'd like to switch to mod_fcgid, but unfortunately it doesn't work as I wanted it to. the (php) application uses basic authentication (not in apache but in php) but the entered information is definitely not sent down to the application with mod_fcgid. I've configured it like this - where I assumed it should work (which it doesn't, unfortunately): SuexecUserGroup wolf users Directory /var/www/wolf/public_html/ Options +ExecCGI AddHandler fcgid-script .php FCGIWrapper /var/www/wolf/php_conf/php5-fcgid.nosafe .php FastCgiAuthorizerAuthoritative Off FastCgiAuthenticatorAuthoritative Off FastCgiAccessCheckerAuthoritative Off /Directory I'm using mod_fcgid version 1.10-2 (debian stable) and tried 2.2-1 (debian testing). Any help would really be appreciated. Thanks, wogri -- http://eye-got.com/NyF8GFp http://www.wogri.com http://www.einradfilm.at - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] basic authentication in php is not passed through mod_fcgid
Hi, I compile my server binaries and never rely on pre-compiled versions; I _never_ imagined using Apache without suexec which IMHO is a complete nonsense and should be a default behavior. Finally I never imagined running any virtualhost with the Apache user. That way, running Apache compiled with SECURITY_HOLE_PASS_AUTHORIZATION is completely safe. What do you mean by not using the Apache user? I know there are several MPMs back there that do what mpm_perchild should have done, but they have (as far as I can tell) some major drawbacks themselves (for example, at least one has to run the mod_ssl code as root which is really bad should there be a buffer overflow). And if you don't run your virtual hosts as a spearate user, even with suexec there is a very small vulnerability window to grab the authentication data. That's why I understand the Apache people for not passing the Authorization header by default. It is then better to keep the default apache configuration safe by _not_ opening such security issues and applying the patch you proposed directly at the module level. Or to always pass the Authorization header at module level (which I also proposed). Regards, Christian - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] mod_fcgid APR 1.3 and restart fixes
We have now 2 versions of mod-fcgid at the Apache Lounge available. Both containing patches to the CVS source mod_fcgid-2.2a-w32.zip (for Apapache 2.2.0 - 2.2.8, works only with APR 1.2.x) Contains a Restart fix. Mod_fcgid was preventing a gracefull restart and shutdown of Apache. mod_fcgid-2.2b-w32.zip (for Apache 2.2.9 and up, works only with APR 1.3.x) Contains above Restart fix plus: APR 1.3 fix per Apache bug 43329: http://issues.apache.org/bugzilla/show_bug.cgi?id=43329 Patches to the Source are included in the downloads at http://www.apachelunge.com/ Steffen - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Fwd: Re: DESPERATE need for help with suexec. (php-cgi wrapper 'saying no input file')
Hi, Yes this is working on 2.2 , I cant find out why it shouldn't work . how does your new SuexecStripBase config look like? Its still declared like SuexecUserGroup, so it needs 2 variables which are send to *set_uname(cmd_parms *cmd, void *dummy, const char *uid, const char *gid) in the last 2 parameters. uhm about that null pointer :/, have you tried printing out strdup(valqka) ? the get method should work. I cant test it, but i guess t would come in handy to find out where it fails. (print the parameters etc ) I had a problem running mod-fcgid once because i had no compiled apache on my box which lead to very strange nullpointer failures with it not finding the configs . maybe thats the problem. PS: Well I'm not responsible for syscp ^^, so I don't know where they got all these skins. Was a kinda funny story how my mod-fcgid and syscp hacks got in there . I still want to write a nice mod for syscp so i can easily include whatever config i want ( python etc ) On Monday 23 June 2008 10:09:08 you wrote: Hi, I'm trying for over a week, I'm having troubles set/get the variable in the fcgi_config.c I run the set function but in get the variable is null and I can't understand why. Is this patch against 1.X or 2.0.X or 2.2.X because I'm using apache22. here are the links to code: http://valqk.pechurka.com/fcgid_conf.c http://valqk.pechurka.com/fcgid_conf.h http://valqk.pechurka.com/mod_fcgid.c btw, very nice work with syscp!!! I'm building my custom admin pannel and some of the ideas are the same :) pretty nice work tought!!! :) another btw, where did you took this nice skinned/featured websvn from, it rocks! :) thanks for the answers! :) cheers, valqk. - 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] DESPERATE need for help with suexec. (php-cgi wrapper 'saying no input file')
Oky, so far, so good, mod_fcgid is passing the path to the php(or any other script/bin) it's trying to run and php searches in the wrong path, because in suexec I strip out the CHROOTBASE path. I'll have to patch mod_fcgid with the same striping code so the path to the command being run is the one without CHROOTBASE path. Any tips/ideas where in the code I can find the variable so I can dispatch it? thank you, valqk. cheers! Anton - Valqk wrote: Hi group, I'm trying to run mod_fcgid with custom suexec and fcgiwrapper. I have it running without the suexec, but when I get to this point I'm stuck, debugging for over a week. The main problem is that if I run mod_fcgid with original apache suexec it works, as expected, If I'm using _custom_ written from scratch suexec that makes chroot and chuid/gid it won't work. The problem appears when I enable it, the php is saying 'no input file specified'. I can't understand how the file/dir(php script) to be run from the php interpretator is passed. If I run apache+custom suexec(no mod_fcgid) I have DOCUMENT_ROOT and SCRIPT_FILENAME evn set, and that's how php knows where to look for the php file(eventually if not passed as argument which file to run as 3rd param to suexec). As far as I saw when mod_fcgid calls suexec the third param is fcgiwrapper file and no 4th param is passed(which file to run?), no DOCUMENT_ROOT and SCRIPT_NAME is set too, so it's understandable that php can't find/exec .php file... Can anyone help me what should I do in my suexec (I use execve(argv[3], *argv, enviorn) to exec the script wrapper); Please give me any ideas, hints because I'm desperate! If more info is needed pls tell me. cheers, valqk. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - 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
[Mod-fcgid-users] DESPERATE need for help with suexec. (php-cgi wrapper 'saying no input file')
Hi group, I'm trying to run mod_fcgid with custom suexec and fcgiwrapper. I have it running without the suexec, but when I get to this point I'm stuck, debugging for over a week. The main problem is that if I run mod_fcgid with original apache suexec it works, as expected, If I'm using _custom_ written from scratch suexec that makes chroot and chuid/gid it won't work. The problem appears when I enable it, the php is saying 'no input file specified'. I can't understand how the file/dir(php script) to be run from the php interpretator is passed. If I run apache+custom suexec(no mod_fcgid) I have DOCUMENT_ROOT and SCRIPT_FILENAME evn set, and that's how php knows where to look for the php file(eventually if not passed as argument which file to run as 3rd param to suexec). As far as I saw when mod_fcgid calls suexec the third param is fcgiwrapper file and no 4th param is passed(which file to run?), no DOCUMENT_ROOT and SCRIPT_NAME is set too, so it's understandable that php can't find/exec .php file... Can anyone help me what should I do in my suexec (I use execve(argv[3], *argv, enviorn) to exec the script wrapper); Please give me any ideas, hints because I'm desperate! If more info is needed pls tell me. cheers, valqk. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - 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] DESPERATE need for help with suexec. (php-cgi wrapper 'saying no input file')
Well, if you're really desperate, I have a solution with mod_php and mod_ruid, but I don't know if it realyl does what you want. It does no chroot, but it does change uid/gid. What specifically are you looking for? Sorry, but doN expect any help regarding suexec modification from me, I have no experience in this area. al-Quaknaa - 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] DESPERATE need for help with suexec. (php-cgi wrapper 'saying no input file')
I'm running mod_fcgid on freebsd and it is working fine. Here you find my apache config files and the way suexec is build. IfModule fcgid_module # Set config options for FCGID PHP_Fix_Pathinfo_Enable 1 PASSHEADER AUTHORIZATION MaxRequestsPerProcess 500 FastCgiAuthenticatorAuthoritative off /IfModule IfModule !fcgid_module FilesMatch \.(php|php5|pl|cgi)$ Order allow,deny Deny from all Satisfy All /FilesMatch /IfModule VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/example/web ServerName web.example.com SuexecUserGroup cinergi foobaz Directory / IfModule fcgid_module AddHandler fcgid-script .php AddHandler cgi-script .cgi .pl AddType text/html php FCGIWrapper /home/example/fcgi-bin/php5 .php /IfModule AllowOverride All Options +Indexes +FollowSymLinks +ExecCGI Order allow,deny Allow from all /Directory /VirtualHost # suexec -V -D AP_DOC_ROOT=/home -D AP_GID_MIN=1000 -D AP_HTTPD_USER=www -D AP_LOG_EXEC=/var/log/httpd-suexec.log -D AP_SAFE_PATH=/usr/local/bin:/usr/local/bin:/usr/bin:/bin -D AP_UID_MIN=1000 -D AP_USERDIR_SUFFIX=public_html # cat /home/starhost/fcgi-bin/php5 #!/bin/sh PHPRC=/home/example export PHPRC PHP_FCGI_CHILDREN=0 export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_MAX_REQUESTS exec /usr/local/bin/php-cgi Noël Elsten on 16-6-2008 22:45 Anton - Valqk wrote: Alli Quaknaa wrote: Well, if you're really desperate, I have a solution with mod_php and mod_ruid, but I don't know if it realyl does what you want. It does no chroot, but it does change uid/gid. What specifically are you looking for? is there freebsd port? Sorry, but doN expect any help regarding suexec modification from me, I have no experience in this area. al-Quaknaa I need to use my suexec because it's pretty custom and nothing will work if not used. sorry, is there anyone else that can help? I simply need to understand the mechanism of passing .php file and directory to the wrapper... thanks. - 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 - 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] mod_fcgid, php-fcgi and PHPRC
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] mod_fcgid, php-fcgi and PHPRC
Hi All, Thanks to all who responded regarding my issue. I solved it with the help of writting the wrapper with the following content: #!/bin/bash USER=`id -un` export HOME=`/usr/sbin/pw user show $USER | awk -F : '{print $9}'` export PHPRC=$HOME/public_html/php.ini export PHP_FCGI_CHILDREN=0 exec /usr/local/cpanel/cgi-sys/php5.bin the code was created for FreeBSD, that's why it will be requiered to correct this code in for $HOME varible processing for Linux, for instance in such a way: HOME=`/bin/cat /etc/passwd | grep $USER: | awk -F : '{print $6}'` -- Regards, Igor R. Technical Support Teamleader WebHostingBuzz.com - 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] mod_fcgid, php-fcgi and PHPRC
On Wed, 11 Jun 2008 18:44:15 +0300 Igor R. [EMAIL PROTECTED] wrote: Hello All, Havng read a lot of articles about FastCGI, I decided to use this module to speed up processing of php and RoR applications. I use CPanel as a hosting panel. And I use Apache with suexec support as a web server. After compilling apache php and mod_fcgid I faced the problem of determination PHP directives for our server users. Tasks of PHP directives don't work with .htaccess file, I wouldn't change the variables in global php.ini file. I have looked through the documentation and I discovered that the way to php.ini file can be pointed via variable PHPRC. I've wrote wrapper which installs PHPRC before php execution. Everything works perfect if the full path to php.ini file in PHPRC is set up, e.g.: [ttyp0:hr4] [13:17] [EMAIL PROTECTED] cat /usr/local/cpanel/cgi-sys/php5 #!/bin/bash export PHPRC=~ssitest/public_html/php.ini exec /usr/local/cpanel/cgi-sys/php5.bin But I don't want to make a new wrapper and change PHPRC variable after each new user creation. Is it able to get such data as user's DOCUMENT_ROOT to use this data for PHPRC var value, e.g.: export PHPRC=$DOCUMENT_ROOT/php.ini exec /usr/local/cpanel/cgi-sys/php5.bin -- Regards, Igor R. WebHostingBuzz.com My solution for running apache+php-cgi+suexec+mod_fcgid was to create a special directory for each user (e.g. fastcgi-bin or fcgi-bin) which would contain a php wrapper script and a php.ini. Nothing needs customizing, I invoke the php.ini from within the wrapper with this: PHPRC=`/bin/pwd` (path may differ on your os) and it works very well, to be frank it works very god darn well both in terms of performance and security (websites actually feel snappier than with mod_php). If you can automate somehow the copying of this directories and the 2 files in each user's home (or wherever you call it from httpd.conf from) then you're all settled. - 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 - 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
[Mod-fcgid-users] mod_fcgid, php-fcgi and PHPRC
Hello All, Havng read a lot of articles about FastCGI, I decided to use this module to speed up processing of php and RoR applications. I use CPanel as a hosting panel. And I use Apache with suexec support as a web server. After compilling apache php and mod_fcgid I faced the problem of determination PHP directives for our server users. Tasks of PHP directives don't work with .htaccess file, I wouldn't change the variables in global php.ini file. I have looked through the documentation and I discovered that the way to php.ini file can be pointed via variable PHPRC. I've wrote wrapper which installs PHPRC before php execution. Everything works perfect if the full path to php.ini file in PHPRC is set up, e.g.: [ttyp0:hr4] [13:17] [EMAIL PROTECTED] cat /usr/local/cpanel/cgi-sys/php5 #!/bin/bash export PHPRC=~ssitest/public_html/php.ini exec /usr/local/cpanel/cgi-sys/php5.bin But I don't want to make a new wrapper and change PHPRC variable after each new user creation. Is it able to get such data as user's DOCUMENT_ROOT to use this data for PHPRC var value, e.g.: export PHPRC=$DOCUMENT_ROOT/php.ini exec /usr/local/cpanel/cgi-sys/php5.bin -- Regards, Igor R. WebHostingBuzz.com - 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
[Mod-fcgid-users] Apache consuming all available memory
Several people in the past have reported problems with large uploads and Apache consumimg all available memory. Although it is claimed that MaxRequestInMem and MaxRequestLen introduced in mod_fcgid 2.2 can be used to overcome this memory consumption problem, it appears that it does not work as intended and the bug remains. Essentially this can quickly and easily result in a DoS attack. Memory of the Apache child process appears to increase by approximately the size of the file being uploaded.nbsp; For example, if I upload a 100MB file the Apache child will grow by around 100MB of memory. I'm not much of a programmer, but I've taken a look at the code.nbsp; In fcgid_bridge.c, line 552, there is the following: if (request_size gt; max_mem_request_len) { Just before this line is executed, I added a line in source code to log the values of 'request_size' and 'max_mem_request_len'.nbsp; The value of request_size is usually 8000 but is sometimes less than that, but never more than 8000.nbsp; The value of max_mem_request_len is 65536, which is the default value (64KB). Therefore, as request_size is not greater than max_mem_request_len, the block of code added to use a temporary file is never executed. I'm using these versions on a Linux system Apache 2.2.8 mod_fcgid 2.2 PHP 5.2.6 I would greatly appeciate if the mod_fcgid developers could take another look this problem.nbsp; I am willing to test any patches in order to assist with fixing this problem. Regards -Frank __ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html- 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
[Mod-fcgid-users] Difficulty compiling mod-fcgid on centos 5
Hi, I'm having a difficult time compiling mod-fcgid. My Make file is this: # # Makefile for Apache2 # builddir = . top_dir = /usr/lib/httpd top_srcdir = ${top_dir} top_builddir = ${top_dir} VPATH = arch/unix/ #include ${top_builddir}/build/special.mk include ${top_builddir}/modules.mk APXS = apxs APACHECTL = apachectl EXTRA_CFLAGS = -I$(builddir) all: local-shared-build clean: rm -f *.o *.lo *.slo *.la arch/unix/*.o arch/unix/*.lo arch/unix/*.slo arch/unix/*.la .libs/* arch/unix/.libs/* When I run the command I get this output: [root@ mod_fcgid.2.2]# make top_dir=/usr/lib/httpd/ make: *** No rule to make target `fcgid_bridge.slo', needed by `mod_fcgid.la'. Stop. If I uncomment #include ${top_builddir}/build/special.mk it just gives me an error that special.mk cannot be found. I've researched into what special.mk is but haven't been able to find anything it doesn't come with the source code thats for sure. Naturally there isn't any yum depositories I've been able to find with the module. Any help is much appreciated! Andrew - 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] Difficulty compiling mod-fcgid on centos 5
Wonderful, that link did the trick!! -Original Message- From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Wed 6/4/2008 1:06 PM To: mod-fcgid-users@lists.sourceforge.net Subject: Re: [Mod-fcgid-users] Difficulty compiling mod-fcgid on centos 5 On Wed, 4 Jun 2008 13:16:37 -0500 Andrew White [EMAIL PROTECTED] wrote: Hi, I'm having a difficult time compiling mod-fcgid. My Make file is this: # # Makefile for Apache2 # builddir = . top_dir = /usr/lib/httpd top_srcdir = ${top_dir} top_builddir = ${top_dir} VPATH = arch/unix/ #include ${top_builddir}/build/special.mk include ${top_builddir}/modules.mk APXS = apxs APACHECTL = apachectl EXTRA_CFLAGS = -I$(builddir) all: local-shared-build clean: rm -f *.o *.lo *.slo *.la arch/unix/*.o arch/unix/*.lo arch/unix/*.slo arch/unix/*.la .libs/* arch/unix/.libs/* When I run the command I get this output: [root@ mod_fcgid.2.2]# make top_dir=/usr/lib/httpd/ make: *** No rule to make target `fcgid_bridge.slo', needed by `mod_fcgid.la'. Stop. If I uncomment #include ${top_builddir}/build/special.mk it just gives me an error that special.mk cannot be found. I've researched into what special.mk is but haven't been able to find anything it doesn't come with the source code thats for sure. Naturally there isn't any yum depositories I've been able to find with the module. Any help is much appreciated! Andrew Do you have httpd-devel package installed? Anyway, this package IS in a yum repo (in EPEL). There's a working one here: http://mirrors.xservers.ro/epel/5Server/i386/mod_fcgid-2.2-4.el5.i386.rpm Good luck! - 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 winmail.dat- 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
[Mod-fcgid-users] problems with graceful restarts and mod_fcgid
Hello! We've many problems with mod_fcgid and graceful restarts. Often it happens, that some fcgi processes are left while a graceful restart is done. These processes got never killed until i stop the apache. In case of such a graceful restart - the error.log shows up the following: [Wed Apr 23 15:15:25 2008] [notice] Graceful restart requested, doing restart [Wed Apr 23 15:15:25 2008] [emerg] mod_fcgid: server is restarted, 2733 must exit [Wed Apr 23 15:15:25 2008] [emerg] (22)Invalid argument: mod_fcgid: can't get lock, pid: 2733 Stefan - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] Howto: passheaders option?
How should one use the option to pass headers to the cgi scripts? I can't seem to find any information on how to do this in the documentation. I've tried the following, but that doesn't seem to be working: FCGIWrapper /path/to/fcgi-bin/php5 PassHeader Authorization .php Thanks, Noel Elsten - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] mod_fcgid prevents graceful Apache restart on Windows
An additional problem with Apache restarts on Windows is the kill_all_subprocess() function in fcgid_pm_main.c This function, which is called at shutdown, attempts to destroy the proc_pool for each node. If the node is shutting down, this may collide with the pool destruction in proc_wait_process() in source file arch/win32/fcgid_proc_win.c or arch/unix/fcgid_proc_unix.c. It is not safe to have two calls to apr_pool_destroy() for the same pool. It is not necessary to destroy these pools in kill_all_subprocess(), as the process is shutting down anyway. They will be destroyed safely when their parent (the config pool) is destroyed by Apache. Removing these calls to apr_pool_destroy(), in addition to the changes in my earlier note, allows graceful restarts to work. -tom- --- fcgid_pm_main.orig 2008-04-06 10:54:48.790569600 -0400 +++ fcgid_pm_main.c 2008-04-06 10:55:25.196372600 -0400 @@ -345,7 +345,6 @@ proc_table[i].diewhy = FCGID_DIE_SHUTDOWN; proc_print_exit_info(proc_table[i], exitcode, exitwhy, main_server); - apr_pool_destroy(proc_table[i].proc_pool); proc_table[i].proc_pool = NULL; } else proc_kill_force(proc_table[i], main_server); @@ -360,7 +359,6 @@ proc_table[i].diewhy = FCGID_DIE_SHUTDOWN; proc_print_exit_info(proc_table[i], exitcode, exitwhy, main_server); - apr_pool_destroy(proc_table[i].proc_pool); proc_table[i].proc_pool = NULL; } } - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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)
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
Re: [Mod-fcgid-users] Debian Etch: Strange delay upon first start of fcgi-application (PHP)
On 03/10/2008 3:19:16 PM +0100, Tobias Wiersch [EMAIL PROTECTED] wrote: Gabriel Barazer schrieb: 1) Is the delay *exactly* 2 seconds when calling a PHP script (before getting the http error 500 from your suexec test) ? Or is there another additionnal delay to look for ? I think it is a 1 second delay. I made a time wget http://localhost/testxxx.php; to circumvent network latency (after a apache reload). Result1: real0m1.054s Result2: real0m1.056s (unpatched suexec, php was normally loaded, script contained only an echo) Subsequent requests: Result1: real0m0.008s Result2: real0m0.009s And the results from a server running under Debian Sarge instead of Etch (the Etch server is actually much faster and the Sarge server slower - but the results for the first call are nonetheless 10 times better under Sarge!?) first call: real0m0.119s second call: real0m0.023s I'm confused. Is it the same server, same kernel other hardware/software specs ? If you try 2 different debian distrubtion, there may be some changes in PHP/libraries. What you need to do to isolate the problem is leave PHP alone because you have the start delay even without it. calling exit() within suexec or returning just before the execv is a good test case. Can you test on your 2 servers with the patched suexec? Test multiple times with apache stop or reboot commands between to be sure the delay is the same. If it's the same delay, it's likely to be a hardcoded time value; if the delay changes, it can be a library load time or a cache prefetch time. Are you installing mod_fcgid with the automated system (apt-get) or compiling from source? I know many debian users love to use the apt-get system, but this is really not what you want to do to test a specific problem in a specific module version. You have to only modify 1 thing between your tests or you won't be able to isolate the problem. It's like you have a cold AND headaches, and you take 2 different pills: you won't know which one made your headaches disappear. Oh, and add something like -s 4096 to the strace command to see more on the socket read. Strace with -s 4096: nothing relevant here Gabriel - 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
Re: [Mod-fcgid-users] Debian Etch: Strange delay upon first start of fcgi-application (PHP)
On 03/10/2008 7:53:10 PM +0100, Tobias Wiersch [EMAIL PROTECTED] wrote: Yes, the results were from 2 servers. The Etch-server has the problem. I wrote the results from the sarge server only to show the difference. 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. Anyway, if it's a bug and we have to relase an update, you'll have to compile from source and not from packages... What you need to do to isolate the problem is leave PHP alone because you have the start delay even without it. calling exit() within suexec or returning just before the execv is a good test case. Can you test on your 2 servers with the patched suexec? Test multiple times with apache stop or reboot commands between to be sure the delay is the same. Ok, on Etch: real0m1.010s (always the same because the fastcgi-link to php can't be established because of the exit() at the beginning of suexec) 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? On Sarge: real0m0.005s (same patched suexec) Are you installing mod_fcgid with the automated system (apt-get) or compiling from source? I use the standard-debian package because I don't want to re-compile the packages after every security fix. Do you think the problem is fixed in the later releases? AFAIK Etch is newer than Sarge (I'm *really* not a Debian expert, made my own OS), so the fcgid module is probably newer as well. Last version is 2.2 and some hardcoded variables related to the scoring (the mechanism which determines if a new fastcgi application has to be spawned) have been changed. BTW, have you got anything related to mod_fcgid in your error log? You have to log some info or debug level errors in your apache config. Maybe you will find some interesting stuff. Gabriel - 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
[Mod-fcgid-users] prespawn of cgi-apps
Hello List, i use mod_fcgid to start my cgi-applications. I tried to answer my question with fcgid-documentation. But i think the docs are a little bit spartan ;) Is there a possibility to prespawn some apps, for instance php? i have the problem that some of my users use php (different versions) over fcgid in their user-context. If the app starts a lot of cpu is consumed by starting php, after this the parsing of php-file starts. If i could prespawn this php (maybe 2 or 3 would be enough) i could distribute cpu-load and result of parsed php-file could provided much faster. Are there some recommend settings for different sizes of webservers? How are your experiences? Thanks Andre - 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
[Mod-fcgid-users] Passing authentication to CGI
Hi, I want to pass the authentication to my CGI. In my httpd.conf I have these directives: FastCgiAuthenticatorAuthoritative off FastCgiAuthorizerAuthoritative off FastCgiAccessCheckerAuthoritative off But apache2 complains: Invalid command 'FastCgiAuthorizerAuthoritative', perhaps misspelled or defined by a module not included in the server configuration Thank you very much Martin - 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
Re: [Mod-fcgid-users] [PATCH] Correct handling of PassHeader
Hello! Thank you for your contribution, but IMHO this patch is not necessary because the problem comes from Apache not allowing the Authorization header to be added as an environment variable (Header = HTTP_HEADER transformation). See the httpd-2.2.4 source,server/util_script.c:173. Ok, sure, that's true (but see below). But Apache has a VERY GOOD reason to do so for normal CGIs! Problem is that if you're using normal CGIs, Apache does the following: It fork()s into a new process and then calls (after some cleanup) execve() (or another exec* syscall). The environment of the newly executed process is set accordingly to the CGI spec, i.e. all Header: is passed as HTTP_HEADER. This is done for all headers except Authorization. So why isn't it done for authorization? If the header were part of the initial (!) environment, it could be accessed by ANY process with the same user id. So if ANY process running under the Apache user id called 'ps e' or read the corresponding /proc files manually, it could determine the contents of the Authorization header and sniff passwords. Suexec makes this attack much more difficult because of two reasons: First of all, the time during which the environment of the process may be read is VERY short and second of all, the CGI scripts of other users on the same server are normally not executed with the same user id as the Apache user (if suexec is used at all, it is probably used for everything). Still, it would be possible to trick Apache into accessing the /proc files itself using FollowSymLinks etc. That's why Apache only supports this via the compile-time flag SECURITY_HOLE_PASS_AUTHORIZATION. Because it CAN be used safely with normal CGI (use suexec for EVERYTHING without exception, NEVER allow FollowSymLinks but only SymLinksIfOwnerMatch, look out for similar Problems with e.g. SSI etc.) but it would be VERY difficult for the normal sysadmin to do so. That's why the Apache people chose to do as they did. With FastCGI this is NOT a problem anymore. Because FastCGI does not pass HTTP header variables as the INITIAL environment to the process but rather uses sockets for passing the simulated environment variables, this security hole simply does not exist anymore with FastCGI. But this does not change the CGI problem. OTOH, PHP as a CGI or FastCGI executable does exactly what it is supposed to do: reading environment variables, not headers (e.g. PHP parses the HTTP_ACCEPT_LANGUAGE env variable, not the Accept-Language header.). Yes, PHP behaves correctly in this way, that's kind of my point. ;-) The PassHeader directive doesn't have to exist because translating _all_ headers to HTTP_ vars belongs to web server, not the cgi or fastcgi module. Well, my patch didn't invent the PassHeader directive. ;-) The point of my patch simply is: IF you provide a directive called PassHeader (which you currently do!), then it should behave correctly. Currently, you provide that directive but it sets the name of the environment variable to the literal name of the header - it doesn't uppercase it and it doesn't add the HTTP_ prefix. You have three options in my eyes - but neither of them is the current behaviour of mod_fcgid: 1. Don't provide the PassHeader configuration option at all and state that if anybody wants to use the Authorization header they should recompile Apache with the -D flag. Personally, I find that to be a very bad idea because that will open a security hole regarding normal CGI (which may be necessary to coexist with FastCGI). 2. Don't provide the PassHeader configuration option but ALWAYS add the Authorization header as HTTP_AUTHORIZATION manually in mod_fcgid. 3. Provider the PassHeader configuration option but make it work correctly (see my patch). Oh, and just a general question: Why aren't all mod_fcgid configuration directives prefixed with e.g. Fcgid? If I see configuration directives like 'MaxProccessCount' or 'SocketPath' I don't automatically associate them with mod_fcgid - if they were named 'FcgidMaxProcessCount', 'FcgidSocketPath' or something similar, it would be clear from the start to which module they belong. This is a very good suggestion (and already mentioned), but nobody has done a patch yet. Maybe for the next version ? If you're interested, I could write it? Shouldn't be too much work and I could keep the old names as deprecated aliases that only throw warnings in the error log in order to maintain configuration compatibility. Regards, Christian - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net
Re: [Mod-fcgid-users] Disable suexec check
On Wednesday 12 December 2007, Ross Thomas wrote: I haven't applied the patch yet but if it works I'd give it a major vote for inclusion. I think it's a good idea. B-) The patch is very small (only one line will be changed, not counting the lines for adding the new apache option) and the old behavior is default. If anyone has doubts about it, then maybe a one-time message about the check being disabled would be appropriate? A message that the option was enabled wouldn't be a problem. I was already using the logging for debugging purposes. -- So long... Fuzz - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] mpm_worker and trac environment (python)
Gunnar Thielebein wrote: Hi all, i did get trac running with fcgid on apache in gentoo without thread and mpm_prefork which works but was pretty slow on an pIII. same was with mod_pyton. So I tested with compiling apache with mpm_worker and get this message when trying fcgid again (mod_python works here too but also slow): Oops... Trac detected an internal error: (22, 'Invalid argument') Traceback (most recent call last): File "/var/www/localhost/cgi-bin/trac.fcgi", line 23, in module fcgi_frontend.run() File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6306-py2.5.egg/trac/web/fcgi_frontend.py", line 26, in run _fcgi.WSGIServer(dispatch_request).run() File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6306-py2.5.egg/trac/web/_fcgi.py", line 1077, in run clientSock, addr = sock.accept() error: (22, 'Invalid argument') To run this configuration theres a script delivered in tracs svn: --- import os os.environ['TRAC_ENV']="/var/trac/master" os.environ['PYTHON_EGG_CACHE']="var/tmp" try: from trac.web import fcgi_frontend fcgi_frontend.run() except SystemExit: raise except Exception, e: print 'Content-Type: text/plain\r\n\r\n', print 'Oops...' print print 'Trac detected an internal error:' print print e print import traceback import StringIO tb = StringIO.StringIO() traceback.print_exc(file=tb) print tb.getvalue() --- Has it something to do with threads? I don't know if iam right here on this list. Perhaps better on trac's ? my config: fcgi-2.2 apache-2.2.6-r2 Trac-0.11dev_r6306-py2.5.egg Python-2.5.1-r4 Regards, Gunnar - SF.Net email is sponsored by: 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 My set up, suexec compatible. I do not edit trac.fcgi. ScriptAlias /trac /var/www/weedy.1.vg/cgi-bin/tracwrap.fcg # cat /var/www/weedy.1.vg/cgi-bin/tracwrap.fcg #!/bin/sh export TRAC_ENV_PARENT_DIR="/var/lib/trac" exec /var/www/weedy.1.vg/cgi-bin/trac.fcgi [ebuild R ] www-servers/apache-2.2.6-r4 USE="ssl suexec threads -debug -doc -ldap (-selinux) -static" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -authn_alias -cern_meta -charset_lite -dumpio -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -version" APACHE2_MPMS="worker -event -itk -peruser -prefork" 0 kB [ebuild R ] dev-lang/python-2.5.1-r4 USE="berkdb ipv6 ncurses readline sqlite ssl -bootstrap -build -doc -examples -gdbm -nothreads -tk -ucs2" 0 kB [ebuild R ] www-apache/mod_fcgid-2.2 0 kB [ebuild R ] www-apps/trac-0.10.4 USE="cgi fastcgi mysql silvercity sqlite vhosts -enscript -postgres" 0 kB - SF.Net email is sponsored by: 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
[Mod-fcgid-users] Zero CONTENT_LENGTH in POST segfaults Apache
I've just tested mod_fcgid and I have the same problem reported by Ross Thomas. After some tests I figured out that the segfault is not caused by CONTENT_LENGTH==0 and POST. It happens (at least in my case) when the cgi does not print anything between two FCGX_Accept() calls. Example: while (FCGX_Accept(...)) { if (read_arguments(...)) { FCGX_PutStr(..); } } If the cgi can't read_arguments() the child thread segfaults and it neither sends the internal-server-error page nor prints the premature... error in the logs. How can I make apache create a core dump when it crashes ? -- - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
[Mod-fcgid-users] compatibilities between vesions of mod_fcgid
Hi, I am integrating mod_fcgid with Solaris Apache 2.2 package Distribution. I would like to know which versions are guaranteed to be compatible. ie: would mod_fcgid.2.2 be completely compatible with mod_fcgid.2.3 ? and how about mod_fcgid.3.x ? (Which version change can break the compatibility) ? rahul -- 1. e4 _ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. 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
[Mod-fcgid-users] segmentation fault
Hello, I have 3 web servers with fcgid first is OK (dibbley) 2 segmentation fault (archie and baxter) 1) BAXTER fcgid 2.1, php 5.2.4, apache 2.2.4, linux 2.6.21.5 apache error log: [Wed Nov 07 09:35:10 2007] [notice] mod_fcgid: process /home/www/adomain/www/adomain/index.php(5272) exit(server exited), terminated by calling exit(), return code: 0 [Wed Nov 07 09:35:11 2007] [notice] child pid 5212 exit signal Segmentation fault (11) [Wed Nov 07 09:35:11 2007] [error] mod_fcgid: fcgid process manager died, restarting the server [Wed Nov 07 09:35:14 2007] [warn] child process 5215 still did not exit, sending a SIGTERM [Wed Nov 07 09:35:16 2007] [warn] child process 5215 still did not exit, sending a SIGTERM [Wed Nov 07 09:35:18 2007] [warn] child process 5215 still did not exit, sending a SIGTERM [Wed Nov 07 09:35:20 2007] [error] child process 5215 still did not exit, sending a SIGKILL [Wed Nov 07 09:35:21 2007] [notice] SIGHUP received. Attempting to restart [Wed Nov 07 09:35:22 2007] [notice] Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7i configured -- resuming normal operations REPEATING: [Fri Nov 02 09:44:35 2007] [notice] child pid 15402 exit signal Segmentation fault (11) [Fri Nov 02 22:07:37 2007] [notice] child pid 8105 exit signal Segmentation fault (11) [Sat Nov 03 06:54:12 2007] [notice] child pid 18200 exit signal Segmentation fault (11) [Sun Nov 04 08:47:47 2007] [notice] child pid 16715 exit signal Segmentation fault (11) [Mon Nov 05 17:32:57 2007] [notice] child pid 19469 exit signal Segmentation fault (11) [Mon Nov 05 17:43:37 2007] [notice] child pid 20147 exit signal Segmentation fault (11) [Tue Nov 06 22:32:45 2007] [notice] child pid 11595 exit signal Segmentation fault (11) [Wed Nov 07 09:35:11 2007] [notice] child pid 5212 exit signal Segmentation fault (11) 2)ARCHIE fcgid 2.1, php 5.2.4, apache 2.2.6 linux 2.6.21.7 apache error log: [Tue Nov 06 17:20:48 2007] [notice] mod_fcgid: process /home/www/domain/www/domain/index.php(14837) exit(communication error), terminated by calling exit(), return code: 0 [Tue Nov 06 17:20:48 2007] [notice] mod_fcgid: process /home/www/domain1/www/domain1/products.php(14448) exit(server exited), terminated by calling exit(), return code: 0 [Tue Nov 06 17:20:49 2007] [notice] child pid 30665 exit signal Segmentation fault (11) [Tue Nov 06 17:20:49 2007] [error] mod_fcgid: fcgid process manager died, restarting the server [Tue Nov 06 17:20:49 2007] [info] [client 88.101.163.11] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 88.101.163.11] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 86.148.163.16] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 193.179.148.50] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 85.207.91.199] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 217.197.150.162] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 88.101.163.11] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 88.101.163.11] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 148.235.92.34] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 148.235.92.34] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:49 2007] [info] [client 74.6.24.30] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:50 2007] [info] [client 88.103.116.95] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:50 2007] [info] [client 88.103.116.95] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:52 2007] [warn] child process 13513 still did not exit, sending a SIGTERM [Tue Nov 06 17:20:52 2007] [warn] child process 13567 still did not exit, sending a SIGTERM [Tue Nov 06 17:20:52 2007] [warn] child process 15113 still did not exit, sending a SIGTERM [Tue Nov 06 17:20:52 2007] [warn] child process 14651 still did not exit, sending a SIGTERM [Tue Nov 06 17:20:52 2007] [info] [client 35.13.28.229] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:52 2007] [info] [client 35.13.28.229] (9)Bad file descriptor: core_output_filter: writing data to the network [Tue Nov 06 17:20:54 2007] [warn] child process 13513 still did not exit, sending a SIGTERM [Tue Nov 06 17:20:54 2007] [warn] child process 13567 still did not exit, sending a SIGTERM [Tue Nov 06 17:20:54 2007] [warn] child process 15113 still did not exit, sending a SIGTERM
Re: [Mod-fcgid-users] Zero CONTENT_LENGTH in POST segfaults Apache
Thanks for the demo. It looks like it may be an Apache 2.0.x problem, then. Seems that there is no debugging to be got from mod_fcgid so I will need to get creative about debugging this. :-( Is there another list or forum for discussing the fcgid stuff? Ross. On Thu, 18 Oct 2007 18:10:10 +0800 (CST), #28504;#24198;#23792; [EMAIL PROTECTED] said: Hi, It's fine to me...here is how i test vi cgi-bin/test#!/bin/sh echo Content-type: text/html echo echo htmlh1Hello!/h1/html echo vi nc.txtPOST /cgi-bin/test HTTP/1.1 Host: fastcgi.coremail.cn Connection: CloseContent-Length: 0 cat nc.txt | nc 127.0.0.1 80 HTTP/1.1 200 OK Date: Thu, 18 Oct 2007 10:07:25 GMT Server: Apache/2.2.2 (Unix) Content-Length: 30 Connection: close Content-Type: text/htmlhtmlh1Hello!/h1/html -- http://www.fastmail.fm - The way an email service should be - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Need help: mod_fcgid: read timeout from pipe
See the blue note at http://www.apachelounge.com/download/ - Original Message - From: Xiaoyu Huang To: mod-fcgid-users@lists.sourceforge.net Sent: Wednesday, 10 October, 2007 11:39 Subject: [Mod-fcgid-users] Need help: mod_fcgid: read timeout from pipe I run apache_2.2.6-win32-x86-openssl-0.9.8e.msi + mod_fcgid-2.2-w32 on Windows 2003 with Visual C++ 2005 SP1 Redistributable Package. Put a index.php: ? echo phpinfo(); ? in htdocs/ and htdocs/php/. My httpd.conf: LoadModule fcgid_module modules/mod_fcgid.so LoadModule php5_module c:/php/php5apache2_2.dll PHPIniDir C:/php IfModule mod_fcgid.c DefaultInitEnv PHPRC c:/php/ DefaultInitEnv PATH c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem; DefaultInitEnv SystemRoot C:/Windows DefaultInitEnv SystemDrive C: DefaultInitEnv TEMP C:/TEMP DefaultInitEnv TMP C:/TEMP DefaultInitEnv windir C:/WINDOWS Directory C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/php/ SetHandler fcgid-script Options execCGI AllowOverride None Order allow,deny Allow from all FCGIWrapper c:/php/php.exe .php /Directory /IfModule Starting apache, visit http://127.0.0.1/index.php is ok, bug visit http://127.0.0.1/php/index.php I get error.log in apache: [Wed Oct 10 16:11:06 2007] [notice] mod_fcgid: call C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/php/index.php with wrapper c:/php/php.exe [Wed Oct 10 16:11:46 2007] [warn] mod_fcgid: read timeout from pipe [Wed Oct 10 16:11:46 2007] [error] [client 127.0.0.1] Premature end of script headers: index.php I try to use php-cgi.exe instead and get the same error.log. How can I fix it? with Best regards -- - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ -- ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users
Re: [Mod-fcgid-users] Need help: mod_fcgid: read timeout from pipe
Sorry I was no accurate: - First see the blue note at http://www.apachelounge.com/download/ , the 2.2.6 from http://httpd.apache.org is buggy - Replace SetHandler fcgid-script with: AddHandler fcgid-script .php - Replace FCGIWrapper c:/php/php.exe .php with: FCGIWrapper c:/php/php-cgi.exe .php - And remove: LoadModule php5_module c:/php/php5apache2_2.dll PHPIniDir C:/php Steffen - Original Message - From: Xiaoyu Huang To: mod-fcgid-users@lists.sourceforge.net Sent: Wednesday, 10 October, 2007 11:39 Subject: [Mod-fcgid-users] Need help: mod_fcgid: read timeout from pipe I run apache_2.2.6-win32-x86-openssl-0.9.8e.msi + mod_fcgid-2.2-w32 on Windows 2003 with Visual C++ 2005 SP1 Redistributable Package. Put a index.php: ? echo phpinfo(); ? in htdocs/ and htdocs/php/. My httpd.conf: LoadModule fcgid_module modules/mod_fcgid.so LoadModule php5_module c:/php/php5apache2_2.dll PHPIniDir C:/php IfModule mod_fcgid.c DefaultInitEnv PHPRC c:/php/ DefaultInitEnv PATH c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem; DefaultInitEnv SystemRoot C:/Windows DefaultInitEnv SystemDrive C: DefaultInitEnv TEMP C:/TEMP DefaultInitEnv TMP C:/TEMP DefaultInitEnv windir C:/WINDOWS Directory C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/php/ SetHandler fcgid-script Options execCGI AllowOverride None Order allow,deny Allow from all FCGIWrapper c:/php/php.exe .php /Directory /IfModule Starting apache, visit http://127.0.0.1/index.php is ok, bug visit http://127.0.0.1/php/index.php I get error.log in apache: [Wed Oct 10 16:11:06 2007] [notice] mod_fcgid: call C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/php/index.php with wrapper c:/php/php.exe [Wed Oct 10 16:11:46 2007] [warn] mod_fcgid: read timeout from pipe [Wed Oct 10 16:11:46 2007] [error] [client 127.0.0.1] Premature end of script headers: index.php I try to use php-cgi.exe instead and get the same error.log. How can I fix it? with Best regards - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users