Using Gladius DB with CMSms

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
andrewg_oz
New Member
New Member
Posts: 6
Joined: Fri May 29, 2009 6:24 am

Using Gladius DB with CMSms

Post by andrewg_oz »

I've been trying to get Gladius DB to work with CMSms, but I'm having no luck so far.

Gladius DB supports ADOdb lite (which CMSms claims to support). I've successfully used Gladius DB on the same web server. However, Gladius DB does not appear on any database list during install for me to select it.

I've found database references scattered in various files, where I've tried various things:

CMSInstallPage5.class.php (add to $databases array)
test.functions.php (add to getSupportedDBDriver, add version to getTestValues)
adodb.functions.php (add require gladius.php to bring in the gladius support code, just before the required adodb light)

No matter what I do, Gladius doesn't appear in the DB drivers list on install page 2, nor on the list on page 5.

Probably the most frustrating thing is that there are no error messages, either displayed, in the generated page, or in the server logs. I've tried enabling the $debug variable in install.php, but that didn't appear to do anything.

I guess I really need CMSms to just give me some indication of what the problem is so I can fix it. Right now I'm getting the silent treatment.

Any hints, please?

FYI, CMSms is v1.5.4, Gladius DB is v0.8.1. The server is Fedora Core 5, Apache v2.2.2, PHP v5.2.6.

Thanks.
Andrew
vilkis

Re: Using Gladius DB with CMSms

Post by vilkis »

Adodb lite included in CMSMS is trimmed and supports  MySQL, MySQLi and Postgres DB only.

You have two options:

1. Replace files in \lib\adodb_lite with those of original AdoDB Lite. But read http://forum.cmsmadesimple.org/index.ph ... 043.0.html first.


2. Use Adodb full  - read http://forum.cmsmadesimple.org/index.ph ... #msg121687 for instructions.

vilkis
andrewg_oz
New Member
New Member
Posts: 6
Joined: Fri May 29, 2009 6:24 am

Re: Using Gladius DB with CMSms

Post by andrewg_oz »

Thanks for your reply.

Rather confusing then! The CMSms site doesn't mention that anywhere!

Gladius only seems to have Lite drivers. I don't know if it will work with the full Adodb, so I'll try the lite first and see if I can at least get that working.

If adodb lite does work, then I think I'll fix the exploit rather than try fiddling with the full adodb.
Andrew
vilkis

Re: Using Gladius DB with CMSms

Post by vilkis »

I don't know, but maybe you  just need to add gladius directory of original Adodblite to \lib\adodb_lite\adodbSQL_drivers

vilkis
andrewg_oz
New Member
New Member
Posts: 6
Joined: Fri May 29, 2009 6:24 am

Re: Using Gladius DB with CMSms

Post by andrewg_oz »

I've worked out why it was never showing up - Gladius isn't a PHP module and therefore will not be detected by the call to extension_loaded() in the installer. Commenting out that test allowed Gladius to show up in the list of databases. A smarter solution would be to change the installer code to:

Code: Select all

if ($extension == '' || extension_loaded($extension))
(that's line 62 in CMSInstallPage5.class.php) That way you just add the item to the list and explicitly set the extension to '' to skip the test.

The first problem I noticed was a lot of "DT" type not supported errors, which I fixed as described here.

The next problem was that Gladius doesn't support indexes. I worked around that by implementing "no-ops" for the index related commands. Relatively trivial changes.

Finally, the showstopper. Gladius only supports numeric primary keys. It seems that Gladius implements all primary keys as unique auto-incrementing numbers. That only affects one table - the siteprefs table.

And that's as far as I've taken it. If CMSms could change their siteprefs implementation to be the same as the permissions table (defined immediately before the siteprefs in schema.php) with an ID number then name, value and date fields, I think I could proceed. However, that looks to be far too extensive a change.

At this time, it looks like CMSms is unusable for me and I'll have to look elsewhere. It's a shame, as CMSms otherwise looked to have all the functionality I wanted.
Andrew
andrewg_oz
New Member
New Member
Posts: 6
Joined: Fri May 29, 2009 6:24 am

Re: Using Gladius DB with CMSms

Post by andrewg_oz »

Hmmmm.

I've barged on, removed "KEY" from the siteprefs schema (not sure what the consequences of that will be), and fixed several Gladius bugs.

Now I'm stuck on the last page where it says "Updating hierarchy positions...":
Notice: Object of class Gladius_Field could not be converted to int in /hdb/www/andrew/cms/lib/classes/class.contentoperations.inc.php on line 425

Catchable fatal error: Object of class Gladius_Field could not be converted to string in /hdb/www/andrew/cms/lib/adodb_lite/adodbSQL_drivers/gladius/gladius_driver.inc on line 219
It looks like another Gladius bug, but it's late here - I'll try again tomorrow.
Andrew
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Using Gladius DB with CMSms

Post by calguy1000 »

I would tell you to stop wasting your time.

CMSMS uses string keys everywhere... particularly in the addon modules.  and indexes are used to increase performance...
you're going to have nothing but trouble with things...

Why do you need gladius?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
andrewg_oz
New Member
New Member
Posts: 6
Joined: Fri May 29, 2009 6:24 am

Re: Using Gladius DB with CMSms

Post by andrewg_oz »

I need a CMS for a system without a "real" database - i.e. flat files only.

It sounds like CMSms just isn't going to work out for me.

Oh well. Thanks anyway.
Andrew
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Using Gladius DB with CMSms

Post by calguy1000 »

and postgress, and mysql aren't 'real databases' ?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Using Gladius DB with CMSms

Post by Nullig »

I think he's saying he can't use a REAL db like MySQL and he needs a flat file db.

Have you looked at Lanius CMS:

http://www.laniuscms.org/

I believe it supports Gladius DB.

Nullig
alby

Re: Using Gladius DB with CMSms

Post by alby »

andrewg_oz wrote: I need a CMS for a system without a "real" database - i.e. flat files only.
If you have php5, someone report CMSMS work with sqlite (CMSMS 2.0 support sqlite directly)

Alby
andrewg_oz
New Member
New Member
Posts: 6
Joined: Fri May 29, 2009 6:24 am

Re: Using Gladius DB with CMSms

Post by andrewg_oz »

Thanks for all the feedback and suggestions.

I have looked at Lanius - that's how I found Gladius in the first place! Gladius was written to support flat file DBs in Lanius (/Drake/Limbo). However I've decided that Lanius is unsuitable. It was a while back that I looked at it and from memory the poor support of "static" pages crossed it off my list.

I've looked at many other CMSs too. What brought me here was the advertised ADOdb Lite support and the fact that I knew Gladius had an ADOdb Lite driver. My initial need is to do a couple of small CMSs on extremely limited machines - not even SQLite support! I expect work in the future will involve bigger CMSs with MySQL.

Being able to settle on a single CMS that can scale from flat-file to database would have been ideal. That ideal seems to be *just* out of reach. CMSms will be at the top of my list for the database-level systems I'll be doing in the future, but for now I need flat files. I may look at Lanius again (and others, of course).

BTW, while working on the CMSms schemas and making Gladius compatible with them, I noticed that several fields use the "X" type. The documentation for ADOdb and ADOdb Lite both indicate that type is limited to 4000 characters, yet I know CMSms exceeds that easily. Shouldn't that be "XL", at least for the large content-related fields?

Thanks again.
Andrew
Locked

Return to “[locked] Installation, Setup and Upgrade”