after upgrade to php7 connection to mysql from php DB returns DB Error: extension not foundMysql extension is missing in php7 installation. Ubuntu 16.04PHP and MySQL not communicatingInstall Apache, Php, Mysql latest versions not available via aptMysql/php connectionUnable to access remotely (LAMP issue)PHP installation appears to be missing the MySQL extensionMySQL support not available. after upgrade to 16.04.1 from 14.04Your PHP installation appears to be missing the MySQL extension which is required by WordPressMysql extension is missing in php7 installation. Ubuntu 16.04None of the supported PHP extension for adminer even after linking php with mysqlPHP MySql Invalid username/password error

Is there an elementary proof that there are infinitely many primes that are *not* completely split in an abelian extension?

Fourth person (in Slavey language)

Virginia employer terminated employee and wants signing bonus returned

Are babies of evil humanoid species inherently evil?

Does splitting a potentially monolithic application into several smaller ones help prevent bugs?

How do I locate a classical quotation?

Force user to remove USB token

Good for you! in Russian

How to pass a string to a command that expects a file?

MTG: Can I kill an opponent in response to lethal activated abilities, and not take the damage?

Single word request: Harming the benefactor

Who deserves to be first and second author? PhD student who collected data, research associate who wrote the paper or supervisor?

The bar has been raised

Reverse string, can I make it faster?

Things to avoid when using voltage regulators?

Word for a person who has no opinion about whether god exists

Why would one plane in this picture not have gear down yet?

Why is Beresheet doing a only a one-way trip?

Extra alignment tab has been changed to cr. } using table, tabular and resizebox

Built-In Shelves/Bookcases - IKEA vs Built

What are some noteworthy "mic-drop" moments in math?

Is there any way to damage Intellect Devourer(s) when already within a creature's skull?

Is there a window switcher for GNOME that shows the actual window?

Look through the portal of every day



after upgrade to php7 connection to mysql from php DB returns DB Error: extension not found


Mysql extension is missing in php7 installation. Ubuntu 16.04PHP and MySQL not communicatingInstall Apache, Php, Mysql latest versions not available via aptMysql/php connectionUnable to access remotely (LAMP issue)PHP installation appears to be missing the MySQL extensionMySQL support not available. after upgrade to 16.04.1 from 14.04Your PHP installation appears to be missing the MySQL extension which is required by WordPressMysql extension is missing in php7 installation. Ubuntu 16.04None of the supported PHP extension for adminer even after linking php with mysqlPHP MySql Invalid username/password error













0















After upgrading from ubuntu 14.03 to 16.04. I cannot connect to mysql from php DB. The following code returns



<?php
include_once('DB.php');
$conninfo = "mysql://xxxx:ppppp@localhost/ddddd";
$db = DB::connect($conninfo);
if (DB::isError($db))
print $db->getMessage();
exit;
else
$result = $db->query("SELECT distinct did from selections where cid=6 order by did DESC;");
while ($result->fetchInto($row, DB_FETCHMODE_ASSOC))
extract($row);
print "$didn";

$result->free();

$db->disconnect();
?>


DB Error: extension not found.



Note that from mysql, opened from the terminal, I see the contents of the table's column 'did'.



Following the advice of oerdnj from a similar post, I confirm that



  1. php7.0-mysql package is installed

  2. mysqli appears in phpinfo. Below is the result of phpinfo | grep mysqli

  3. and listed below is the output for the ldd command


php -r 'phpinfo();' | grep -i mysqli
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
mysqli
MysqlI Support => enabled
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
API Extensions => mysqli,pdo_mysql



ldd /usr/lib/php/*/mysqli.so
linux-vdso.so.1 => (0x00007ffc807a9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6cde88a000)
/lib64/ld-linux-x86-64.so.2 (0x000055a1af509000)




Please help.










share|improve this question






















  • Possible duplicate of Mysql extension is missing in php7 installation. Ubuntu 16.04

    – Henning Kockerbeck
    45 mins ago















0















After upgrading from ubuntu 14.03 to 16.04. I cannot connect to mysql from php DB. The following code returns



<?php
include_once('DB.php');
$conninfo = "mysql://xxxx:ppppp@localhost/ddddd";
$db = DB::connect($conninfo);
if (DB::isError($db))
print $db->getMessage();
exit;
else
$result = $db->query("SELECT distinct did from selections where cid=6 order by did DESC;");
while ($result->fetchInto($row, DB_FETCHMODE_ASSOC))
extract($row);
print "$didn";

$result->free();

$db->disconnect();
?>


DB Error: extension not found.



Note that from mysql, opened from the terminal, I see the contents of the table's column 'did'.



Following the advice of oerdnj from a similar post, I confirm that



  1. php7.0-mysql package is installed

  2. mysqli appears in phpinfo. Below is the result of phpinfo | grep mysqli

  3. and listed below is the output for the ldd command


php -r 'phpinfo();' | grep -i mysqli
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
mysqli
MysqlI Support => enabled
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
API Extensions => mysqli,pdo_mysql



ldd /usr/lib/php/*/mysqli.so
linux-vdso.so.1 => (0x00007ffc807a9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6cde88a000)
/lib64/ld-linux-x86-64.so.2 (0x000055a1af509000)




