17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 3368 Views |
-
Installation Error: Cannot redeclare class Datetime

16 January 2007 at 2:06pm
Hello,
I have commented out the line of code to check the memory size as my host has stated that the memory size is 32M (although no size is reported).
I now have another error in the installation:
Fatal error: Cannot redeclare class Datetime
in /home/xxxxxxxx/public_html/silverstripe/sapphire/core/model/fieldtypes/Datetime.php on line 27Has anyone else encountered this error?
Cheers,
Gary
-
Re: Installation Error: Cannot redeclare class Datetime

16 January 2007 at 11:28pm
Hello,
It seems that the answer to this issue is located here:
http://www.php.net/UPDATE_5_2.txt'With the advent of PHP 5.2, there are object representations of the date and
timezone, named DateTime and DateTimeZone respectively. You can see the methods and constants available to the new classes by running'This class may need to be renamed.
Cheers,
Gary
-
Re: Installation Error: Cannot redeclare class Datetime

17 January 2007 at 12:17am
This would be why people complain about PHP's lack of namespace support ;-)
I'll look at renaming this class; in the meantime are you able to use PHP 5.1?
-
Re: Installation Error: Cannot redeclare class Datetime

17 January 2007 at 8:59am
Hi Sam,
I just had my host install PHP5 and they installed the latest release. They'll slap me if I ask them to revert to the earlier version.
I'll have to wait for the update - I can manually change the affected files myself if I knew what they were.
Cheers,
Gary
-
Re: Installation Error: Cannot redeclare class Datetime

18 January 2007 at 10:02pm
My host has rolled back to PHP 5.1.2 and set the memory limit in Apache and the script has now successfully installed.
Now to some playing...
-
Re: Installation Error: Cannot redeclare class Datetime

1 February 2007 at 8:04pm
We've renamed this class to SSDatetime in the latest release, due out shortly. The old Datetime class still exists, but is only defined if PHP doesn't already define it. That way, legacy code written for PHP 5.1 will still work if it used Datetime (however, it won't if the server is upgraded to 5.2 - you'll have to change to using SSDatetime for it to work then).
| 3368 Views | ||
|
Page:
1
|
Go to Top |


