Fatal error

4 views
Skip to first unread message

jchang

unread,
Oct 15, 2008, 2:28:22 PM10/15/08
to Dashboard Discussion
Fatal error: Cannot instantiate non-existent class: datetime in /
drupal/profiles/dashboard/modules/dashboard/dashboard.module on line
434

function _dashboard_is_expired($node)
{
$db_time = new DateTime(date('c', $node->created));


Commented out the entire section for now so I could move on but need
to have it addressed to prevent issues down the road.

Charlie Moad

unread,
Oct 15, 2008, 3:19:49 PM10/15/08
to museum-dashb...@googlegroups.com

It looks like the DateTime class was added in php-5.2.

http://us3.php.net/manual/en/function.date-create.php

You can replace "new DateTime()" with the "date_create" function.

- Charlie

Charlie Moad

unread,
Oct 15, 2008, 3:29:23 PM10/15/08
to museum-dashb...@googlegroups.com
I went ahead and committed this change, so you can just update if you are running from svn.

http://code.google.com/p/museum-dashboard/source/detail?spec=svn15&r=15#

- Charlie
Message has been deleted

jchang

unread,
Oct 15, 2008, 9:26:14 PM10/15/08
to Dashboard Discussion
When I update the dashboard.module file, I see the following error.

Fatal error: Call to undefined function: date_create() in /home/
teamhcf/public_html/drupal/profiles/dashboard/modules/dashboard/
dashboard.module on line 434

Since the site is on a web server w/ PHP 4.3.11, doesn't look like
date_create function would work. Thanks.



On Oct 15, 9:29 am, "Charlie Moad" <cwm...@gmail.com> wrote:
> On Wed, Oct 15, 2008 at 3:19 PM, Charlie Moad <cwm...@gmail.com> wrote:
> > On Wed, Oct 15, 2008 at 2:28 PM, jchang <mdo1...@gmail.com> wrote:
>
> >> Fatal error: Cannot instantiate non-existent class: datetime in /
> >> drupal/profiles/dashboard/modules/dashboard/dashboard.module on line
> >> 434
>
> >>           function _dashboard_is_expired($node)
> >>           {
> >>               $db_time = new DateTime(date('c', $node->created));
>
> >> Commented out the entire section for now so I could move on but need
> >> to have it addressed to prevent issues down the road.
>
> > It looks like the DateTime class was added in php-5.2.
>
> >http://us3.php.net/manual/en/function.date-create.php
>
> > You can replace "new DateTime()" with the "date_create" function.
>
> > - Charlie
>
> I went ahead and committed this change, so you can just update if you are
> running from svn.
>
> http://code.google.com/p/museum-dashboard/source/detail?spec=svn15&r=15#
>
> - Charlie- Hide quoted text -
>
> - Show quoted text -

Charlie Moad

unread,
Oct 16, 2008, 9:03:07 AM10/16/08
to museum-dashb...@googlegroups.com
Yes, php-5.1 is a requirement.  I'll add that to the top of the instructions page.

jchang

unread,
Oct 16, 2008, 4:33:12 PM10/16/08
to Dashboard Discussion
I moved the installation to a server with PHP 5.2.5 and as expected,
this error cleared up. :-)

Ji Sun
> > > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages