Welcome to zForum
A Zope2/MySQL Based Message Board System

Latest Official zForum Version is 1.1 Revision 1
 
 
 
zForum Installation Guide (covers versions through 1.0.16)
By: speedbird
Rank: Starfleet Vice Admiral
Postings: 388
From: Las Vegas NV
Avatar
Posted: Thu Oct 19, 2006 - 10:21 AM

This document will try to outline a basic zope installation or upgrade of zForum in both a windows and linux-ish environment, the main topic will emphasis in the Linux environment, feel free to add to this document when windows-specific issues arise:

NEW INSTALLATION

Pre-Requisites

- Zope (zForum has been tested on versions 2.7, 2.8 and 2.9)
- MySQL or Postgres Database Systems (zForum has been tested on MySQL 4 and 5 and Postgres 7 and 8)
- CookieCrumbler
- mysql-python and ZMySQLDA - Python bindings for mysql and Zope Database Adaptor for MySQL if MySQL is used, OR psycopg2 and ZPsycopgDA - Python bindings for Postgres and Postgres Database Adaptor for zope id Postgres is used.

Notes:
CookieCrumbler *may* already be included in your system, especially if you have Plone installed

Database Set-Up (MySQL installation)

- Create the database that you'll use for zForum:
create database zforum_db
- Assign a user/pwd to the DB (many different ways):
grant all privileges on zforum_db.* to zforum_db_user@localhost identified by 'zforum_db_pwd';
- Read the contents of the sql schema into te newly created database: (From Products/zForum/doc/):
mysql -u zforum_db_user --password="zforum_db_pwd" zforum_db < schema_mysql.sql

zForum Set-Up

- Add it as any other regular zope product: From the ZMI, select zForum from the drop-down product list and fill in the desired values, make sure you add the appropriate database connection string, add zForum

You should be good to go.


UPGRADING

Upgrading gets a little tricky when you use zForum as a standalone product and rely on zForum's own acl_users and/or mailhosts.

Upgrading zForum in the FileSystem:

Just remove (back-up) the Products/zForum directory, and uncompress the new zope version into the same location, restart zope.

Now the "hard" part. There could be "SQL Patches" that would need to be applied, usually it is as easy as apply the SQL patch for the version of zForum you are upgrading to, however, there *might* be other patches to apply as well, please post in this forum if you are upgrading from/to using specific zForum versions.

Upgrading zForum in the Zope Mangement Interface:

- Make a copy of the site and leave it aside
- Add the new zForum instance from the product drop-down

If you have your users located in the zForum acl_users object, I recommend you remove "acl_users", "MailHost" from the NEWLY created zForum instance and COPY/PASTE them from the copy of zForum you just made

From that point, you should have an operational upgraded zForum.


Let's use this thread to specify all those pesky unique combinations or special cases to complete this post.


-- sb
By: rey
Rank: Starfleet Ensign
Postings: 3
From:
Posted: Mon Dec 11, 2006 - 12:04 PM

When upgrading the zForum MySQL schema from 1.0.8 to 1.0.16, a MySQL syntax error occurs.

I have MySQL 4.0. This error appears in the 1.0.16 schema patch.

ERROR 1064 at line 16: You have an error in your SQL syntax.  Check the manual t
hat corresponds to your MySQL server version for the right syntax to use near 's
erial not null,
  skin_name varchar(128) not null,
  is_enable


Any solutions would be great. Thanks in advance.
By: speedbird
Rank: Starfleet Vice Admiral
Postings: 388
From: Las Vegas NV
Avatar
Posted: Mon Dec 11, 2006 - 02:31 PM

"serial" is a "shortcut" for "int(11) unsigned not null primary key auto_increment" (without the quotes), I accidentally introduced that keyword without attention to certain users that might be running an "older" (in a sense) version of mysql (read 4.0 or 4.1 or previous), needless to say this has already been corrected in the documentation. Try changing the reference to "serial" to the one above in bold and see if you can manage to fix this, let me know.

-- sb
By: rey
Rank: Starfleet Ensign
Postings: 3
From:
Posted: Mon Dec 11, 2006 - 02:45 PM

yep that fixed it. thanks.
By: jolelion
Rank: Starfleet Ensign
Postings: 2
From:
Posted: Thu Mar 08, 2007 - 03:43 AM

