ID:               20527
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Apache2 related
 Operating System: Linux 2.4.19
 PHP Version:      4CVS-2002-11-20 (dev)
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

you're most likely have a double inclusion mixup. make sure, that in
the code you run UnixDate is declared only once.


Previous Comments:
------------------------------------------------------------------------

[2002-11-20 18:51:07] [EMAIL PROTECTED]

PHP Fatal error:  Cannot redeclare unixdate() in
/web/htdocs/home/pnadodb/adodb.inc.php on line 147

Here it's the code that generate the error:
--------
        /**
         * Also in ADORecordSet.
         * @param $v is a date string in YYYY-MM-DD format
         *
         * @return date in unix timestamp format, or 0 if before
TIMESTAMP_FIRST_YEAR, or false if invalid date format
         */
        function UnixDate($v)
        {
                if (!preg_match(
"|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})|",
                        ($v), $rr)) return false;

                if ($rr[1] <= TIMESTAMP_FIRST_YEAR) return 0;
                // h-m-s-MM-DD-YY
                return mktime(0,0,0,$rr[2],$rr[3],$rr[1]);
        }
----------------
The funcion is called in this way:
---
else $d = ADOConnection::UnixDate($d);
--------

The same program works find with Apache1.3.27+php-4.2.3 

You can try this program at http://php.weblogs.com/ADODB
it's named "ADOdb Library for PHP"

Regards.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20527&edit=1

Reply via email to