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
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
- php7.0-mysql package is installed
- mysqli appears in phpinfo. Below is the result of phpinfo | grep mysqli
- 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
add a comment |
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
- php7.0-mysql package is installed
- mysqli appears in phpinfo. Below is the result of phpinfo | grep mysqli
- 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
Possible duplicate of Mysql extension is missing in php7 installation. Ubuntu 16.04
– Henning Kockerbeck
45 mins ago
add a comment |
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
- php7.0-mysql package is installed
- mysqli appears in phpinfo. Below is the result of phpinfo | grep mysqli
- 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
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
- php7.0-mysql package is installed
- mysqli appears in phpinfo. Below is the result of phpinfo | grep mysqli
- 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
apache2 php mysql
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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
add a comment |
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
.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
answered Aug 8 '16 at 0:31
tempestcattempestcat
625
625
add a comment |
add a comment |
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
.
add a comment |
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
.
add a comment |
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
.
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
.
answered 37 mins ago
Henning KockerbeckHenning Kockerbeck
3,8401725
3,8401725
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Possible duplicate of Mysql extension is missing in php7 installation. Ubuntu 16.04
– Henning Kockerbeck
45 mins ago