Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default PHP Warning: putenv() has been disabled for security reasons

    Hello,

    I was getting this warming in my log:

    PHP Code:
    PHP Warning:  putenv() has been disabled for security reasons in /home/MYFOLDER/public_html/includes/extra_configures/set_time_zone.php on line 28 
    I am pretty sure it's server-related.

    I uncommented lines 27 to 30 in set_time_zone.php as indicated below:
    PHP Code:
    /*  if ($TZ != '') {
        putenv('TZ=' . $TZ);
        @date_default_timezone_set($TZ);
      }
     */ 
    No more warning ... but if someone sees any reason not to do this please advise.
    Last edited by Thannaree; 2 Jan 2015 at 05:02 AM.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PHP Warning: putenv() has been disabled for security reasons

    You should instead only comment out the putenv line, not the entire "if" statement.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default Re: PHP Warning: putenv() has been disabled for security reasons

    Thank you. It works!

    Happy new year to you!

 

 

Similar Threads

  1. v139h PayPal Error After 2 Years, PHP Warning: curl_exec() has been disabled for security r
    By pinksparklegirl in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 4 Aug 2013, 02:50 PM
  2. Replies: 2
    Last Post: 21 Aug 2010, 09:13 PM
  3. Warning: ini_set() has been disabled for security reasons
    By flash in forum General Questions
    Replies: 3
    Last Post: 3 Mar 2010, 06:07 PM
  4. Replies: 19
    Last Post: 14 May 2009, 06:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR