Page 1 of 1
Databases
Posted: Sun Aug 14, 2005 5:23 pm
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 ?
Re: Databases
Posted: Sun Aug 14, 2005 7:56 pm
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.
Re: Databases
Posted: Mon Aug 15, 2005 8:46 am
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.
Re: Databases
Posted: Mon Aug 15, 2005 11:35 am
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.
Re: Databases
Posted: Mon Aug 15, 2005 12:11 pm
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;)
Re: Databases
Posted: Mon Aug 15, 2005 1:12 pm
by piratos
That could not be the reason, because i never used the debugging extension too.
Re: Databases
Posted: Mon Aug 15, 2005 1:45 pm
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...
Re: Databases
Posted: Mon Aug 15, 2005 2:28 pm
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.
Re: Databases
Posted: Mon Aug 15, 2005 3:20 pm
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.
Re: Databases
Posted: Mon Aug 15, 2005 3:39 pm
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 .