Elxis CMS Forum

Support => Installation => Topic started by: grayarti on October 02, 2008, 23:03:01

Title: Installing Elxis 2008.1 on postgreSQL database
Post by: grayarti on October 02, 2008, 23:03:01
Hello all,
I get this message when trying to install on a postgreSQL database (UNICODE Encoding). 
It installs fine on a MySQL database.
 
Fatal error: Call to undefined function elxisdbHandler() in D:\xampp\htdocs\nemesis4\includes\adodb\adodb.inc.php on line 918

Anyone else? Any Ideas?
Thanks,
Gray

Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 03, 2008, 09:20:02
Please download again Elxis 2008.1 and try with the version you just downloaded. If you wish just copy the new "installation/includes/common.php" file to your existing installation and try to re-install.

We did a "last minute" change and we forgotten to update the installer. We fixed the problem afterwards and updated the Elxis 2008.1 release.
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: grayarti on October 03, 2008, 22:06:07
Hi Datahell, thanks for your reply.
Well, the installation gets over that problem with the help you gave. thanks.
I can now get through the installation, but I get what you see in the attachment.
I am trying on a local postgre 8.3 database with UNICODE coding, but the message
refers to postgres7 ... is this a clue, maybe?
...appreciate your help!
gray

[attachment deleted by admin]
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 03, 2008, 23:44:03
The first error can be solved with a CAST.
The other errors are generated by the (ADOdb's) concat operator and needs investigation ($database->_resource->Concat). Maybe Postgre 8.3 is not supported by the latest version of ADOdb. In this case we will need to patch ADOdb. I don't know, till I check it thoroughly I can not tell.

Can you install Elxis 2008.0 on postgreSQL and tell me if you face the same errors?
I will look up postgre in the next days but if you do that check it will save me some time.
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: grayarti on October 04, 2008, 00:17:11
Hi again Datahell,
2008.0 installs ok on my postgresql 8.3, and everything works fine. The only bug I've seen, is when
I go to change the admin name, I get an error, but when I get back in, the name has been updated,
so that's no real problem.
The 2008.1 version works fine using a Mysql DB so I'll use that, but it would be great to get Postgresql
working, as that's what I'll be using for my online site.
Thanks again, nice work!
Gray
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 05, 2008, 11:32:32
Elxis 2008.1 uses a newer version of ADOdb. We did nt do many tests with Elxis 2008.1 and postgre as it was working fine on 2008.0 and thought that it will be the same for 2008.1. We will fix Elxis - Postgre compatibility soon.

One of the bigest problems with postgre and Oracle is that some third party modules/component maybe wont work with them. If you want to install third party applications and want to be sure that everything will work fine use mysql...
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: grayarti on October 05, 2008, 14:22:29
Hi again Datahell,
... that is an important point, about the third party component compatability, something that users will want to take notice of, when deciding which DB to base their Elxis projects on!
... That's not particularly worrying to me, personally, as I'm using Elxis native components only, but I'm still  just messing about to see the differences, still undecided about postgre, would you personally recommend Mysql over postgreSQL Datahell?
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: turno on October 20, 2008, 17:23:53
Hi,
I have just downloaded Elxis 2008.1 and I am experiencing the same problems as described above (many syntax errors with PostgreSQL 8.3), making this version unusable with PostgreSQL. Elxis 2008.0 worked (nearly) flawlessly in this respect. Since the above posts are a couple of weeks old, is there any progress in fixing those bugs or is it advisable to switch to MySQL for the time being? In the latter case, I think it would be fair to put a notice in the main web page, to warn about PostgreSQL support (temporarily) broken.

I would also like to point out another potential bug with PostgreSQL: in my installations (under Mac OS X and Ubuntu Linux), connections to the database server are not closed properly (possibly as a consequence of the above errors...), so every time I access my website, a new postgres process is forked on the server, which runs forever.

Regards

Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 20, 2008, 18:07:04
I am sorry for the delay in releasing a patch for postgreSQL. Give us 3-5 days and a patch will be released.
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: turno on October 20, 2008, 18:33:19
Glad to hear that! :) Looking forward to trying the updated version!

Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 21, 2008, 14:06:03
Elxis - PostgreSQL compatibility fixed. Elxis 2008.1 now works perfect with PostgreSQL (tested with version 8.3.4).
We will release a patch very soon and we will also update Elxis 2008.1 main release.

This patch also fixes some other minor bugs (such as htaccess that did not worked under some server environments)
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: turno on October 23, 2008, 17:56:21
I have just applied the patch and I confirm that everything seems to work fine now  ;)

Great  :)
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 23, 2008, 18:57:04
Nice to hear that!  :)

turno if you find a spot where there is a problem with postgresql that we did nt notice, please inform me to fix it.
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: grayarti on October 23, 2008, 20:49:53
Hello again Datahell,
I just wanted to let you know that I have successfully installed today's release, using a postgreSQL DB.
My compliments!
There WERE a few error messages, that maybe you would like to see?
These are not blocking errors, the installation goes ahead fine, and to me it just looks like it is just trying
to re-create tables twice, that already exist (IT: esiste giĆ ), but I thought I would let you know about this
anyway.   This CMS just gets better and better!
Many thanks, Gray.

[attachment deleted by admin]
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 23, 2008, 23:27:12
I know about these errors, I saw them during test installations and tried to fix them but they come from inner adodb library and i did nt had enough time to find out what causes them. There are not important, just warnings about some indexes. Don't worry.
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: turno on October 30, 2008, 12:28:24
I get the following errors at Database manager -> Monitor tables:

Bad $rs in rs2html. Connection or SQL invalid. Try using $connection->debug=true;

At Archive manager a get an error and two php warnings:

URI: index2.php?option=com_content&task=showarchive&sectionid=0
Message: ERROR: operator does not exist: character varying = integer LINE 2: INNER JOIN elx_sections s ON s.id::VARCHAR = c.sectionid ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
SELECT c.created_by AS value, u.name AS text FROM elx_content c INNER JOIN elx_sections s ON s.id::VARCHAR = c.sectionid LEFT JOIN elx_users u ON u.id = c.created_by WHERE c.state = '-1' GROUP BY c.created_by, u.name ORDER BY u.name

URI: index2.php?option=com_content&task=showarchive&sectionid=0
Path: /administrator/components/com_content/admin.content.php
Line: 444
array_merge() [function.array-merge]: Argument #2 is not an array

URI: index2.php?option=com_content&task=showarchive&sectionid=0
Path: /includes/Core/elxis.php
Line: 1190
reset() [function.reset]: Passed variable is not an array or object

The most serious bug (still present), however, is that connections to the database are not properly closed: try to monitor your processes while you navigate through your website and you will see more and more postgres daemons. Can you please verify and correct that? That might eventually crash the server...
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 30, 2008, 13:30:27
How to fix this error
Open administrator/components/com_content/content.php file
Go to line 434

Change this:
$query .= "\n INNER JOIN #__sections s ON s.id::VARCHAR = c.sectionid";
To this:
$query .= "\n INNER JOIN #__sections s ON s.id::VARCHAR = c.sectionid::VARCHAR";

Save the file, done.


Elxis uses persistent connections. If you don't want this you can change PConnect to Connect in includes/Core/database.php

$con = $this->_resource->PConnect($host, $user, $pass);

The connection is controlled by adoDB. As I am not a postgreSQL expert if you have any recommendations on making PostgreSQL support better I will be glad to see them.

I just tested the postgre processes on my local windows machine. I see that the number of the processes does not get increased during elxis browsing. in my tests: when I start the postgre server and without visiting elxis I have 8 processes (I think this comes from php.ini, the 8 processes are generated to be ready to serve user requests - due to persistence connection) and when I visit elxis these are, normally, increased to 9 and stay there regardless how many clicks I do.
Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: turno on October 31, 2008, 12:14:47
Thanks for clarifying about persistent connections: you're perfectly right  :) Sorry for mistakenly reporting a bug.

I have fixed the error in the Archive Manager, but not the error in the Database Manager. I have set $connection->debug = true in abodb.inc.php and now I get a more explicit error message:

URI: index3.php?option=com_database&task=monexec&do=tables
Message: ERROR: function pg_catalog.btrim(oid) does not exist LINE 2: on b.relname = 'pg_toast_'||trim(a.relfilenode) ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
select a.relname as tablename,(a.relpages+CASE WHEN b.relpages is null THEN 0 ELSE b.relpages END+CASE WHEN c.relpages is null THEN 0 ELSE c.relpages END)*8 as size_in_K,a.relfilenode as "OID" from pg_class a left join pg_class b on b.relname = 'pg_toast_'||trim(a.relfilenode) left join pg_class c on c.relname = 'pg_toast_'||trim(a.relfilenode)||'_index' where a.relname in (select tablename from pg_tables where tablename not like 'pg_%') order by 1

Bad $rs in rs2html. Connection or SQL invalid. Try using $connection->debug=true;

Can this be easily fixed as well?

Title: Re: Installing Elxis 2008.1 on postgreSQL database
Post by: datahell on October 31, 2008, 13:23:55
I saw the error yesterday, and you are absolutely right.
The error derives from the adodb's perfmonitor (includes/adodb/adodb-perf.inc.php) which is an external class and not from Elxis itself.
This feature has nothing to do with Elxis functionality. So you have no problem even if it is not working. You can live without tables monitoring feature, 99.99% of the Elxis users have never even seen this page... Besides this, i will try to fix it.

Elxis 2008.1 works fine with postgreSQL.
Here is my testing enviroment:

DataBase Type     postgres7
Database Description    PostgreSQL 8.3.4, compiled by Visual C++ build 1400
Database Version    8.3.4
Database Host    localhost
Database Name    elxis20081
User    postgres
Raise Error FN    elxisdbHandler
Debug    No