IMPORTANT NOTE FOR USERS OF LATEST RELEASE

Anonymous
2009-08-17
2015-12-27
1 2 > >> (Page 1 of 2)
  • Anonymous - 2009-08-17

    Following the 1st August release of ver 4.2.2 I have noticed the most common problem users are having is related to "PDO". Common error messages are those like :

    "ERROR 256: PDO/mysql is not installed.
    Fatal error: PDO/mysql is not installed. in D:\Hosting\2727989\html\xxxxxxxx\includes\classes\class_pgv_db.php on line 108 "

    It appears we missed adding this new, vital, change to the installation requirements. The following statement has now been added to the WIKI pages as part of the Installation Requirements section for ver 4.2.2:

    " ['VERY IMPORTANT - You also need to install/enable PDO/mysql. This is a standard part of PHP, and allows PHP to connect to databases. This is a new requirement, effective from this version onwards. This improves performance, fixes the sqlite compatibility issues, and will allow a wider range of databases to be used.]"

     
    • Thomas52

      Thomas52 - 2009-08-18

      Forgive this dummy, but I have MySQL 5.0.67 (at least my database has been working fine for the last two years or so) and have gotten no error messages - is there something else I need to do? I have no idea what PDO is, or if I have it, or how to check it.

       
      • Anonymous - 2009-08-18

        Have you upgraded to ver 4.2.2 yet? That is the first version to require PDO.  It is part of PHP not MySQL, and you also need PHP 5.2+.

        If you have upgraded to 4.2.2, and have no problems, then you can be certain that PDO is installed and enabled already.

         
      • Andy Lister

        Andy Lister - 2009-08-18

        I have been reading issues on PDO requirements on 4.2.2.
        Is there any tool that I can use - without destroying my existing running system - to check if my provide supports this ?
        I am quite happy with 4.2.1 but don't want to get left behind.
        Thanks

         
        • Andre Vanderlynden

          Hello Andy,
          it's quite easy to verify if PDO is enabled on your server.
          Go do Admin
          Click on phpinfo()
          in the reort shown, there is a PDO section that should say something like:
          PDO support    enabled
          PDO drivers     sqlite, sqlite2, mysql
          André

           
          • Andy Lister

            Andy Lister - 2009-08-18

            I have checked from the only admin screen I can access, and it advises:
            phpMyAdmin - 2.11.5.2
            MySQL client version: 5.0.45
            Used PHP extensions: mysql

            Does this look safe enough, or should I email a question to the provider before proceeding?

             
    • Mark Hattam

      Mark Hattam - 2009-08-18

      use the phpinfo() function ... either from your admin page on phpGedView or craft a test.php page yourself containing just these lines ...

      <?php
      phpinfo();
      ?>

      Then call it up in your web browser.

      In the "Configure" section near the top of the resulting webpage, you can see how php was compiled ... in my case one if the things it says is
      '--with-pdo-mysql=/opt/local/bin/mysql_config5'

      Then further down the page, there's two sections that say
      PDO
      PDO support    enabled
      PDO drivers    mysql

      pdo_mysql
      PDO Driver for MySQL    enabled
      Client API version    5.0.83

      Mark

       
    • Mark Hattam

      Mark Hattam - 2009-08-18

      Again ...
      if you have a working 4.2.1 ... login as admin, and use the "PHP information"  link on the admin page (top right of the page content).

      That will call phpinfo() and show you on the resulting page a lot of information about the php that is installed on your server, including whether it has pdo enabled, and if so whether pdo_mysql is available.

      Mark

       
      • Andy Lister

        Andy Lister - 2009-08-18

        Thanks for the advise - I am seeing PDO 5.0.41 in the admin window so will be pushing ahead with new version shortly.

         
    • Anonymous - 2009-08-18

      Andy, I hope the upgrade goes OK. Unfortunately I don't believe that seeing "PDO 5.0.41" in your web hosts admin window completely answers your question. You should follow Mark's advice, as that is the only way to tell if it is both installed AND enabled.
      In case you mis-understood him, he is referring to logging in to PGV, not your web server.

       
    • Lou Hurst

      Lou Hurst - 2009-08-19

      I hesitate to jump in here on Open Discussion rather than Help but - before upgrading to 4.2.2 have checked my server config.  Info below.  Am currently running MySql; given the config info should I change to SQLite since it appears there isn't a driver for MySql?  Thanks much.  Lou

      PDO
      PDO support     enabled
      PDO drivers     sqlite, sqlite2

      pdo_sqlite
      PDO Driver for SQLite 3.x    enabled
      PECL Module version     (bundled) 1.0.1 $Id: pdo_sqlite.c, v 1.10.2.6.2.2 2007/03/23 14:30:00 wez Exp $
      SQLite Library     3.3.17

       
    • Stephen Arnold

      Stephen Arnold - 2009-08-19

      PDO support for MySQL is a most common build. If your host is not including this, but does so for SQLite, there is no excuse. If your host doesn't support PDO at all, get a new host as those that do are cheap and plentiful (and pretty darn good).

      Or, continue to run 4.2.1 and suffer the consequences of slower performance, unenhanced reports and thousands of bug fixes and new features.

      I would never suggest SQLite unless there simply is no other choice, and certainly not for a GEDCOM of any consequence. JOHO.
      -Stephen

       
    • Anonymous - 2009-08-19

      Stephen's right. Contact your web host and request they add the PDO MySQL drivers. If they can't (means won't) change web host before you consider going to sqlite.

       
      • Lester Caine

        Lester Caine - 2009-08-19

        Just to add a word for the 'Only MySQL will do camp' - PDO was NOT the right move since it does not address the cross database problems. I wish that I had pushed my ADOdb port back into the codebase since now things are totally screwed up and I can't easily move to the newer code. Many projects that actually supported cross platform have now fallen fowl of this problem and lost what cross compatibility they did have :(

         
    • Stephen Arnold

      Stephen Arnold - 2009-08-19

      lester
      As you know, there is much discussion about this and I know Greg has personally responded to you ADOdb comments previously.  I'm at a loss to understand why you maintain that PGV has gone to the 'dark side'.

      From ApacheFriends and Drupal.org:
      http://drupal.org/node/134580

      "PDO offers a single user-space API to talk to MySQL, PostgreSQL, SQLite, Oracle, MS SQL, ODBC, and various other databases that no one I know actually uses. That means adding support for SQLite, Oracle, and MS SQL via a PDO layer becomes dramatically easier, and takes less code."

      "DO natively supports prepared statements, and emulates it on databases that don't support them natively. Because they're implemented in C, I believe they should be substantially faster than our current slow preg_replace_callback() prepared statement emulation."

      It would seem that Greg's move from deprecated PEAR calls to PDO is well supported and available to any DB platform (and OS platform) that might be chosen. I don't think he ever advocated 'only MySQL will do'.
      -Stephen

       
      • Lester Caine

        Lester Caine - 2009-08-19

        Stephen - from the horses mount - the PHP manual ...

        PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data. PDO does not provide a database  abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility.

        The very first important think is managing the SQL so that only generic code is used, and things like 'LIMIT 1'  is correctly mapped when required. PDO does nothing to address these problems, and many USERS of PDO simply put MySQL only code into the queries and wonder why switching drivers is then a problem. Drupa is a VERY good example of no cross compatible SQL!

         
        • Greg Roach

          Greg Roach - 2009-08-19

          Just a quick reply, as I'm on vacation.

          Pear::DB had to be replaced, as it only used sqlite2, which meant we couldn't use basic SQL constructs such as sub-queries.  Sticking with it would have placed a significant restriction on PGV development.  Alternatively, we could have given up with support for sqlite, which I guess might be unpopular......

          The pros/cons were discussed a long time ago.

          <<The very first important think is managing the SQL so that only generic code is used, and things like 'LIMIT 1' is correctly mapped when required. PDO does nothing to address these problems,>>

          If you are interested, take a look at the class_pgv_db.php file.  PGV has very little need for database-specific constructs.  IIRC, limit queries, column types (and the MOD() function??) are the only things we need.  These are all taken care of.  If you *really* want to use another DB layer, you should only need to rewrite this file.

          The only compaibility issue that I can think of is the oracle null/empty column issue.  If there is any interest in oracle, even this can be overcome (and yes, I am a professional oracle application developer...).

          If you are using an unusual database, and have a compatibility issue, let us know.  We *will* do our best to resolve it.

           
          • Lester Caine

            Lester Caine - 2009-08-19

            Porting Pear::DB to ADOdb was a few hours work, and then everything was compatible with bitweaver ... I manage all of the rest of my content in bw - including media.
            I am falling at the first hurdle with class_pgv_db.php since I can't modify 'createInstance' to handle the field types that firebird ( and I believe Oracle ) needs to support. BLOB fields are used for the larger text fields, but the main problem is getting an SQL standard sequence generator created rather than 'AUTOINCREMENT'  this is an area that has had a number of years development in ADOdb and now quite happily builds schemas independent of the database SQL/DDL differences ....
            And PDO does not actually handle some of the blob conversions correctly to allow transparent use as long character fields ... at least last time I tried to get things working, But until I can persuade 4.2.2 to actually BUILD an empty database .... ( I can probably simply use the one created with the bw installer if I can get 'createInstance' to match it )

             
            • Greg Roach

              Greg Roach - 2009-08-22

              You raise two issues - BLOB column types and AUTOINCREMENT.

              According to the docs, the correct datatype is "BLOB SUB_TYPE TEXT".  (I've updated SVN accordingly, in case it helps....)

              AUTOINCREMENT is a little more tricky.  Some databases use auto-increment columns, while others require the use of sequences/triggers.  This is not difficult, although it might be worth noting that currently none of the core PGV code uses this column type - only the research-assistant module.

              However, I guess you'd need to alter the appropriate db_schema_X_Y.php script to add

              if ($DBTYPE=='firebird') {
              // create sequence
              // create trigger
              }

              You'd need some way of fetching the sequence's current value, and override PDO::lastInsertId() function to fetch that value.  If firebird supports session variables, then you could use that to hold it.

              However, it may be easier to alter the RA.

               
    • Darrel Damon

      Darrel Damon - 2009-08-20

      I checked my host and they do NOT have PDO enabled.  When I queried, I was told that they do not enable "experimental modules" in their system.

       
    • Lou Hurst

      Lou Hurst - 2009-08-20

      My host had a similar response, they don't/won't support it.  I'm going to resurrect a post I made a few months back regarding hosting.

      Lou

       
    • Anonymous - 2009-08-20

      "I was told that they do not enable "experimental modules" in their system.  "

      Wow, how long do they regard something as 'experimental'? PDO was introduced with PHP 5.1, in June of 2005 - 4 years ago!!!!

       
    • Victor H.

      Victor H. - 2009-08-24

      My PHP config shows  ' --disable-pdo' which I guess means I am SOL on this host?

       
    • Anonymous - 2009-08-24

      'fraid so Victor. Glad to see on your other post you are looking to move.

       
  • Daniel Kionka

    Daniel Kionka - 2010-09-07

    I am trying to set up PGV on free hosting sites, and I am 2 for 2 and getting stuck on PDO/mysql after installing PGV.  I thought they were simply behind or incomplete on their PHP, but this is an opportunity for the free sites to up-sell you to "premium hosting", which supports PDO.  See:  http://www.000webhost.com/forum/web-programming/14419-phpgedview.html

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.