Menu

installation files in config_template

Developers
2001-10-15
2001-10-15
  • Gerald Weber

    Gerald Weber - 2001-10-15

    I have corrected (I hope) the files in config_template which had explicit links to
    the directory "/usr/local/httpd/htdocs" to
    $localdir generated in install.php.
    The httpd document root directory is different
    depending on the linux distro.

    I've tested them in a new installation of sidb
    (however with postgresql already installed) and
    it seemed OK.

    This was my first use of the "commit" cvs command,
    hope I did it right.

    regards

    Gerald

     
    • Gerald Weber

      Gerald Weber - 2001-10-15

      I think I was somewhat rash commiting these changes. When I exited the browser and tried
      to access sidb again I received all sorts of
      error messages since the meaning of $localdir
      had expired. I should have known it could not be that easy. Actually it seems that the "changeline"
      command in install.php which sets $include_dir
      in config_inc.php is not working correctly.
      If the installation is in /usr/local/httpd/htdocs
      this would have no effect at all.

      I suggest that you remove the 3 files I've sent
      to CVS until I (or you) have a better idea
      of what is happening.

      sorry for my clumsiness

       
      • Nico Stuurman

        Nico Stuurman - 2001-10-15

        Ah.  That is more like it.  Apparently changeline does not work in your setup but does not complain :(  Did you have the same problem before you made the changes?  It worked for me last week on a Red hat machine that also has a different web root dir.  try changing it back and see if it works again.

         
        • Nico Stuurman

          Nico Stuurman - 2001-10-15

          Sorry, I was a little too fast.  These files are not touched by changeline.  The code is in lines 828 to 852 of install.php.  One possibility is that you somehow never execute this part of the code.  if you already have a database with the name specificied in config_templates/includes/config_inc.php (sid) that will be the case.  This will likely be the case if you already have sidb running on your system or if you created the database by hand.  Simply rename the db_name variable on config_inc.php to something else before running the install.php script.  If all this is not the case, you will need to do some more debugging in the install.php script.

           
    • Nico Stuurman

      Nico Stuurman - 2001-10-15

      Ehmm,  if I remember correctly, the install script copies the files from the config_template folder to their appropriate location (provided they are not there already).  Subsequently, it changes the links to the appropriate values.  The variable $localdir is probably not known at the time these files (index.php, include.php, etc..) are run, so you are lucky that the install script is smart enough to overwrite the value you gave to it. 

      Please check in these files that the value '$localdir' has been overwritten with the appropriate string.  The installation should have also worked without the modification.

       
    • Gerald Weber

      Gerald Weber - 2001-10-15

      it seems that changeline writes correctly all
      other parameters.

      Now I have replaced the three files again, but
      without full directories, i.e, just "includes"
      instead of "$localdir/includes" or
      "/usr/local/httpd/htdocs/sibd/includes".
      I was wondering for some time why a full directory
      specification would be necessary, it is apparently not. Not needing to specify a full directory would
      be one thing less to worry about.

      For me it did work OK. But feel free to delete them from CVS on any (further) sign of trouble.

       
      • Nico Stuurman

        Nico Stuurman - 2001-10-15

        That is a good solution.  the webserver shoudl find the files as long as every script is run from withing the same directory (which is the case).  It still beats me though, why the install.php script does not overwrite the values.  Do you already have a postgresql database 'sid' on the same machine???

         
    • Gerald Weber

      Gerald Weber - 2001-10-15

      Yes, I have the database and web site on the
      same machine.

      What I am trying to do is to upgrade from 0.17
      to the newest version. Since I had changed some
      files in my previous SIDB directory I decided
      for a new installation, trying to figure out how
      to get a more "automatic" installation. Therefore
      I installed a new sidb directory in the html root.
      I have done nothing in regard to the sql database
      since I know nothing about sql or databases.

      I would like to mantain the same database information, is there a way to do this or
      will I necessarily loose all information when
      I upgrade?

      Thanks for your help.

      Gerald

       
      • Nico Stuurman

        Nico Stuurman - 2001-10-15

        The normal procedure to upgrade is overwrite the php scripts with the new ones (that is the reason why the 'variable files' index.php, config_inc.php etc.. are not included in the distribution, but 'generated', as to avoid accidentally overwriting them).  Thus, if you want to keep some files, copy them to another location and then do a normal update as described in the install.html file.

        One issues here is that the 'version' number of the database is kept in the file config_inc.php.  Thus, your 'new' install thinks it is talking to a version 0.18 database, whereas it is in fact a version 0.17 database.  I guess it might be cleaner to keep the version number within the database. 

        Using scripts written for another version of the database is simply impossible, or at least going to give a big mess.  Please don't. 

         
    • Gerald Weber

      Gerald Weber - 2001-10-15

      OK understood, now if I want to do a clean install
      (new sidb directory, new database) is there a simple way to delete the old database?

      regards

      Gerald

       
      • Nico Stuurman

        Nico Stuurman - 2001-10-15

        You do not need to delete the old database.  Multiple databases can peacefully co-exist. 

        To use a 'new' database on a machine that already has one named 'sid':
        - Download the sidb scripts from a distribution or cvs. 
        - Edit the file config_templates/includes/config_inc.php.  Change the name of variable '$db_name' into something else.
        - run the install.php script as usual.

        If you really want to delete a database you can use the 'dropdb' program from a shell (probably: dropdb -U postgres sid)

         

Log in to post a comment.

MongoDB Logo MongoDB