The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page