Please help.










share|improve this question






















  • Possible duplicate of Mysql extension is missing in php7 installation. Ubuntu 16.04

    – Henning Kockerbeck
    45 mins ago













0












0








0








After upgrading from ubuntu 14.03 to 16.04. I cannot connect to mysql from php DB. The following code returns



<?php
include_once('DB.php');
$conninfo = "mysql://xxxx:ppppp@localhost/ddddd";
$db = DB::connect($conninfo);
if (DB::isError($db))
print $db->getMessage();
exit;
else
$result = $db->query("SELECT distinct did from selections where cid=6 order by did DESC;");
while ($result->fetchInto($row, DB_FETCHMODE_ASSOC))
extract($row);
print "$didn";

$result->free();

$db->disconnect();
?>


DB Error: extension not found.



Note that from mysql, opened from the terminal, I see the contents of the table's column 'did'.



Following the advice of oerdnj from a similar post, I confirm that



  1. php7.0-mysql package is installed

  2. mysqli appears in phpinfo. Below is the result of phpinfo | grep mysqli

  3. and listed below is the output for the ldd command


php -r 'phpinfo();' | grep -i mysqli
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
mysqli
MysqlI Support => enabled
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
API Extensions => mysqli,pdo_mysql



ldd /usr/lib/php/*/mysqli.so
linux-vdso.so.1 => (0x00007ffc807a9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6cde88a000)
/lib64/ld-linux-x86-64.so.2 (0x000055a1af509000)




Please help.










share|improve this question














After upgrading from ubuntu 14.03 to 16.04. I cannot connect to mysql from php DB. The following code returns



<?php
include_once('DB.php');
$conninfo = "mysql://xxxx:ppppp@localhost/ddddd";
$db = DB::connect($conninfo);
if (DB::isError($db))
print $db->getMessage();
exit;
else
$result = $db->query("SELECT distinct did from selections where cid=6 order by did DESC;");
while ($result->fetchInto($row, DB_FETCHMODE_ASSOC))
extract($row);
print "$didn";

$result->free();

$db->disconnect();
?>


DB Error: extension not found.



Note that from mysql, opened from the terminal, I see the contents of the table's column 'did'.



Following the advice of oerdnj from a similar post, I confirm that



  1. php7.0-mysql package is installed

  2. mysqli appears in phpinfo. Below is the result of phpinfo | grep mysqli

  3. and listed below is the output for the ldd command


php -r 'phpinfo();' | grep -i mysqli
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
mysqli
MysqlI Support => enabled
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
API Extensions => mysqli,pdo_mysql



ldd /usr/lib/php/*/mysqli.so
linux-vdso.so.1 => (0x00007ffc807a9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6cde88a000)
/lib64/ld-linux-x86-64.so.2 (0x000055a1af509000)




Please help.







apache2 php mysql






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 7 '16 at 20:31









tempestcattempestcat

625




625












  • Possible duplicate of Mysql extension is missing in php7 installation. Ubuntu 16.04

    – Henning Kockerbeck
    45 mins ago

















  • Possible duplicate of Mysql extension is missing in php7 installation. Ubuntu 16.04

    – Henning Kockerbeck
    45 mins ago
















Possible duplicate of Mysql extension is missing in php7 installation. Ubuntu 16.04

– Henning Kockerbeck
45 mins ago





Possible duplicate of Mysql extension is missing in php7 installation. Ubuntu 16.04

– Henning Kockerbeck
45 mins ago










2 Answers
2






active

oldest

votes


















0














I changed $conninfo = "mysql://xxxx:ppppp@localhost/ddddd"; to $conninfo = "mysqli://xxxx:ppppp@localhost/ddddd"; and now it works. I don't understand why mysql worked in php5 but not in php7






