• Resolved swldwa

    (@swldwa)


    I am working with WordPress on a local server on my PC and wish to install the MaxGalleria plugin to see if it meets my needs for a photo gallery. On trying to activate the plugin I get a PHP error “Undefined index: LOCAL_ADDR in D:\LDWA\www\wp\wp-content\plugins\maxgalleria\addons\media-sources\youtube\youtube.php on line 20”

    Line 20 of that file is:
    $this->referer = $_SERVER['LOCAL_ADDR'];

    I haven’t a clue what to do about this – and I don’t even want to use youtube!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author AlanP57

    (@alanp57)

    Ok, it is not finding that particular index. If you don’t mind replacing a few lines of code then here is the fix that will be included in the next release of MaxGalleria:

    Replace

    
        if($this->is_windows()) 
          $this->referer = $_SERVER['LOCAL_ADDR'];
        else
          $this->referer = $_SERVER['SERVER_ADDR'];
    

    with

    
        if($this->is_windows()) {
          if(isset ($_SERVER['LOCAL_ADDR']))
            $this->referer = $_SERVER['LOCAL_ADDR'];
        } else {
          if(isset($_SERVER['SERVER_ADDR']))
            $this->referer = $_SERVER['SERVER_ADDR'];
        }	
    
    Thread Starter swldwa

    (@swldwa)

    Thank you for the prompt reply. Your fix gets over that problem. I’m now having a problem with display of thumbnails, but I’ll try to sort it myself before reporting any details.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘MaxGalleria gives ‘Undefined index: LOCAL_ADDR…’ error’ is closed to new replies.