driver not found error when trying to use PDO, PHP (5.2) and mysql

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eholz1

    driver not found error when trying to use PDO, PHP (5.2) and mysql

    Hello Newsgroup,

    I have "installed" pdo using "pecl install pdo" (it intalled version
    1.0.3),
    I have added the line "extension=pdo. so" to my php.ini file, but when I
    try to use
    the PDO db connect string "$db = new
    PDO('msql:serve r=dbserver;dbna me=menagerie',$ dbuser,$dbpass) ; "
    i get a "driver not found" error.

    the pdo.so file is located in
    :/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so

    Any ideas on how to fix this???

    eholz1

  • Thomas

    #2
    Re: driver not found error when trying to use PDO, PHP (5.2) andmysql

    You need to install pdo_mysql

    $ pecl install pdo_mysql

    And of course add the .so file to your php.ini, just as you did with pdo.so

    That should do the trick.

    :o)
    Thomas


    eholz1 wrote:
    Hello Newsgroup,
    >
    I have "installed" pdo using "pecl install pdo" (it intalled version
    1.0.3),
    I have added the line "extension=pdo. so" to my php.ini file, but when I
    try to use
    the PDO db connect string "$db = new
    PDO('msql:serve r=dbserver;dbna me=menagerie',$ dbuser,$dbpass) ; "
    i get a "driver not found" error.
    >
    the pdo.so file is located in
    :/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so
    >
    Any ideas on how to fix this???
    >
    eholz1
    >

    Comment

    • eholz1

      #3
      Re: driver not found error when trying to use PDO, PHP (5.2) and mysql

      Hello,

      Who would have thought! I saw but did not see. I will load that in,
      and see what happens.

      Thanks,

      eholz1

      Thomas wrote:
      You need to install pdo_mysql
      >
      $ pecl install pdo_mysql
      >
      And of course add the .so file to your php.ini, just as you did with pdo.so
      >
      That should do the trick.
      >
      :o)
      Thomas
      >
      >
      eholz1 wrote:
      Hello Newsgroup,

      I have "installed" pdo using "pecl install pdo" (it intalled version
      1.0.3),
      I have added the line "extension=pdo. so" to my php.ini file, but when I
      try to use
      the PDO db connect string "$db = new
      PDO('msql:serve r=dbserver;dbna me=menagerie',$ dbuser,$dbpass) ; "
      i get a "driver not found" error.

      the pdo.so file is located in
      :/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so

      Any ideas on how to fix this???

      eholz1

      Comment

      • eholz1

        #4
        Re: driver not found error when trying to use PDO, PHP (5.2) and mysql


        Thomas wrote:
        You need to install pdo_mysql
        >
        $ pecl install pdo_mysql
        >
        And of course add the .so file to your php.ini, just as you did with pdo.so
        >
        That should do the trick.
        >
        :o)
        Thomas
        >
        >
        eholz1 wrote:
        Hello Newsgroup,

        I have "installed" pdo using "pecl install pdo" (it intalled version
        1.0.3),
        I have added the line "extension=pdo. so" to my php.ini file, but when I
        try to use
        the PDO db connect string "$db = new
        PDO('msql:serve r=dbserver;dbna me=menagerie',$ dbuser,$dbpass) ; "
        i get a "driver not found" error.

        the pdo.so file is located in
        :/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so

        Any ideas on how to fix this???

        eholz1
        Hello again,

        I did get the pdo_mysql file as you suggested. and even uncommented
        the extesion_dir in php.ini.
        One problem - I entered the directory -
        /usr/local/lib/php/extensions//no-debug-non-zts-20060613/ where both
        files reside (pdo.so, and pd0_mysql.so), but after I make that change
        to the php.ini file, apache will not start. I then copied the files to
        other places, but no luck apache would start but I still get the
        "driver not found" error.
        Perhaps I need to rebuild php???

        Thanks,

        ehol1

        Comment

        • Thomas

          #5
          Re: driver not found error when trying to use PDO, PHP (5.2) andmysql

          You shouldn't have to rebuild PHP. What errors are Apache throwing when
          trying to start?

          What value do you have in extension_dir in php.ini?

          Are you trying to load pd0_mysql.so, when you really should load
          pdo_mysql.so?

          Regards,
          Thomas


          eholz1 wrote:
          >
          Hello again,
          >
          I did get the pdo_mysql file as you suggested. and even uncommented
          the extesion_dir in php.ini.
          One problem - I entered the directory -
          /usr/local/lib/php/extensions//no-debug-non-zts-20060613/ where both
          files reside (pdo.so, and pd0_mysql.so), but after I make that change
          to the php.ini file, apache will not start. I then copied the files to
          other places, but no luck apache would start but I still get the
          "driver not found" error.
          Perhaps I need to rebuild php???
          >
          Thanks,
          >
          ehol1
          >

          Comment

          • eholz1

            #6
            Re: driver not found error when trying to use PDO, PHP (5.2) and mysql


            Thomas wrote:
            You shouldn't have to rebuild PHP. What errors are Apache throwing when
            trying to start?
            >
            What value do you have in extension_dir in php.ini?
            >
            Are you trying to load pd0_mysql.so, when you really should load
            pdo_mysql.so?
            >
            Regards,
            Thomas
            >
            >
            eholz1 wrote:

            Hello again,

            I did get the pdo_mysql file as you suggested. and even uncommented
            the extesion_dir in php.ini.
            One problem - I entered the directory -
            /usr/local/lib/php/extensions//no-debug-non-zts-20060613/ where both
            files reside (pdo.so, and pd0_mysql.so), but after I make that change
            to the php.ini file, apache will not start. I then copied the files to
            other places, but no luck apache would start but I still get the
            "driver not found" error.
            Perhaps I need to rebuild php???

            Thanks,

            ehol1
            Hello Thomas,
            Thanks for info. I have discovered something, but it is strange! If
            specify "extension_ dir = /usr/local/apache2/extentions" AND put the
            pdo.so and/or pdo_mysql.so (not pd0 a typo in posting) in that
            directory (or if I put those files in ANY dir defined in the
            "extensions_dir ") apache will not start, and will not give any erors
            (in access_log or error_log). So it seems that Apache (2.2) does not
            like those files for some reason - maybe they did not intall properly
            or are corrupted. As long as I do not put the files in the referenced
            directory Apache will start (but PDO will not work either!)
            Let me know what you think.
            Eric

            Comment

            Working...