Message has been edited, Click Here to view/hide original message

Hello , I'm new to zForum. I tried to install it (1.0.16)on my computer and I'm facing a problem.
I created the database. I run the schema_mysql.sql script and I have this error :
ERROR 1061 (42000) at line 2 in file: 'schema_mysql_patch_1.0.9.sql': Duplicate key name 'system_announcement_parent'

Does anyone has a solution for me, please?

PS: I'm sorry for my bad english Wink
By: nine
Rank: Starfleet Ensign
Postings: 4
From:
Posted: Thu Mar 08, 2007 - 06:59 AM

That's easy to fix:
just remove 259 and 260 from your zForum/doc/schema_mysql.sql file or comment them out like this:

254: SOURCE schema_mysql_patch_1.0.5.sql
255: SOURCE schema_mysql_patch_1.0.6.sql
256: SOURCE schema_mysql_patch_1.0.9.sql
257: SOURCE schema_mysql_patch_1.0.10.sql
258: SOURCE schema_mysql_patch_1.0.11.sql
259: -- SOURCE schema_mysql_patch_1.0.12.sql
260: -- SOURCE schema_mysql_patch_1.0.14.sql
261: SOURCE schema_mysql_patch_1.0.15.sql
262: SOURCE schema_mysql_patch_1.0.16.sql

the patches 1.0.12 and 1.0.14 just include the older patches. But as they are included anyway in the schema_mysql.sql file, that's not needed. So no harm in removing those two.
By: jolelion
Rank: Starfleet Ensign
Postings: 2
From:
Posted: Thu Mar 08, 2007 - 10:39 AM

I did it and it is working Cool!
thanks you Cheesy
By: mip
Rank: Starfleet Ensign
Postings: 1
From:
Posted: Wed Jun 06, 2007 - 07:43 AM

I'm trying to install version 1.0.16 but when I try to read the contents of the SQL schema into the newly created database I get the following error:

$ mysql -u zforum_db_user --password="zforum_db_pwd" zforum_db < schema_mysql.sql

ERROR 1064 (42000) at line 1 in file: 'schema_mysql_patch_1.0.12.sql': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SOURCE schema_mysql_patch_1.0.9.sql
SOURCE schema_mysql_patch_1.0.10.sql
SOURCE ' at line 1


Any ideas?
By: mrplapper
Rank: Starfleet Ensign
Postings: 1
From:
Posted: Thu Jun 21, 2007 - 04:03 AM

Hi,
I manage to get zope started up and the product installed but when I try and add a zForum item to the ZMI I get the following error:

Error Type: ExtractionError
Error Value: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/root/.python-eggs' The Python egg cache directory is currently set to: /root/.python-eggs Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory.

I am running zope behind Apache. Zope starts as root but then sets the effective user to "zope". I have tried creating the directory /root/.python-eggs and giving everyone write access but the same error results. I tried SetEnv PYTHON_EGG_CACHE /tmp in the httpd.conf but I get the same error as above still (IE SetEnv has zero effect).

I tried googling this and got some ideas from a list about using Trac and sqlite (that is where the SetEnv tip came in) but nothing in this context and nothing that has worked.

Does anyone know what is causing this and how to fix it please?

Many thanks

Russell
By: speedbird
Rank: Starfleet Vice Admiral
Postings: 388
From: Las Vegas NV
Avatar
Posted: Sat Jun 30, 2007 - 04:34 PM

You installed the EGGed version ot MySQLdb, now zope does not know where to store its temporary files, since apparently you are running zope as root (although I assume you changed the "effective-user" in zope.conf), python tries to access ~/.python-eggs

If this is the case, you can do this:

create a temp dir, say /var/zope/.python-eggs or /opt/zope/.python-eggs and make sure zope can read/write in that place..

And the "magic" trick is to add something like this in the <environment> section of your zope.conf:

<environment>
    PYTHON_EGG_CACHE /var/zope/.python-eggs
</environment>


Hope this helps.

-- sb
Welcome Anonymous User
Mon Sep 06, 2010 - 08:44
Your Options:
· Log In
· Sign Up
Quick Search:
Change Language:
 

System Announcements
 

Latest Postings