share|improve this answer






























    0














    PHP offers multiple interfaces to interact with MySQL. One of those interfaces, the one containing functions like mysql_connect(), mysql_query() etc., has been marked as deprecated (meaning "this is outdated, don't use it anymore") for years and years. With the release of PHP 7, those old functions have finally been removed from PHP.



    It looks like your database layer is using those outdated and now removed functions. You should replace them with one of the newer interfaces to MySQL that PHP offers, like mysqli or pdo.






    share|improve this answer






















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f809375%2fafter-upgrade-to-php7-connection-to-mysql-from-php-db-returns-db-error-extensio%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I changed $conninfo = "mysql://xxxx:ppppp@localhost/ddddd"; to $conninfo = "mysqli://xxxx:ppppp@localhost/ddddd"; and now it works. I don't understand why mysql worked in php5 but not in php7






      share|improve this answer



























        0














        I changed $conninfo = "mysql://xxxx:ppppp@localhost/ddddd"; to $conninfo = "mysqli://xxxx:ppppp@localhost/ddddd"; and now it works. I don't understand why mysql worked in php5 but not in php7






        share|improve this answer

























          0












          0








          0







          I changed $conninfo = "mysql://xxxx:ppppp@localhost/ddddd"; to $conninfo = "mysqli://xxxx:ppppp@localhost/ddddd"; and now it works. I don't understand why mysql worked in php5 but not in php7






          share|improve this answer













          I changed $conninfo = "mysql://xxxx:ppppp@localhost/ddddd"; to $conninfo = "mysqli://xxxx:ppppp@localhost/ddddd"; and now it works. I don't understand why mysql worked in php5 but not in php7







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 8 '16 at 0:31









          tempestcattempestcat

          625




          625























              0














              PHP offers multiple interfaces to interact with MySQL. One of those interfaces, the one containing functions like mysql_connect(), mysql_query() etc., has been marked as deprecated (meaning "this is outdated, don't use it anymore") for years and years. With the release of PHP 7, those old functions have finally been removed from PHP.



              It looks like your database layer is using those outdated and now removed functions. You should replace them with one of the newer interfaces to MySQL that PHP offers, like mysqli or pdo.






              share|improve this answer



























                0














                PHP offers multiple interfaces to interact with MySQL. One of those interfaces, the one containing functions like mysql_connect(), mysql_query() etc., has been marked as deprecated (meaning "this is outdated, don't use it anymore") for years and years. With the release of PHP 7, those old functions have finally been removed from PHP.



                It looks like your database layer is using those outdated and now removed functions. You should replace them with one of the newer interfaces to MySQL that PHP offers, like mysqli or pdo.






                share|improve this answer

























                  0












                  0








                  0







                  PHP offers multiple interfaces to interact with MySQL. One of those interfaces, the one containing functions like mysql_connect(), mysql_query() etc., has been marked as deprecated (meaning "this is outdated, don't use it anymore") for years and years. With the release of PHP 7, those old functions have finally been removed from PHP.



                  It looks like your database layer is using those outdated and now removed functions. You should replace them with one of the newer interfaces to MySQL that PHP offers, like mysqli or pdo.






                  share|improve this answer













                  PHP offers multiple interfaces to interact with MySQL. One of those interfaces, the one containing functions like mysql_connect(), mysql_query() etc., has been marked as deprecated (meaning "this is outdated, don't use it anymore") for years and years. With the release of PHP 7, those old functions have finally been removed from PHP.



                  It looks like your database layer is using those outdated and now removed functions. You should replace them with one of the newer interfaces to MySQL that PHP offers, like mysqli or pdo.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 37 mins ago









                  Henning KockerbeckHenning Kockerbeck

                  3,8401725




                  3,8401725



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f809375%2fafter-upgrade-to-php7-connection-to-mysql-from-php-db-returns-db-error-extensio%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

                      Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

                      Torre de la Isleta Índice Véase también Referencias Bibliografía Enlaces externos Menú de navegación38°25′58″N 0°23′02″O / 38.43277778, -0.3838888938°25′58″N 0°23′02″O / 38.43277778, -0.38388889Torre de la Illeta de l’Horta o Torre Saleta. Base de datos de bienes inmuebles. Patrimonio Cultural. Secretaría de Estado de CulturaFicha BIC Torre de la Illeta de l’Horta. Dirección General de Patrimonio Cultural. Generalitat ValencianaLugares de interés. Ayuntamiento del CampelloTorre de la Isleta en CastillosNet.org