Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Issue with PHP 5.4.17

Discussion in 'General Discussion' started by TapanB, Aug 2, 2013.

  1. TapanB

    TapanB Active Member

    Joined:
    Nov 29, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    I was running php 5.3.27 and using EasyApache I upgraded to 5.4.17.
    But as soon as I upgraded the putenv command stopped working.

    Stopped working in the sense that it was not changing the timezone as it used to.

    Hence when i downgraded back to 5.3.27 it again started working.
    There was no error message whatsoever. Hence I am not sure why it was not working.

    I was simply doing $res = putenv ("TZ=Europe/London"); and it was returning 1.
    So i assume that it ran successfully but it was not changing the timezone as it was expected to do so.

    What is the issue ????

    Thanks.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    The "putenv" feature was removed by PHP in PHP 5.4 per:

    PHP 5 Change Log

    Removed support for putenv("TZ=..") for setting the timezone.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. TapanB

    TapanB Active Member

    Joined:
    Nov 29, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    Why its not throwing error that invalid function etc. instead of returning 1 ?

    Thanks.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I was not able to find any documentation on the PHP website to determine if that was the intended behavior after support was removed for this function. You may want to submit a bug report directly to PHP via:

    PHP - Submit A Bug Report

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice