From: Michel Talon on 5 Sep 2009 10:18 O. Hartmann wrote: > 2009-09-03 19:47:49: (mod_fastcgi.c.1742) connect failed: Connection > refused on unix:/tmp/lighttpd-fastcgi-php.socket-7 Have you checked the permissions? I seem to remember i had the same problem once with lighttpd and it was because permissions of the socket under /tmp. Now my server works OK since ages. I had to take provisions for permissions in the fastcgi python responder. In my case the relevant bits are when daemonizing the responder: pid = os.fork() if pid > 0 : # In first child import time time.sleep(3) while not os.access(socket, os.F_OK) : time.sleep(1) # the socket created by the child is made accessible to the web # server os.chown(socket, wwwuid, wwwgid) os.chmod(socket, 0700) sys.exit(0) # Exit first child ..... While still being root i adjust the permissions of the socket. Then i change effective userid: ...... # And finally the routine which starts the fcgi responder, as user www os.seteuid(wwwuid) WSGIServer(request_handler, **wsgi_opts).run() ..... The complete script you can get at: http://www.lpthe.jussieu.fr/~talon/show_index.fcgi It is a simpler server than for example django if you want to understand fastcgi. By the way the aim is to display the FreeBSD ports trough a fastcgi responder. -- Michel TALON _______________________________________________ freebsd-ports(a)freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"
From: "O. Hartmann" on 5 Sep 2009 19:48 Michel Talon wrote: > O. Hartmann wrote: > >> 2009-09-03 19:47:49: (mod_fastcgi.c.1742) connect failed: Connection >> refused on unix:/tmp/lighttpd-fastcgi-php.socket-7 > > Have you checked the permissions? I seem to remember i had the same > problem once with lighttpd and it was because permissions of the > socket under /tmp. Now my server works OK since ages. I had to > take provisions for permissions in the fastcgi python responder. In my case > the relevant bits are when daemonizing the responder: > pid = os.fork() > if pid > 0 : # In first child > import time > time.sleep(3) > while not os.access(socket, os.F_OK) : > time.sleep(1) > # the socket created by the child is made accessible to the web > # server > os.chown(socket, wwwuid, wwwgid) > os.chmod(socket, 0700) > sys.exit(0) # Exit first child > .... > > While still being root i adjust the permissions of the socket. Then > i change effective userid: > > ..... > # And finally the routine which starts the fcgi responder, as user www > os.seteuid(wwwuid) > WSGIServer(request_handler, **wsgi_opts).run() > .... > > The complete script you can get at: > http://www.lpthe.jussieu.fr/~talon/show_index.fcgi > It is a simpler server than for example django if you want to understand > fastcgi. By the way the aim is to display the FreeBSD ports trough > a fastcgi responder. > > The problem seems to be APC related. I deinstalled php5-APC port, deleted the appropriate line in /usr/local/etc/php/extensions.ini and recompiled mediawiki, which has an option to use php-APC, without it. That solved the problem for me. Thanks, Oliver _______________________________________________ freebsd-ports(a)freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"
|
Pages: 1 Prev: Error when build mod_jk with apache 2.2 under FreeBSD Next: FreeBSD Port: bind96-9.6.1.1 |