Re: image gallery not working - all paths look correct - please help!

  •  08-22-2009, 11:18 AM

    Re: image gallery not working - all paths look correct - please help!

    OK, I've made some headway partly from similar issues in other posts. It turns out the LoadHtml wasn't working either so I suspected it had something to do with the paths. I'm new to PHP but it looks like Windows (which I'm on) doesn't declare a ROOT variable. For others struggling with the same, you can declare it by pasting this at the top of the code:
     
    // let's make sure the $_SERVER['DOCUMENT_ROOT'] variable is set
    if(!isset($_SERVER['DOCUMENT_ROOT'])){ if(isset($_SERVER['SCRIPT_FILENAME'])){
    $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
    }; };
    if(!isset($_SERVER['DOCUMENT_ROOT'])){ if(isset($_SERVER['PATH_TRANSLATED'])){
    $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
    }; };
    // $_SERVER['DOCUMENT_ROOT'] is now set - you can use it as usual...

    However, gallery functions are still not working. I've tried setting all the basehref vars, both in the head, and in php, but no joy.
     
    any ideas?
     
    thanks Toby
View Complete Thread