Hi, I just installed FastCGI-2.4.0-12 and add manually my mod_fastcgi.conf then restart apache. I got this error # /etc/init.d/apache2 restart Syntax error on line 1 of /etc/apache2/conf.d/mod_fastcgi.conf: Invalid command 'FastCgiIpcDir', perhaps misspelled or defined by a module not included in the server configuration Right, as if the module hasn't been installed yet. Here's the configuration file: ==== FastCgiIpcDir /tmp FastCgiExternalServer /srv/www/htdocs/zope \ -socket zope.soc \ -pass-header Authorization ==== Did i miss something during installation? I know there's apache2-mod_fcgid package, but it's not fast_cgi, as the description said, "Alternative FastCGI module for Apache2". I need fast_cgi because i want to integrate zope to apache and there's no manual doing that with apache2-mod_fcgid. I'm using 10.1 on i686. Please help. Regards, Adinda Praditya
FastCGI on Zope is obsolete and deprecated. Follow the common way and use Apache or Squid as reverse proxy. -aj --On 15. Juni 2006 16:54:40 +0700 Adinda Praditya <apraditya@gmail.com> wrote:
Hi,
I just installed FastCGI-2.4.0-12 and add manually my mod_fastcgi.conf then restart apache. I got this error
# /etc/init.d/apache2 restart Syntax error on line 1 of /etc/apache2/conf.d/mod_fastcgi.conf: Invalid command 'FastCgiIpcDir', perhaps misspelled or defined by a module not included in the server configuration
Right, as if the module hasn't been installed yet. Here's the configuration file:
==== FastCgiIpcDir /tmp FastCgiExternalServer /srv/www/htdocs/zope \ -socket zope.soc \ -pass-header Authorization ====
Did i miss something during installation? I know there's apache2-mod_fcgid package, but it's not fast_cgi, as the description said, "Alternative FastCGI module for Apache2". I need fast_cgi because i want to integrate zope to apache and there's no manual doing that with apache2-mod_fcgid. I'm using 10.1 on i686. Please help.
Regards,
Adinda Praditya
-- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting
Aloha, I have a python script, getCatalogItems(), which returns a (possibly empty) list resulting from a catalog query. The lone parameter is the sort index; the rest of the query is taken from the request. Anyhow... If nothing was found, I don't want to display an empty table of results. When I do this query and then check for empty list to see if the query returned any items: <div tal:define="items python:container.getCatalogItems('id')"> <table tal:condition="python: items!=[]"> ... ...it doesn not work, that is, the (empty) table displays when items is in fact an empty list. If I do this instead: <div tal:define="items python:container.getCatalogItems('id')"> <table tal:condition="python: len(items)>0"> ... ...then the condition works, no empty table is displayed if the list is empty. Why does the former not work and the latter does? I need to understand the difference in the python expressions...makes no sense to me at present that they don't work the same. thanks for any help, John S. -- John Schinnerer - MA, Whole Systems Design ------------------------------------------ - Eco-Living - Whole Systems Design Services People - Place - Learning - Integration john@eco-living.net http://eco-living.net
John Schinnerer wrote:
Aloha,
I have a python script, getCatalogItems(), which returns a (possibly empty) list resulting from a catalog query. The lone parameter is the sort index; the rest of the query is taken from the request. Anyhow... If nothing was found, I don't want to display an empty table of results.
When I do this query and then check for empty list to see if the query returned any items:
<div tal:define="items python:container.getCatalogItems('id')"> <table tal:condition="python: items!=[]"> ...
...it doesn not work, that is, the (empty) table displays when items is in fact an empty list.
If I do this instead:
<div tal:define="items python:container.getCatalogItems('id')"> <table tal:condition="python: len(items)>0"> ...
...then the condition works, no empty table is displayed if the list is empty.
Why does the former not work and the latter does? I need to understand the difference in the python expressions...makes no sense to me at present that they don't work the same.
Well, thats because getCatalogItens() does not return a list. It might look and work like it, but it isnt the same class. Python defines comparisions between different classes as always false. Easier in your case would be just: tal:condition="items" non empty python objects are usually logically True. Regards Tino
Aloha, Thanks, I understand...though it's a bit annoying that it looks and acts just like a list but "isn't"... Just using "items" does work. I figured it would work for True when not empty...I wasn't so sure what it would return when empty, as sometimes the test seems to be on 'exists' rather than 'empty', depending on the type of object. At least I grok this particular case now, thanks again... cheers, John S. Tino Wildenhain wrote:
John Schinnerer wrote:
Aloha,
I have a python script, getCatalogItems(), which returns a (possibly empty) list resulting from a catalog query. The lone parameter is the sort index; the rest of the query is taken from the request. Anyhow... If nothing was found, I don't want to display an empty table of results.
When I do this query and then check for empty list to see if the query returned any items:
<div tal:define="items python:container.getCatalogItems('id')"> <table tal:condition="python: items!=[]"> ...
...it doesn not work, that is, the (empty) table displays when items is in fact an empty list.
If I do this instead:
<div tal:define="items python:container.getCatalogItems('id')"> <table tal:condition="python: len(items)>0"> ...
...then the condition works, no empty table is displayed if the list is empty.
Why does the former not work and the latter does? I need to understand the difference in the python expressions...makes no sense to me at present that they don't work the same.
Well, thats because getCatalogItens() does not return a list. It might look and work like it, but it isnt the same class. Python defines comparisions between different classes as always false.
Easier in your case would be just:
tal:condition="items"
non empty python objects are usually logically True.
Regards Tino _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- John Schinnerer - MA, Whole Systems Design ------------------------------------------ - Eco-Living - Whole Systems Design Services People - Place - Learning - Integration john@eco-living.net http://eco-living.net
participants (4)
-
Adinda Praditya -
Andreas Jung -
John Schinnerer -
Tino Wildenhain