New svn version... Fedora Database

Help
a7corsair
2007-07-02
2012-10-29
  • a7corsair

    a7corsair - 2007-07-02

    Dears,

    I have installed the latest version of fez from svn.

    1) How can I import all the objects from the previous version in the new Fez. I guess, if i index all fedora items again, everything will be ok! But, can I use the same mySQL DB when I install FEZ and do not need to index again all fedora items (there are 15000 items, it takes some time...)? (I remember, I declared the same DB when installing a previous version of FEZ, but the DB was erased...)

    2) You say we need to add the following lines in the config file:

    @define("FEDORA_DB_HOST", "enter_your_host");
    @define("FEDORA_DB_TYPE", "mysql"); // mysql || postgres
    @define("FEDORA_DB_DATABASE_NAME", "enter_your_db_name");
    @define("FEDORA_DB_USERNAME", "enter_your_db_username");
    @define("FEDORA_DB_PASSWD", "enter_your_db_passwd");

    So, my Fedora DB type is oracle. Isn't it suppoerted??

    Best regards,

    Kostas Stamatis

     
    • a7corsair

      a7corsair - 2007-07-05

      Dear all,

      yesterday I managed to find an error for not searching unindexed items from Fedora Oracle.
      In file "class.reindex.php", in function "getMissingList(...)" I printed the "fedoraList" 2-D array and the output is the following:

      Array ( [0] => Array ( [PID] => changeme:666678 [TITLE] => [DESCRIPTION] => ) [1] => Array ( [PID] => changeme:666666 [TITLE] => [DESCRIPTION] => ) ) Array ( [0] => changeme:666666 )

      It returns correct results but the keys of the array are in capital...
      However, when you create "fedoraPIDs" 1-D array you use the command:

      array_push($fedoraPIDs, $flist['pid']);

      Thus, "fedoraPIDs" is empty...!!!...!!!
      If you converse pid to PID and the same few lines below (if ($flist['pid'] == $pid) {) you get a result back in the browser, but again you are missing title and description. Obviously, I have to convert title->TITLE and description->DESCRIPTION.

      In order to keep compatibility with other databases (if this problem happens in ORACLE) I just want to take the array and substitute all the capital keys with small letters. I am not a php guru, is it possible to provide me the code...:).

      Maybe, you can add the code to your version as well for future users of Oracle...!

      Best regards,

      Kostas Stamatis

       
    • Christiaan

      Christiaan - 2007-07-02

      1) Yes a reindex should work ok. I'm not sure what you meant about the previous db being erased. If you installed the latest svn code you should do a upgrade. Just point your browser to http://your_fez/upgrade/ and click the upgrade button to run the scripts. Nothing should be erased. This is usually better than doing a fresh setup then fresh index.

      2) Yes oracle should work ok - the same for any of the PHP Pear DB supported databases (about 8 or 9 of the most popular). We only really test with mysql and now postgresql but oracle should be ok as long as php is compiled/setup with oracle support. Take a look in your fez/include/pear/db directory to see all the supported databases. That postgres should be "pgsql" not "postgres" - will fix that comment in a future commit.

      Cheers,
      Christiaan

       
    • a7corsair

      a7corsair - 2007-07-02

      Dear Christian,

      1) What I mean is the following: I installed a new version and while installing I declared that mysql database will be the one from the previous installation. But the setup erased the database and created a new one! But ok, I think I found a way, to install Fez using a new DB and then change the config file to point to the one with the real old data!

      2) Yes, I have seen all the supported dbs. I am trying now to compile php with oracle support and if I notice another problem I will let you know!

      Cheers,

      Kostas Stamatis

       
      • Matthew Smith

        Matthew Smith - 2007-07-03

        no no no no no!! I tested that setup thing and it shouldn't erase your old database! (tears hair out)

         
    • a7corsair

      a7corsair - 2007-07-03

      Ok, then I did something wrong...!

      Sorry Matt...

       
    • a7corsair

      a7corsair - 2007-07-03

      Dear Christian,

      I compiled php with oracle support and then I add the following lines in my conf file:

      @define("FEDORA_DB_HOST", "myhost");
      @define("FEDORA_DB_TYPE", "oci8"); // mysql || postgres
      @define("FEDORA_DB_DATABASE_NAME", "dbName");
      @define("FEDORA_DB_USERNAME", "myUsername");
      @define("FEDORA_DB_PASSWD", "myPassword");

      (dbname is actually the sid name in oracle???)

      and then, when I try to index items from fedora, I get the following error:

      Fatal error: Call to undefined method DB::assertextension() in /var/www/html/fez/include/pear/DB/oci8.php on line 87

      Any comment?

      Best regards,
      Kostas Stamatis

       
      • Christiaan

        Christiaan - 2007-07-03

        Hi Kostas

        I also had this problem with assertextension with postgresql. In pgsql.php I commented out that if statement and it worked. Try commenting out the if statement in oci8.php (around line 87) and see if that works. Something strange about PEAR DB that it is missing.

        Also you might like to update to the latest SVN as it has added FEDORA_DB_PORT which was needed for postgresql so might also be needed for oracle too. For mysql the port is 3306, postgresql is 5432 and oracle is usually 1521. I guess dbname = sid name, havent tested that as I don't have oracle installed.

        Let me know how you go as it seems you are our oracle tester for this new svn code :)

        Cheers,
        Christiaan

         
    • a7corsair

      a7corsair - 2007-07-04

      Dear Christian,

      everything works fine with Oracle.
      I did some hacking however... everyone who wants to do it should see the following link as well:

      http://pear.php.net/bugs/bug.php?id=700

      in case they do not have a TNSName set up for their Oracle.

      It works fine however!

      Cheers,

      Kostas Stamatis

       
    • a7corsair

      a7corsair - 2007-07-04

      Dear Christian,

      the connection works fine but I think there is a small problem when indexing items!
      Both buttons "Discover New Fedora Objects" and Reindex known Fedora Objects" have the same result, that is, show all indexed items in Fez.
      I guess there is an error in the "Discover New Fedora Objects" button's action...
      Moreover, when I search for an item that I know that exists in Fedora but not in Fez, I get no result.

      Can you please elaborate a little bit on this?

      Thanks agaian!

      Best regards,

      Kostas Stamatis

       
      • Christiaan

        Christiaan - 2007-07-04

        Thanks for the feedback. I know the fedora search doesn't work right now (but will easily in a commit soon) but that is unexpected that it shows the same result for you for both buttons. I'll take a look at this in the morning.

        Cheers,
        Christiaan

         
    • a7corsair

      a7corsair - 2007-07-05

      Dear Christian,

      I have downloaded the latest svn that says "Fixed indexer search for 'Discover new Fedora objects' page."
      However, this is not working on me.
      Under index objects/Discover New Fedora Objects, when I search for an item it redirects me to the "Reindex Known Fedora Objects". That wan not happening befor two svn versions!

      Can you please check it?

      Regards,

      Kostas Stamatis

       
      • Christiaan

        Christiaan - 2007-07-05

        Hi Kostas

        Have you got javascript enabled?

        Cheers,
        Christiaan

         
    • a7corsair

      a7corsair - 2007-07-05

      Hi Christian,

      yes, javascript is enabled!

      When I am in "Discover New Fedora Objects" display, and search for an item that I am sure that exists in Fedora and not in Fez (searching for changeme:666*), I get back the page for "reindex known fedora items" and I get results of the search that are already Fez indexed. So, I guess that the action of the button is incorrect...!

      Hope you can check it but I will try to debug the code as well to see what is happening!

      Cheers,

      Kostas Stamatis

       
      • Christiaan

        Christiaan - 2007-07-05

        Hi Kostas

        Yes I was told it is not JS as soon as i posted that - sorry! Matt and Lachlan are talking about this in the campfire at the moment. Feel free to join in: http://fez.campfirenow.com/6037c

        Cheers,
        Christiaan

         

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks