SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    $postcount++; koomann's Avatar
    Join Date
    Feb 2003
    Location
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Safe mode warning with putenv

    I'm fooling around with image creation in PHP, and am trying to create a very basic poll.

    I get the following error when I try to view the results:
    Warning: putenv(): Safe Mode warning: Cannot set environment variable 'GDFONTPATH' - it's not in the allowed list in /home/virtual/site11/fst/var/www/html/practice/php/show_poll.php on line 38
    And line 38 is as follows:
    PHP Code:
    putenv('GDFONTPATH=C:/WINNT/Fonts'); 
    I don't run my own server, I've purchased hosting.
    Not very sure what's wrong...that's why I'm here

  2. #2
    Must try harder! linmed01's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most servers providing shared hosting will be running in safe mode which will not allow you to set certain environment variables. This is determined by the 'safe_mode_allowed_env_vars' directive in the the php.ini or httpd.conf file on the server.


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
  •