Databases Topic is solved

General project discussion. NOT for help questions.
Post Reply

What databases are in use with the cms ?

Poll runs till Thu Apr 11, 2041 10:46 am

Mysql 3 .. 4.0
4
44%
Mysql 4.1+
5
56%
PostgreSQL 7/8
0
No votes
 
Total votes: 9

piratos

Databases

Post by piratos »

I have much trouble with adodb.
The cms doesn't work on all Webservers.
On old webservers and the newest too.
Problems with the big memory adodb eats and adodb is the only problem.

Some other very small mysql classes works with the cms much faster as adodb.
I have made the work  to change the cms to ezsql and other classes and i know what i say.

In germany no one of the big providers has PostgreSQL 7/8 in use, but all mysql.

So i ask you - have ypou Mysql or not in use with this cms ?
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: Databases

Post by petert »

I use ADODB for all my projects (20+ of which 15 professional), I never ran into the problems you keep mentioning.
On all the hard and software platforms I have access to, ADODB is a consistent perfomer, no problems at all. ADODB is a modern product, you can't expect it to work on old servers with a low memory footprint.

Your problems seem to be rare and you seem to be the only one suffering from them. Google doesn't mention any problems of the nature you describe.
Last edited by petert on Mon Aug 15, 2005 12:13 pm, edited 1 time in total.
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
piratos

Re: Databases

Post by piratos »

As one example of misfunction on Linux 2.6.11 and latest Apache, Mysql and PHP see here

http://bugs.cmsmadesimple.org/view.php?id=191

and this is one of the errors directly from adodob Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 58368 bytes) in /opt/lampp/htdocs/beta4/lib/adodb/adodb-datadict.inc.php on line 510. (try to install a module  note: i use the 0.10 final not beta).

And this is line 510:  $fprec = substr($v,$dotat+1);

With older Versions (but > as minimal requirement)  no errostr comes , but simple php statements like strpos didn't work because adodb runs out of memory and strpos (and other functions) runs into nirwana.

These cms used a hacked version of adodb (but i don't know what whishy  has hacked , it is something to make his work easier with postgresql).

The rewritten cms with mysql class from ez_sql, from xoops, phpbb and others has NO problems  - so the result for me is adodb causes the erros.
Last edited by piratos on Mon Aug 15, 2005 9:12 am, edited 1 time in total.
100rk

Re: Databases

Post by 100rk »

piratos wrote: As one example of misfunction on Linux 2.6.11 and latest Apache, Mysql and PHP see...
Hi Piratos,

I am using AdoDB on most of projects (running on different platforms) and without any similar problem, but I have seen those error messages also. All of them disappear in moment I was remove all php debug extensions from PHP configuration - Zend (I was trying it) and php-dbg (http://dd.cron.ru/dbg/). I had no time for some deep investigation, of course... ;-) One important thing: same errors I was seen (with debugger extensions) in time I was generating some documentation by phpdocumentor, which really don't using AdoDB. So I think it will be PHP configuration problem - instead of AdoDB bug.

I hope it will be helpful information.
Last edited by 100rk on Mon Aug 15, 2005 11:38 am, edited 1 time in total.
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: Databases

Post by petert »

100rk wrote: I am using AdoDB on most of projects (running on different platforms) and without any similar problem, but I have seen those error messages also. All of them disappear in moment I was remove all php debug extensions from PHP configuration - Zend (I was trying it) and php-dbg (http://dd.cron.ru/dbg/). I had no time for some deep investigation, of course... ;-) One important thing: same errors I was seen (with debugger extensions) in time I was generating some documentation by phpdocumentor, which really don't using AdoDB. So I think it will be PHP configuration problem - instead of AdoDB bug.
Great to hear that, I never use the debugging extensions. I never had the problems, this could be the reason why;)
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
piratos

Re: Databases

Post by piratos »

That could not be the reason, because  i never used the debugging extension too.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Databases

Post by Ted »

The datadict is only an extension of adodb used for creating/altering tables easily.  Even if that was causing a memory problem, we could always not use it and create tables the old fashioned way.  It's still not going to affect the general selecting/inserting/etc parts of adodb enough to switch to using something else.

However, I've never found a memory issue with datadict and I never touch my memory settings in php.ini...
piratos

Re: Databases

Post by piratos »

I have found my problem  - it is your hack.

Original

        function _query($sql,$inputarr)
{
//global $ADODB_COUNTRECS;
//if($ADODB_COUNTRECS)
return mysql_query($sql,$this->_connectionID);
//else return @mysql_unbuffered_query($sql,$this->_connectionID); // requires PHP >= 4.0.6
}
Hacked
function _query($sql,$inputarr)
{
//global $ADODB_COUNTRECS;
//if($ADODB_COUNTRECS)
              global $gCms;
              global $sql_queries;
              if ($gCms->config["debug"] == true)
              {
                      $sql_queries .= "$sql\n";
              }
return mysql_query($sql,$this->_connectionID);
//else return @mysql_unbuffered_query($sql,$this->_connectionID); // requires PHP >= 4.0.6
}

You load  global $gCms, that hold the object from adodb, in adodb  function for debug reasons. I kill that lines and my problems are killed too.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Databases

Post by Ted »

That's a little strange.  The global keyword should only make a reference to the existing object that's in memory.  Maybe making the config part a reference will help.  ($config = &$gCms->config; if ($config['debug'] == true) etc).  There really isn't much memory being used there at all, though.
piratos

Re: Databases

Post by piratos »

There really isn't much memory being used there at all, though.
Maybe , but the errors are gone. It looks more as an pointer override.

The cms is visible faster and the microtimeresults are much better.
The bug http://bugs.cmsmadesimple.org/view.php?id=191 is fixed .
Post Reply

Return to “General Discussion”