Problem with PHP-IDS 0.5.3

38 views
Skip to first unread message

sascha...@googlemail.com

unread,
Dec 18, 2008, 3:01:48 AM12/18/08
to PHPIDS » Web Application Security 2.0
Hello,

I have a problem with the version 0.5.3. I use the IDS with an PHP
config array a now I get this error in the newest version of the IDS.

Fatal error: Call to a member function rowCount() on a non-object
in ...\IDS\Caching\Database.php on line 154

I've compared the older version and the new one but in this line
nothing has changed.

When I set the init for the IDS I overwrite the original config.ini of
the IDS with my config array. I've also downloaded the latest version
of the Database.php from the trunk but this doesn't worked either.

Greetings
Sascha

Mario Heiderich

unread,
Dec 18, 2008, 4:28:00 AM12/18/08
to php...@googlegroups.com
Hi!

It seems as if the $rows variable returned by the query method isn't a valid result set. Have you tried to debug it to determine the type of the variable? I cannot reproduce the error on my testsuite so I have to ask you to try it yourself and post the results.

Greetings,
.mario
--
_______________________
php-ids.org

.ﻩﻨﺮﻪﺴ

sascha...@googlemail.com

unread,
Dec 18, 2008, 5:10:41 AM12/18/08
to PHPIDS » Web Application Security 2.0
I've tryed to debug the setCache method but I think this doesn't
worked probably.

I've changed this part ' . $handle->quote($this->config['table']).' to
cache which is
the name of my caching table for the PHP-IDS but now I get this error:
PDOException: 42S02


On 18 Dez., 10:28, "Mario Heiderich" <mario.heider...@googlemail.com>
wrote:
> Hi!
>
> It seems as if the $rows variable returned by the query method isn't a valid
> result set. Have you tried to debug it to determine the type of the
> variable? I cannot reproduce the error on my testsuite so I have to ask you
> to try it yourself and post the results.
>
> Greetings,
> .mario
>
> On Thu, Dec 18, 2008 at 9:01 AM, sascha.wa...@googlemail.com <

Mario Heiderich

unread,
Dec 18, 2008, 6:34:23 AM12/18/08
to php...@googlegroups.com
This exception indicates the table doesn't exist. Did you check the connection params in your Config.ini?

PDOException: SQLSTATE[42S02]: Base table or view not found

Greetings,
.mario

--
_______________________
php-ids.org

.ﻩﻨﺮﻪﺴ

sascha...@googlemail.com

unread,
Dec 18, 2008, 6:39:54 AM12/18/08
to PHPIDS » Web Application Security 2.0
Yes I've checked my config.

This is my config array and only the caching part of it.

array(
'Caching' =>
array (
'caching' => 'database',
'expiration_time' => '600',
'path' => 'IDS/tmp/default_filter.cache',
'wrapper' => 'mysql:host=' . $cfg['sqlhost'] .
';port=3306;dbname=' . $cfg['sqldb'],
'user' => $cfg['sqlusr'],
'password' => $cfg['sqlpasswd'],
'table' => 'cache'
)
);

Is it possible that there is an error which I don't see or something
else? I've also changed the caching from database to file and this
works without any problems.

Greetings,
Sascha

On 18 Dez., 12:34, "Mario Heiderich" <mario.heider...@googlemail.com>
wrote:
> This exception indicates the table doesn't exist. Did you check the
> connection params in your Config.ini?
>
> PDOException: SQLSTATE[42S02]: Base table or view not found
>
> Greetings,
> .mario
>
> On Thu, Dec 18, 2008 at 11:10 AM, sascha.wa...@googlemail.com <

Mario Heiderich

unread,
Dec 18, 2008, 6:52:28 AM12/18/08
to php...@googlegroups.com
I have tested a bit more and could reproduce the error. Will ping you as soon as the fix is deployed.
--
_______________________
php-ids.org

.ﻩﻨﺮﻪﺴ

sascha...@googlemail.com

unread,
Dec 18, 2008, 6:56:51 AM12/18/08
to PHPIDS » Web Application Security 2.0
Thank you!

Greetings,
Sascha

On 18 Dez., 12:52, "Mario Heiderich" <mario.heider...@googlemail.com>
wrote:
> I have tested a bit more and could reproduce the error. Will ping you as
> soon as the fix is deployed.
>
> On Thu, Dec 18, 2008 at 12:39 PM, sascha.wa...@googlemail.com <

Mario Heiderich

unread,
Dec 18, 2008, 7:51:54 AM12/18/08
to php...@googlegroups.com
Found and fixed - it was a redundant table name quoting within the method preparing the INSERT query. The current trunk version contains the fix.

Thanks for reporting!

Greetings,
.mario
--
_______________________
php-ids.org

.ﻩﻨﺮﻪﺴ

sascha...@googlemail.com

unread,
Dec 18, 2008, 9:19:54 AM12/18/08
to PHPIDS » Web Application Security 2.0
Thank you, Mario. Everthing works now perfect.

Greetings,
Sascha

On 18 Dez., 13:51, "Mario Heiderich" <mario.heider...@googlemail.com>
wrote:
> Found and fixed - it was a redundant table name quoting within the method
> preparing the INSERT query. The current trunk version contains the fix.
>
> Thanks for reporting!
>
> Greetings,
> .mario
>
> On Thu, Dec 18, 2008 at 12:56 PM, sascha.wa...@googlemail.com <
Reply all
Reply to author
Forward
0 new messages