Installation with Oracle
Posted: Thu Sep 20, 2007 9:38 am
Hi there,
this subject has been raised already, but in another, much less appropriate place (Accessibility forum), so it didn't get much attention. Hence, I'm raising it again here.
I would like to install CMS Made Simple and configure it to work with Oracle. So, what I did was install it on MySQL (btw it would really be cool if the installer supported AdoDB too), then duplicated everything I could to an Oracle scheme. I'm not saying "everything" because there were a few problems, namely, a name of the table "cms_additional_htmlblob_users_seq" was too long (33 chars, while Oracle seems to have a limit of 30 characters for table/sequence names). Anyway, after duplicating all the data, I configured cmsms the following way:
Now the problem. CMSMS actually works with such configuration, but not fully. It reads and displays the content (or at least pages) appropriately, and it also allows to edit content. However, whenever I try to create NEW content, I get a following warning from PHP:
The question is – what should I do to solve this problem? I'll be gratefull for any help.
Versions: CMSMS 1.1, PHP 4.4.7, OCI8 module $Revision: 1.183.2.18.2.4 $, AdoDB 4.94, SunOS 5.9.
this subject has been raised already, but in another, much less appropriate place (Accessibility forum), so it didn't get much attention. Hence, I'm raising it again here.
I would like to install CMS Made Simple and configure it to work with Oracle. So, what I did was install it on MySQL (btw it would really be cool if the installer supported AdoDB too), then duplicated everything I could to an Oracle scheme. I'm not saying "everything" because there were a few problems, namely, a name of the table "cms_additional_htmlblob_users_seq" was too long (33 chars, while Oracle seems to have a limit of 30 characters for table/sequence names). Anyway, after duplicating all the data, I configured cmsms the following way:
Code: Select all
define('ADODB_ASSOC_CASE', 0); # required to get table and column names in lowercase
$config['dbms'] = 'oci8po'; # ADOdb calls it "portable version of oci8 driver"
$config['db_hostname'] = false; # read adodb-oci8.inc.php for more info about connection modes
$config['db_username'] = 'scheme_name';
$config['db_password'] = 'password';
$config['db_name'] = 'service_name'; # from tnsnames.ora
$config['use_adodb_lite'] = false;
Well, the second error is a bit strange, but the first one causes me real problems. Here's what debug output below says about it:Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-01841: (full) year must be between -4713 and +9999, and not be 0 in /path/to/cmsms/lib/adodb/drivers/adodb-oci8.inc.php on line 1026
adodb_oci8po._execute(INSERT INTO cms_content (content_id, content_name, content_alias, type, owner_id, parent_id, template_id, item_order, hierarchy,..., Array[23]) % line 765, file: adodb-oci8.inc.php
adodb_oci8po.execute(INSERT INTO cms_content (content_id, content_name, content_alias, type, owner_id, parent_id, template_id, item_order, hierarchy,..., Array[23]) % line 1130, file: class.content.inc.php
content.insert() % line 943, file: class.content.inc.php
content.save() % line 287, file: addcontent.php
Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-00933: SQL command not properly ended in /path/to/cmsms/lib/adodb/drivers/adodb-oci8.inc.php on line 1026
adodb_oci8po._execute(SELECT * FROM cms_module_search_items WHERE
extra_attr = ? AND content_id = ? LIMIT 1, Array[2]) % line 765, file: adodb-oci8.inc.php
adodb_oci8po.execute(SELECT * FROM cms_module_search_items WHERE
extra_attr = ? AND content_id = ? LIMIT 1, Array[2]) % line 408, file: Search.module.php
search.doevent(Core, ContentEditPost, Array[1]) % line 129, file: class.events.inc.php
events.sendevent(Core, ContentEditPost, Array[1]) % line 955, file: class.content.inc.php
content.save() % line 287, file: addcontent.php
Meanwhile here's an example of a working statement that succeedes:(oci8po): INSERT INTO cms_content (content_id, content_name, content_alias, type, owner_id, parent_id, template_id, item_order, hierarchy, id_hierarchy, active, default_content, show_in_menu, cachable, menu_text, markup, metadata, titleattribute, accesskey, tabindex, last_modified_by, create_date, modified_date) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [ (0=>'142') (1=>'testuuuuukas') (2=>'testuuuuukas') (3=>'content') (4=>'1') (5=>'52') (6=>'20') (7=>'3') (8=>'') (9=>'') (10=>'1') (11=>'0') (12=>'1') (13=>'1') (14=>'testuuuuukas') (15=>'html') (16=>'') (17=>'') (18=>'') (19=>'') (20=>'1') (21=>'TO_DATE('2007-09-20, 10:53:11 AM','RRRR-MM-DD, HH:MI:SS AM')') (22=>'TO_DATE('2007-09-20, 10:53:11 AM','RRRR-MM-DD, HH:MI:SS AM')') ]
Comparing these two statements, I get to think that my problem (the content isn't being added to the cms_content table) is caused by the fact that in the first (non-working) case both "TO_DATE" parameters are passed in the parameter array as strings, hence Oracle sees them as strings and not TO_DATE calls. But I may be wrong here.(oci8po):
INSERT INTO cms_content_props
(
content_id,
type,
prop_name,
param1,
param2,
param3,
content,
modified_date
)
VALUES
(
?,?,?,'','','',?,TO_DATE('2007-09-20, 12:32:18 PM','RRRR-MM-DD, HH:MI:SS AM')
)
[ (0=>'143') (1=>'string') (2=>'content_en') (3=>'<p>Informacija šiuo metu rengiama.</p>') ]
The question is – what should I do to solve this problem? I'll be gratefull for any help.
Versions: CMSMS 1.1, PHP 4.4.7, OCI8 module $Revision: 1.183.2.18.2.4 $, AdoDB 4.94, SunOS 5.9.