"lost" config.php

Help
2010-01-23
2013-05-30
  • Wilhelm Vleeshhouwer

    Hello all,

    I have just updated PGV to the latest version, as my webhost switched over to PHP5.3 and all kind of errors appeared. In the process of upgrading I "lost" my config.php file.  My webhost does not maintain a backup!??
    Everything is still on the (remote) server, gedcoms, database etc.
    The question is, how do I reconstruct the config .php file, so that it  will not overwrite everything which is already present, but will recognize that which is already present>  Some of the items in the config.php file are not clear to me. Is there an example of what should be filled in all those fields? For instance, do I keep "localhost", or do I fill in the address of my domain?
    Hope someone can help me,

    Wim.

     
  • Stephen Arnold

    Stephen Arnold - 2010-01-24

    Where's your own backup? Why blame the host? The WIKI and these help forums scream BACKUP…BACKUP…then BACKUP again.
    For URL to your database, you need to check with your ISP. Most use localhost (if the server that is running the SQL is the same machine serving your html/php), but otherwise it is a remote server address. Some even use 127.0.0.1 instead of localhost. There should be instructions in your ISP help to advise you.

    As far as the other fields (those not related to the DB) you can use the INSTALL.php GUI and complete them so that they are properly filled to your personal preferences.
    Stephen

     
  • Wilhelm Vleeshhouwer

    Hi Stephen,

    You're right, it is my fault and I am not blaming anyone, but I thought my host would keep a backup. Stupid presumption I suppose. Thanks for pointing that out to me, I will remember!
    I cannot get PGV back alive again, it keeps complaining about something missing.
    Is it possible to start afresh, with a completely new installation of PGV, and after that is complete, put the database back in place (That I saved, + the gedcoms) and the media folder?
    I hope that will get me back on track. Please let me know how to get out of this. The updat page of the WIKI tells me that I should retrieve the Database and Gedcoms from my server, as a last resort when the update has failed, but it does not tell me how to get everything back again.

     
  • Greg Roach

    Greg Roach - 2010-01-24

    I cannot get PGV back alive again, it keeps complaining about something missing

    …and are you going to tell us what it says, or do we have to guess?

     
  • Stephen Arnold

    Stephen Arnold - 2010-01-24

    First, use phpMyAdmin or another DB management tool available and backup your entire database (download a zip file).
    If your files are current, you may be able to simply change the CONFIG.php from True to False, make sure it is writable (CHMOD 777) and access the url   YourGEDCOM-SITE/install.php     The Config.php should be available to plug in the values of the various fields (although many may remain).

    You mention it 'keeps complaining about something missing" but you are not specific. It may be a very small problem, maybe only one or two lines. If you advise more precisely the nature of the error, we may be able to speed the 'fix'.

    Yes, you can always DL a completely new installation and reinstall, either with the original PGV prefixes to your DB or new ones. However, to retain all your data (place-locations, blocks, messages, favorites and users), it would be far better to get your old install running.
    -Stephen

     
  • Wilhelm Vleeshhouwer

    Hi Stepen,

    I already made a copy of the complete database and also the Gedcoms. I did what you wrote above, and what I got is below here:
    ERROR 8: Use of undefined constant PGV_ROOT - assumed 'PGV_ROOT'
    0 Error occurred on line 47 of file install.php

    Notice: Use of undefined constant PGV_ROOT - assumed 'PGV_ROOT' in /customers/vleeshhouwer.nl/vleeshhouwer.nl/httpd.www/PHPGedview/install.php on line 47

    ERROR 2: require_once(PGV_ROOTincludes/functions/functions_import.php) : failed to open stream: No such file or directory
    0 Error occurred on line 47 of file install.php in function require_once
    1 called from line 47 of file install.php

    Warning: require_once(PGV_ROOTincludes/functions/functions_import.php) : failed to open stream: No such file or directory in /customers/vleeshhouwer.nl/vleeshhouwer.nl/httpd.www/PHPGedview/install.php on line 47

    Fatal error: require_once() : Failed opening required 'PGV_ROOTincludes/functions/functions_import.php' (include_path='.:/customers/vleeshhouwer.nl/vleeshhouwer.nl/httpd.www/PHPGedview/includes:/customers/vleeshhouwer.nl/vleeshhouwer.nl/httpd.www/PHPGedview:.:/usr/share/php') in /customers/vleeshhouwer.nl/vleeshhouwer.nl/httpd.www/PHPGedview/install.php on line 47

    I hope you can make some sense out of it, the only thing I can see is that it repeats my domain name.
    I sincerely hope you know what's going on and how I can fix it.
    Btw. isn't the place-location data etc. kept in the database?

    Regards, Wim.

     
  • Greg Roach

    Greg Roach - 2010-01-24

    Yup - these error mean something.

    They suggest that you have mixed different files from different versions of PGV.

    In particular, the file install.php appears to be newer than includes/session.php.

    When you upgraded, are you *really* sure you updated all the files?

    I suggest you repeat the upgrade procedure (or alternatively you could reinstall the old version).  Without a consistent set of application files, there is probably little else you can do.

     
  • Wilhelm Vleeshhouwer

    Hiya,

    I THINK I followed the upgrade instructions to the letter, but probably got mixed up. I'll try again. But what about the config.php, should I put in one  with none of the items filled in? And how about the index.php what should I do with that? Also replace?
    In the WIKI it says the following: Make a backup copy of your database. This step is optional, and should only be required if your upgrade goes badly wrong. There are several ways to do this, depending on your server configuration:

        * sqlite
              o simply make a copy the database file.
        * MySQL
              o If you run your own server, make a copy of the raw database files.
              o If you have access to the phpMyAdmin tool, it offers an SQL export facility.

    I think my upgrade went pretty wrong, so where does the copy of the database come in?

    Thanx so far, Wim.

     
  • Greg Roach

    Greg Roach - 2010-01-24

    <<But what about the config.php, should I put in one with none of the items filled in?>>

    You don't have one, so just use the default one that comes with the 4.2.3 release.

    <<And how about the index.php what should I do with that?>>

    I presume you mean the index directory.  Keep these files here - don't overwrite them.

     
  • Wilhelm Vleeshhouwer

    Hi there again,

    I have installed the new version of PGV again, I kept the index, DB, and media folders. So eveything should be o.k. I also set the filepermits of config.php to 777. Now, where do I start, do I go to install.php and do I have set $CONFIGURED to true or false in the config.php?
    Or do I have to proceed an other way?
    Till later, Wim

     
  • Wilhelm Vleeshhouwer

    Hi again,

    I was wondering, I have most of the data to be filled in the config.php file, like the database name, the domainname etc. Would it help to already plug those into the config.php??
    Thanks for the help so far!
    Wim.

     
  • Gerry Kroll

    Gerry Kroll - 2010-01-26

    Wim:
    I wouldn't edit config.php manually.  It's sufficient to create a new config.php from the default config.dist and then let the install script launch automatically when you start PhpGedView.

    When you're going through the Install wizard pages, do NOT use the menu bar at the left.  Instead, you need to click the "Next" button at the bottom of each configuration panel.  This is the only way you can be sure that whatever information shown in each configuration panel will be saved and then finally recorded into the config.php file.

    When you're creating a new config.php file using the Install wizard, you will NOT lose any of the existing information in the database.  This means that when the time comes to create an Admin userid, PGV will discover that there's already one known to the database.

     
  • Wilhelm Vleeshhouwer

    Hello,

    So, I leave $CONFIGURED as false? And what about $DBNAME, should i leave that as phpgedview? What do I have to run? PHPGedView/install.php ?
    Thanks for your advice, will start work on it later, have other things to do now, Talk to you again!
    Wim.

     
  • Greg Roach

    Greg Roach - 2010-01-26

    So, I leave $CONFIGURED as false? And what about $DBNAME, should i leave that as phpgedview? What do I have to run?

    I refer to my previous comment about config.php

    use the default one that comes with the 4.2.3 release

    Just do that.  Nothing else.  Don't edit it.  Don't even look at it.  Just copy it to your sever and access your site using a browser.

     
  • Wilhelm Vleeshhouwer

    .K. I left everything alone, and went to my.domain/PHPGedview/install.php. The site responded with "PHPGedView currently not available.
    Now what do I do??

    Wim

     
  • Greg Roach

    Greg Roach - 2010-01-26

    If your DB settings don't point to a valid database (e.g. for a new install or if your DB crashes), then PGV looks at the $CONFIGURED variable.

    If true, then you get the "site unavailable" message.
    If false, then you go through the initial setup procedure.

    This is why we told you (several times) to use the default config.php (which has $CONFIGURED=FALSE).

     
  • David Ledger

    David Ledger - 2010-01-26

    > When you're going through the Install wizard pages, do NOT use the menu bar at the left. Instead, you need to click the "Next" button at the bottom of each configuration panel. This is the only way you can be sure that whatever information shown in each configuration panel will be saved and then finally recorded into the config.php file.

    That's probably what went wrong with my upgrade (new 4.2.3 tree next to my existing 4.1.6 one, new database, new index directory next to my old one). On section 5, I think, the one with 3 tabs, the tabbed box overlapped the 'Next' button so I used the left hand pane. I tried to re-do it later by using the Safari Web Inspector pane to change the problem block's location to 'Absolute' from 'Relative' which moved it out of the way. Unfortunately the damage must have already been done. At least I can start from scratch. Nothing lost as my 4.1.6 is still running.

    David

     
  • Wilhelm Vleeshhouwer

    Hi everybody,

    Indeed, I did set $CONFIGURED to true, and forgot to set it back like you said. I have now changed it, ran the install script, and HURRAY, everything is working again.
    I have to thank the contributors for their patience and support, could not have been better. Many many thanks, as I shudder to think about what I would have had to do to get all my data back!
    Greetings, Wim.

     
  • Gerry Kroll

    Gerry Kroll - 2010-01-27

    -> Wim: 
    Good.  We're all happy that everything is now working as it should. 

    ->David:
    Which block is overlapping?  What's your screen size?  I don't see a problem, but I'm using 1280 x 800.

     
  • David Ledger

    David Ledger - 2010-02-04

    Just getting back to it …
    There are screenshots at:
    http://www.our-familys.name/Faults/
    (a) is at 'Normal' magnification (i.e. none).
    (b) is magnified (cmd)+ on Safari on Mac OSX 10.5

    David

     
  • Greg Roach

    Greg Roach - 2010-02-04

    David - the tabbed windows on this step don't fit properly.  This is a known issue.

    If you can't see the "next" button because it is obscured, just press "return" in any text field to move on to the next page.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks