date() error on install

Issue #90 closed
Tasneem Rangoonwala created an issue

I have installed openbiblio 0.7.1, with php 5.4.11 and mysql 5.5.29 on windows vista home premium, iis7.
On going to http://openbiblio/install, I get this error:
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\openbiblio\install\index.php on line 23

I have added the http://openbiblio hostname in IIS and host file.
Please help.

Comments (8)

  1. Tasneem Rangoonwala reporter

    OK, somehow, the above error went away, after I refreshed the page. Now the page says:
    OpenBiblio Installation:

    Database connection is good.
    Building OpenBiblio tables, please wait...
    Database Query Error - You've Probably Found a Bug

    Database query failed

    Please give all the information on this page to your support personnel.

    Query insert into biblio_status_dm values ('in','checked in','Y') failed. The DBMS said this:

    Duplicate entry 'in' for key 'PRIMARY'
    Debug Backtrace (most recent call first):

    C:\openbiblio\classes\Error.php:137 FatalHandler->printBackTrace()
    C:\openbiblio\classes\Error.php:105 FatalHandler->dbError('insert into biblio_status_dm values (\'in\',\'checked in\',\'Y\')', 'Database query failed', 'Duplicate entry \'in\' for key \'PRIMARY\'')
    C:\openbiblio\classes\Query.php:91 Fatal->dbError('insert into biblio_status_dm values (\'in\',\'checked in\',\'Y\')', 'Database query failed', 'Duplicate entry \'in\' for key \'PRIMARY\'')
    C:\openbiblio\classes\Query.php:266 Query->_act('insert into biblio_status_dm values (\'in\',\'checked in\',\'Y\')')
    C:\openbiblio\classes\Query.php:271 Query->_exec('insert into biblio_status_dm values (\'in\',\'checked in\',\'Y\')')
    C:\openbiblio\classes\InstallQuery.php:130 Query->exec('insert into biblio_status_dm values (\'in\',\'checked in\',\'Y\')')
    C:\openbiblio\classes\InstallQuery.php:96 InstallQuery->executeSqlFile('../locale/en/sql/0.7.1/domain//biblio_status_dm.sql', '')
    C:\openbiblio\classes\InstallQuery.php:85 InstallQuery->executeSqlFilesInDir('../locale/en/sql/0.7.1/domain/', '')
    C:\openbiblio\install\install.php:69 InstallQuery->freshInstall('en', false)

    please look into this.

  2. Hans van der Weij

    Fix for first issue: set date.timezone

    I recommend to set date.timezone in PHP.INI and to restart the webserver.
    An alternative is adding a line in openbiblio/shared/common.php: date_default_timezone_set('timezone');

    The OpenBiblio installer is supposed to show a message when date.timezone is not configured. Perhaps that is not very elegant and it seems that this does not work for your system / configuration. Anyway, starting from PHP 5.3 date.timezone should be specified to avoid OpenBiblio issue #15.

    Fix for second issue (Duplicate entry)

    I'm not sure what has caused this. Because this is a new install and not an upgrade, it is probably best to DROP the OpenBiblio database completely and to CREATE it again.

  3. Tasneem Rangoonwala reporter

    Thank you for getting back so promptly.
    Both the issues went away after a reboot, without me doing anything. Though I did change the date.time in php.ini.
    The program is working fine now.

  4. Hans van der Weij

    I can't test on IIS. Perhaps some of the errors are related to this environment. But I can not imagine that the "Duplicate entry" error would go away after a reboot.

    Anyway I'm glad it's working for you now. And feedback on IIS related problems is appreciated.

  5. Tasneem Rangoonwala reporter

    (Reply via

    Hi Hans

    Yes, the program is working fine. Our librarian is still cataloging the
    materials, and we still have to try out the circulation and other admin
    Since we are not yet into the circulation yet, I dont know if we would have
    the same error as the post. The error I got was originally immediately
    after installation. It went away after a reboot, and has not yet returned.

    On Thu, Jan 31, 2013 at 12:58 PM, Hans van der Weij wrote:

  6. Log in to comment