This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

MachForm does not support latest version of PHP well?


  1. kahwee
    Member

    PHP 5.3 is out and installed in my computer. However it appears that MachForm does not support it well and has been throwing out deprecation warnings such as the following:

    Deprecated: Assigning the return value of new by reference is deprecated in /Users/kahwee/machform/includes/view-functions.php on line 1561

    There is another notice regarding strtotime.

    To reproduce this, just use PHP 5.3.

    While it is always possible to fix this by changing the syntax, this method appears to be a little hackish. It would make it harder to upgrade to newer releases of MachForm.

    Can we expect an update for PHP 5.3 users? Or is that not in the plan for MachForm.

    Thanks.

    Posted 15 years ago #
  2. kahwee
    Member

    The warning on strtotime is as follows:

    Warning: strtotime() [function.strtotime]: 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead in /Users/kahwee/machform/includes/helper-functions.php on line 38

    Thanks again.

    Posted 15 years ago #
  3. yuniar

    Hi kahwee,

    Thanks for the report.

    Those "deprecated" message aren't error actually. It's more of a warning that certain syntax won't be available anymore in the future version of PHP.

    If you are just installing PHP5, I believe you'll need to adjust your php.ini file to use the production setting, as recommended by PHP development team.

    Change the error_reporting value in your php.ini file to become like this:

    error_reporting = E_ALL & ~E_DEPRECATED

    That is the recommended setting advised by PHP team for production server, which should solve the "deprecated" message for now.

    However, we'll be investigating the whole code and make sure it will be working fine for future version of PHP, even without setting the "error_reporting" value like above.
    This should be included within the next update release soon.

    Regarding the strtotime() error message, this is not compatibility issue, but your php.ini file is missing the timezone setting. In your case, edit your php.ini and make sure you have this value being set:

    date.timezone =  "Asia/Singapore"

    MachForm Founder

    Posted 15 years ago #
  4. kahwee
    Member

    Thanks for your reply. The settings are for the development environment and I installed PHP 5.3 hence the reported deprecations. The live server doesn't show the warnings but I thought it would be better if MachForm can support it out of the box (or zip).

    Thanks for pointing out the timezone setting. :)

    Posted 15 years ago #
  5. MarioCipriano
    Member

    Hi, I had no php.ini I created one and place both the lines you suggested and I am still getting the error both on the website and in the admin panel for Mach forms.

    Strict Standards: strtotime(): 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 'America/New_York' for 'EDT/-4.0/DST' instead in /homepages/37/d276009229/htdocs/MachForms/includes/helper-functions.php on line 38

    Any suggestions?

    Posted 11 years ago #
  6. MarioCipriano
    Member

    Is there a particular place I should place this file?

    Exact contents of my new php.ini file:

    error_reporting = E_ALL & ~E_DEPRECATED
    date.timezone = "America/New_York"

    Posted 11 years ago #
  7. AMurray
    Pro Member

    Is this PHP.ini on your live server? Perhaps only your host admin can change it - not all hosts allow users to change php.ini.

    Those two lines can't be all that's in your php.ini file; there should be a lot more there. I would say there's probably a "global" php.ini (probably more applicable to shared hosting) that's over-riding your setting.

    Suggest you ask your host about this.

    Posted 11 years ago #

RSS feed for this topic

Reply