Menu

directory structure

Help
2004-08-23
2004-08-25
  • Stuart Kendrick

    Stuart Kendrick - 2004-08-23

    hi,

    i'm struggling with how to install phpPgWeb ... i'm new to this php world.

    i've untarred to /srv/www/htdocs/phpPgWeb ... edited config.ini as follows:

    base=/htdocs/phpPgWeb/

    WORK_DIR=/htdocs/phpPgWeb/
    TEMPLATES_DIR=/htdocs/phpPgWeb/templates
    INCLUDE_DIR=/htdocs/phpPgWeb/include/libs

    created an .htacess file in conf to deny all GET POST PUT access to this directory .... but when i try to load myhost.company.com/phpPgWeb/html/index.php ... i see stuff like this:

    Warning: main(/htdocs/phpPgWeb/include/libs/retrocompatibilita.php): failed to open stream: No such file or directory in /srv/www/htdocs/phpPgWeb/include/init/init.php on line 57

    Warning: main(): Failed opening '/htdocs/phpPgWeb/include/libs/retrocompatibilita.php' for inclusion (include_path='/usr/share/php') in /srv/www/htdocs/phpPgWeb/include/init/init.php on line 57

    what directory structure would you recommend?

    --sk

    stuart kendrick
    fhcrc

     
    • Stuart Kendrick

      Stuart Kendrick - 2004-08-25

      ok, i've hacked a fix into place.  in ~/include/init/init.php, i've made the following modification:

      $CONFIG["TEMPLATE"]=ereg_replace("^".$this->base_url,"",$_SERVER["PHP_SELF"]);

      // Stuart's hack
      $CONFIG["TEMPLATE"]=basename($_SERVER["PHP_SELF"]);

      $CONFIG["TEMPLATE"]=preg_replace('/\.[A-z0-9]+$/',"",$CONFIG["TEMPLATE"]);
      $CONFIG["TEMPLATE"]=$CONFIG["TEMPLATES_DIR"].'/'.$CONFIG["TEMPLATE"].'.tmpl';

      i expect that there is a cleaner way to do this ... this is the first line of PHP i've ever written ... but it works.

      i also changed pgtbconf.ini to look like this:

      previous = "../html/image/previous.gif"
      next = "../html/image/next.gif"
      search = "../html/image/search.png"
      view =  "../html/image/view.png"
      edit = "../html/image/edit.png"
      delete = "../html/image/delete.png"
      select = "../html/image/select1.png"
      up = "../html/image/up.gif"
      down = "../html/image/down.gif"
      up1 = "../html/image/up1.gif"
      down1 = "../html/image/down1.gif"

      --sk

       

Log in to post a comment.

MongoDB Logo MongoDB