Loading...
 

Oracle9iInstall

Overview

I am installing Tikiwiki on Oracle 9i Release 2. Most of this stuff should work with older versions of Oracle including 8.1.7.

I took a snapshot of the CVS on Jan 19, 2004 (~09:10 PST). I finally got it working after making changes to SQL scripts and some PHP files. Still, I get some ORA error once in a while. It's working partially. I have a modified create script tiki-1.8-oci8-create.sql to create the schema. Should you get any error in your log, when you run this script, either you or I have made a mistake.

Long table names

tiki_live_support_message_comments
tiki_content_templates_sections

Due to tiki_content_templates_sections tiki-admin_html_pages.php and other related pages would not work. You can fix the page by changing the table name if you need it. I didn't investigate the impact of tiki_live_support_message_comments table but I am reasonably certain that it will not work either.


Note: There are several other objects such as sequences and triggers with long names. I changed them so that script would execute normally. These 'other objects' are not used in PHP code. So, life is easy.

Notes on Changes Made to SQL Script

tiki_live_support_message_comments table is name is changed to tiki_live_supp_msg_commnts

tiki_content_templates_sections table is name is changed to tiki_content_templates_sections

All the DROP TABLE statements are deleted

All instances of CREATE TRIGGER is changed to CREATE OR REPLACE TRIGGER

All CREATE INDEX on clob types are commented out with clob_index string

The type of "source" in "tiki_language" and "tiki_untranslated" tables definition is changed to "raw(255) NOT NULL" from "blob NOT NULL". RAW type in Oracle is compatible with BLOB and it can to used in a primary key. Use URL_RAW.CAST_TO_RAW(VARCHAR2) to insert text into RAW type.

Following Insert statements are fixed such that they complete normally. The first three inserts text into BLOB type. The fourth one uses '' to insert ' char into the database.
'
('1','1','1',utl_raw.CAST_TO_RAW('.*]*?>(.*?) tags');

INSERT INTO tiki_integrator_rules VALUES ('2','1','2',utl_raw.CAST_TO_RAW('img src=("|'')(?!http://)'),utl_raw.CAST_TO_RAW('img src=1{path}/'),'y','n','i','y','Fix images path');

INSERT INTO tiki_integrator_rules VALUES
('3','1','3',utl_raw.CAST_TO_RAW('href=("|'')(?!(--|(http|ftp)://))'),
utl_raw.CAST_TO_RAW('href=1tiki-integrator.php?repID={repID}&'||'file='),
'y','n','i','y','Relace internal links to integrator. Dont touch an external links.');

INSERT INTO tiki_quicktags (taglabel,taginsert,tagicon) VALUES ('italic','''''text''''','images/ed_format_italic.gif');

Drop Schema Objects

You could use drop user tikischema cascade to drop the entire schema. If you don't have DBA privileges. Then you can run tiki-1.8-oci8-drop.sql script to drop the schema objects. Again, you should not get any error in your log. If you get either you are in error.

PHP Files Changes:
This is work in progress. I got the workflow run quite smoothly after making huge amount of chnages to some files. To apply patch, unzip the file to the root of of your wiki installation. Click here to download the patch.

Known issues

I will post any errors I encounter beyond this patch here.

Search (using search_new) doesn't work. Always returns zero hits.

Attach files in Wiki pages doesn't work.
Warning: oci8 error: ORA-01465: invalid hex number in query:
insert into "tiki_wiki_attachments"("page","filename","filesize","filetype","data","created","downloads","user","comment","path") values(:0,:1,:2,:3,:4,:5,0,:6,:7,:8)

Uploading files to File gallery fails with similar error.
Warning: oci8 error: ORA-01465: invalid hex number in query:
insert into "tiki_files"("galleryId","name","description","filename","filesize","filetype","data","user","created","downloads","path","hash") values(:0,:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)

PDF Generation of Pages Fails
Notice: Undefined index: notin in wiki\lib\htmlparser\htmlparser.inc on line 393

Warning: Cannot modify header information - headers already sent by (output started at wiki\lib\htmlparser\htmlparser.inc:393) in wiki\lib\pdflib\class.pdf.php on line 1916

Warning: Cannot modify header information - headers already sent by (output started at wiki\lib\htmlparser\htmlparser.inc:393) in wiki\lib\pdflib\class.pdf.php on line 1917

Warning: Cannot modify header information - headers already sent by (output started at wiki\lib\htmlparser\htmlparser.inc:393) in wiki\lib\pdflib\class.pdf.php on line 1919

Suggested Changes

value field in tiki_tracker_item_fields table could be changed to VARCHAR2(4000) since it appears in the where clause of some queries. It's fixed such that Preferences work. I have implemented a hack by using to_char(CLOB) in the patch.

In certain quries inside Workflow lib PHPs, I ran into ORA-00918: column ambiguously defined in query. It was an interesting problem to fix since I didn't get the same error when I ran the queries using SQLPlus. After a while, I figured out the subtle reason well articulated in at this page. I renamed the duplicate variables with 'varname_' and the error was gone. I can't explain why there is no error when SQLPlus was used. It could be the difference between OCI used by PHP and SQLPlus.

tiki-webmail.php tries to insert "yes" "no" string into "tiki_user_mail_accounts" which is CHAR(1) ERROR: ORA-01401: inserted value too large for column. I expect this to be a generic problem. Perhaps the following files needs to be changed.
wiki/templates/tiki-admin_mailin.tpl
wiki/templates/tiki-webmail.tpl

In wiki/lib/userfiles/userfileslib.php
$query = "delete from `tiki_userfiles` where `user`=? and fileId=?";
should be changed to (missing ` around fileId)
$query = "delete from `tiki_userfiles` where `user`=? and `fileId`=?";

wiki/lib/usermenu/usermenulib.php inside get_max_position($user) function
"select max(position) from `tiki_user_menus` where `user`=?"
should be changed to (missing ` around position)
"select max(`position`) from `tiki_user_menus` where `user`=?"

wiki/lib/wiki/wikilib.php inside wiki_attach_file function
$query = "insert into tiki_wiki_attachments(page,filename,filesize,filetype,data,created,downloads,user,comment,path) values(?,?,?,?,?,?,0,?,?,?)";
should be changed to (missing `)
$query = "insert into `tiki_wiki_attachments`(`page`,`filename`,`filesize`,`filetype`,`data`,`created`,`downloads`,`user`,`comment`,`path`) values(?,?,?,?,?,?,0,?,?,?)";


Besides, there are hundreds of changes in Workflow files. Please do diff if you want to see the changes. It's not possible to list all of them here.

Created by: Last Modification: Monday 20 November 2023 17:36:49 GMT-0000 by Victor Emanouilov
List Slides