phpLens
 home  products examples manual  faq support forum  contact news  login store

Forums: phplens   adodb
Forums:   ADOdb Help & Dev:   Replies 
New ReplySearch
Topic: Cannot make static method ADOConnection::UnixDate() non ...
author: lorenzo   created: 27-11-2007 09:39:00 AM
Cannot make static method ADOConnection::UnixDate() non static in class ADODB_mssql in
/var/cv/var/www/localhost/Globalnet/lib/adodb/drivers/adodb-mssql.inc.php
on line 734

ADOdb version 5.02a (adodb502a.zip)

Class ADODB_mssql extends ADOConnection and overrides some of its methods, such as UnixDate and UnixTimeStamp.
These methods are defined "static" in the superclass (ADOConnection) and ADODB_mssql redefine them as "non static".

The "Fatal error" occours when adodb.inc.php try to include
"adodb-mssql.inc.php" (line 4076):

...
$file = ADODB_DIR."/drivers/adodb-".$db.".inc.php";
@include_once($file);
$ADODB_LASTDB = $class;
...

Due to the "@" before "include_once($file)" the Fatal error is not displayed and the excution simply end.

php does not permit, explicit, to override static methods. for this reason the UnixDate and UnixTimeStamp methods should not exist in ADODB_mssql class (because they just exist in the superclass and they are defined static).

You can get the error using the testmssql.php script in adodb/tests/ directory. _Pay_attention_: remember to delete the "@" at row 4076 of file adodb.inc.php to clearly get the error message.

thank you,
lorenzo
Topic: Re:Cannot make static method ADOConnection::UnixDate() non ...
author: brandon   created: 19-02-2008 08:07:23 PM
so is there a fix for this? this bug exists in the latest version of adodb that i downloaded 5 minutes ago. how do i resolve this?
Topic: Re:Cannot make static method ADOConnection::UnixDate() non ...
author: brandon   created: 19-02-2008 08:10:27 PM
clarification. the php5 only version. the php version 4 & 5 seem to work. why is this?
Topic: Re:Cannot make static method ADOConnection::UnixDate() non ...
author: John Lim   created: 19-02-2008 10:08:53 PM
Hi, Get adodb 5.03. Fixes this issue.
Topic: Re:Cannot make static method ADOConnection::UnixDate() non ...
author: brandon   created: 20-02-2008 10:36:55 AM
so the adodb 5.04 has a regression bug?
Topic: Re:Cannot make static method ADOConnection::UnixDate() non ...
author: John Lim   created: 21-02-2008 01:30:09 AM
:) Correction:

Hi, Get adodb 5.03 or later. Fixes this issue.
Topic: Re:Cannot make static method ADOConnection::UnixDate() non ...
author: brandon   created: 21-02-2008 12:16:51 PM
I am now using the adodb-498-for-php version
but the version i had this problem with is 5.04 (the adodb-504-for-php version)

the very problem that was the start of this thread.

this was when i tried to create a sybase connection, maybe that is the missing piece of information here. I have moved on and am using the 498 version of adodb and this is working so this is just an FYI post.
Page 1
New ReplySearch

View Source

email: contact#phplens.com (change # to @)     telephone (malaysia): 60-3-7947 2888     fax (malaysia): 60-3-7947 2800