Discussion:
Mysqli Extension
Ethan Rosenberg
2013-08-19 18:02:28 UTC
Permalink
Dear List -

My mysqli extension seems to have gone away.

$host = 'localhost';
$user = 'root';
$password = 'SdR3908';
echo "hello2<br />";
var_dump(function_exists('mysqli_connect'));// this returns boo(false)
$db = 'Store';
$cxn = mysqli_connect($host,$user,$password,$db);

I tried to reinstall -

rosenberg:/home/ethan# apt-get install php5-common libapache2-mod-php5
php5-cli
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php5 is already the newest version.
libapache2-mod-php5 set to manually installed.
php5-cli is already the newest version.
php5-cli set to manually installed.
php5-common is already the newest version.
php5-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

It did not help.

TIA

Ethan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Matijn Woudt
2013-08-19 18:43:27 UTC
Permalink
On Mon, Aug 19, 2013 at 8:02 PM, Ethan Rosenberg <
Post by Ethan Rosenberg
Dear List -
My mysqli extension seems to have gone away.
$host = 'localhost';
$user = 'root';
$password = 'SdR3908';
echo "hello2<br />";
var_dump(function_exists('**mysqli_connect'));// this returns boo(false)
$db = 'Store';
$cxn = mysqli_connect($host,$user,$**password,$db);
I tried to reinstall -
rosenberg:/home/ethan# apt-get install php5-common libapache2-mod-php5
php5-cli
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php5 is already the newest version.
libapache2-mod-php5 set to manually installed.
php5-cli is already the newest version.
php5-cli set to manually installed.
php5-common is already the newest version.
php5-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It did not help.
TIA
Ethan
apt-get install php5-mysql

If that doesn't help, there's something wrong with your configuration of
the modules.

- Matijn
Lester Caine
2013-08-19 23:07:48 UTC
Permalink
Post by Matijn Woudt
apt-get install php5-mysql
Just to elaborate on that ... php5-common and php5-cli does not include a number
of modules that need to be loaded separately. Choosing one of the database
modules is not the only thing that may need to be added to your list of
additional installations.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Curtis Maurand
2013-08-19 18:45:50 UTC
Permalink
Post by Ethan Rosenberg
Dear List -
My
mysqli extension seems to have gone away.
Post by Ethan Rosenberg
$host =
'localhost';
Post by Ethan Rosenberg
$user = 'root';
$password = 'SdR3908';
echo "hello2<br />";
var_dump(function_exists('mysqli_connect'));// this returns boo(false)
Post by Ethan Rosenberg
$db = 'Store';
$cxn =
mysqli_connect($host,$user,$password,$db);
Post by Ethan Rosenberg
I tried to
reinstall -
Post by Ethan Rosenberg
rosenberg:/home/ethan# apt-get install
php5-common libapache2-mod-php5
Post by Ethan Rosenberg
php5-cli
Reading
package lists... Done
Post by Ethan Rosenberg
Building dependency tree
Reading
state information... Done
Post by Ethan Rosenberg
libapache2-mod-php5 is already the
newest version.
Post by Ethan Rosenberg
libapache2-mod-php5 set to manually
installed.
Post by Ethan Rosenberg
php5-cli is already the newest version.
php5-cli set to manually installed.
Post by Ethan Rosenberg
php5-common is already the
newest version.
Post by Ethan Rosenberg
php5-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Post by Ethan Rosenberg
It did not help.
TIA
Ethan
Post by Ethan Rosenberg
--
PHP General Mailing List
(http://www.php.net/)
http://www.php.net/unsub.php
Found
this in ubuntu forums.

http://ubuntuforums.org/showthread.php?t=1814736


sudo apt-get install
php5-mysql
This package contains the PHP module that interfaces with the MySQL
server.
Ashley Sheridan
2013-08-19 18:55:42 UTC
Permalink
Post by Ethan Rosenberg
Post by Ethan Rosenberg
Dear List -
My
mysqli extension seems to have gone away.
Post by Ethan Rosenberg
$host =
'localhost';
Post by Ethan Rosenberg
$user = 'root';
$password = 'SdR3908';
echo "hello2<br />";
var_dump(function_exists('mysqli_connect'));// this returns boo(false)
Post by Ethan Rosenberg
$db = 'Store';
$cxn =
mysqli_connect($host,$user,$password,$db);
Post by Ethan Rosenberg
I tried to
reinstall -
Post by Ethan Rosenberg
rosenberg:/home/ethan# apt-get install
php5-common libapache2-mod-php5
Post by Ethan Rosenberg
php5-cli
Reading
package lists... Done
Post by Ethan Rosenberg
Building dependency tree
Reading
state information... Done
Post by Ethan Rosenberg
libapache2-mod-php5 is already the
newest version.
Post by Ethan Rosenberg
libapache2-mod-php5 set to manually
installed.
Post by Ethan Rosenberg
php5-cli is already the newest version.
php5-cli set to manually installed.
Post by Ethan Rosenberg
php5-common is already the
newest version.
Post by Ethan Rosenberg
php5-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Post by Ethan Rosenberg
It did not help.
TIA
Ethan
Post by Ethan Rosenberg
--
PHP General Mailing List
(http://www.php.net/)
http://www.php.net/unsub.php
Found
this in ubuntu forums.
http://ubuntuforums.org/showthread.php?t=1814736
sudo apt-get install
php5-mysql
This package contains the PHP module that interfaces with the MySQL
server.
Could it be that the mysql service on the server has stopped. Typically you'd do something like this on RedHat/Fedora servers:

service mysqld status

That would certainly stop the extension working from within PHP.

Thanks,
Ash
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Matijn Woudt
2013-08-19 19:31:50 UTC
Permalink
On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan
Post by Ashley Sheridan
Post by Ethan Rosenberg
Post by Ethan Rosenberg
Dear List -
My
mysqli extension seems to have gone away.
Post by Ethan Rosenberg
$host =
'localhost';
Post by Ethan Rosenberg
$user = 'root';
$password = 'SdR3908';
echo "hello2<br />";
var_dump(function_exists('mysqli_connect'));// this returns boo(false)
Post by Ethan Rosenberg
$db = 'Store';
$cxn =
mysqli_connect($host,$user,$password,$db);
Post by Ethan Rosenberg
I tried to
reinstall -
Post by Ethan Rosenberg
rosenberg:/home/ethan# apt-get install
php5-common libapache2-mod-php5
Post by Ethan Rosenberg
php5-cli
Reading
package lists... Done
Post by Ethan Rosenberg
Building dependency tree
Reading
state information... Done
Post by Ethan Rosenberg
libapache2-mod-php5 is already the
newest version.
Post by Ethan Rosenberg
libapache2-mod-php5 set to manually
installed.
Post by Ethan Rosenberg
php5-cli is already the newest version.
php5-cli set to manually installed.
Post by Ethan Rosenberg
php5-common is already the
newest version.
Post by Ethan Rosenberg
php5-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Post by Ethan Rosenberg
It did not help.
TIA
Ethan
Post by Ethan Rosenberg
--
PHP General Mailing List
(http://www.php.net/)
http://www.php.net/unsub.php
Found
this in ubuntu forums.
http://ubuntuforums.org/showthread.php?t=1814736
sudo apt-get install
php5-mysql
This package contains the PHP module that interfaces with the MySQL
server.
Could it be that the mysql service on the server has stopped. Typically
service mysqld status
That would certainly stop the extension working from within PHP.
Thanks,
Ash
I'm sorry, but this is just plain wrong.
The extension has nothing to do with the mysql service. In fact, a lot of
the larger websites have their database service running at a different
server, and probably don't even have the mysql service installed.

- Matijn
Ashley Sheridan
2013-08-19 19:40:55 UTC
Permalink
Post by Matijn Woudt
On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan
Post by Ashley Sheridan
Post by Ethan Rosenberg
Post by Ethan Rosenberg
Dear List -
My
mysqli extension seems to have gone away.
Post by Ethan Rosenberg
$host =
'localhost';
Post by Ethan Rosenberg
$user = 'root';
$password = 'SdR3908';
echo "hello2<br />";
var_dump(function_exists('mysqli_connect'));// this returns
boo(false)
Post by Ashley Sheridan
Post by Ethan Rosenberg
Post by Ethan Rosenberg
$db = 'Store';
$cxn =
mysqli_connect($host,$user,$password,$db);
Post by Ethan Rosenberg
I tried to
reinstall -
Post by Ethan Rosenberg
rosenberg:/home/ethan# apt-get install
php5-common libapache2-mod-php5
Post by Ethan Rosenberg
php5-cli
Reading
package lists... Done
Post by Ethan Rosenberg
Building dependency tree
Reading
state information... Done
Post by Ethan Rosenberg
libapache2-mod-php5 is already the
newest version.
Post by Ethan Rosenberg
libapache2-mod-php5 set to manually
installed.
Post by Ethan Rosenberg
php5-cli is already the newest version.
php5-cli set to manually installed.
Post by Ethan Rosenberg
php5-common is already the
newest version.
Post by Ethan Rosenberg
php5-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Post by Ethan Rosenberg
It did not help.
TIA
Ethan
Post by Ethan Rosenberg
--
PHP General Mailing List
(http://www.php.net/)
http://www.php.net/unsub.php
Found
this in ubuntu forums.
http://ubuntuforums.org/showthread.php?t=1814736
sudo apt-get install
php5-mysql
This package contains the PHP module that interfaces with the MySQL
server.
Could it be that the mysql service on the server has stopped.
Typically
Post by Ashley Sheridan
service mysqld status
That would certainly stop the extension working from within PHP.
Thanks,
Ash
I'm sorry, but this is just plain wrong.
The extension has nothing to do with the mysql service. In fact, a lot of
the larger websites have their database service running at a different
server, and probably don't even have the mysql service installed.
- Matijn
Look at his connection settings, it says localhost...

Thanks,
Ash
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Matijn Woudt
2013-08-19 19:43:05 UTC
Permalink
On Mon, Aug 19, 2013 at 9:40 PM, Ashley Sheridan
Post by Ashley Sheridan
Post by Matijn Woudt
On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan
Post by Ashley Sheridan
Post by Ethan Rosenberg
Post by Ethan Rosenberg
Dear List -
My
mysqli extension seems to have gone away.
Post by Ethan Rosenberg
$host =
'localhost';
Post by Ethan Rosenberg
$user = 'root';
$password = 'SdR3908';
echo "hello2<br />";
var_dump(function_exists('mysqli_connect'));// this returns
boo(false)
Post by Ashley Sheridan
Post by Ethan Rosenberg
Post by Ethan Rosenberg
$db = 'Store';
$cxn =
mysqli_connect($host,$user,$password,$db);
Post by Ethan Rosenberg
I tried to
reinstall -
Post by Ethan Rosenberg
rosenberg:/home/ethan# apt-get install
php5-common libapache2-mod-php5
Post by Ethan Rosenberg
php5-cli
Reading
package lists... Done
Post by Ethan Rosenberg
Building dependency tree
Reading
state information... Done
Post by Ethan Rosenberg
libapache2-mod-php5 is already the
newest version.
Post by Ethan Rosenberg
libapache2-mod-php5 set to manually
installed.
Post by Ethan Rosenberg
php5-cli is already the newest version.
php5-cli set to manually installed.
Post by Ethan Rosenberg
php5-common is already the
newest version.
Post by Ethan Rosenberg
php5-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Post by Ethan Rosenberg
It did not help.
TIA
Ethan
Post by Ethan Rosenberg
--
PHP General Mailing List
(http://www.php.net/)
http://www.php.net/unsub.php
Found
this in ubuntu forums.
http://ubuntuforums.org/showthread.php?t=1814736
sudo apt-get install
php5-mysql
This package contains the PHP module that interfaces with the MySQL
server.
Could it be that the mysql service on the server has stopped.
Typically
Post by Ashley Sheridan
service mysqld status
That would certainly stop the extension working from within PHP.
Thanks,
Ash
I'm sorry, but this is just plain wrong.
The extension has nothing to do with the mysql service. In fact, a lot of
the larger websites have their database service running at a different
server, and probably don't even have the mysql service installed.
- Matijn
Look at his connection settings, it says localhost...
Thanks,
Ash
var_dump(function_exists('**mysqli_connect'));// this returns boo(false)

I think it explains everything.

- Matijn
Curtis Maurand
2013-08-19 20:58:10 UTC
Permalink
Post by Matijn Woudt
On Mon, Aug 19, 2013 at 9:40 PM, Ashley
Sheridan
Post by Matijn Woudt
Matijn Woudt
Post by Matijn Woudt
On Mon, Aug 19, 2013 at
8:55 PM, Ashley Sheridan
Post by Matijn Woudt
Post by Matijn Woudt
Curtis
Post by Matijn Woudt
Ethan Rosenberg
Post by Ethan Rosenberg
Dear List -
My
mysqli extension seems to have gone away.
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
$host =
'localhost';
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
$user = 'root';
$password = 'SdR3908';
echo "hello2<br />";
var_dump(function_exists('mysqli_connect'));// this returns
Post by Matijn Woudt
boo(false)
Post by Matijn Woudt
Post by Ethan Rosenberg
$db =
'Store';
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
$cxn =
mysqli_connect($host,$user,$password,$db);
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
I tried to
reinstall -
rosenberg:/home/ethan# apt-get install
php5-common libapache2-mod-php5
php5-cli
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
Reading
package lists... Done
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
Building
dependency tree
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
Reading
state information... Done
libapache2-mod-php5 is already the
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
newest
version.
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
libapache2-mod-php5 set to
manually
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
installed.
php5-cli is already the newest version.
Post by Matijn Woudt
Post by Matijn Woudt
php5-cli set to manually installed.
Post by Ethan Rosenberg
php5-common is already the
newest version.
Post by Matijn Woudt
Post by Ethan Rosenberg
php5-common
set to manually installed.
Post by Matijn Woudt
Post by Matijn Woudt
0 upgraded, 0 newly installed, 0 to remove and 0 not
upgraded.
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
It did not help.
TIA
Ethan
--
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
Post by Ethan Rosenberg
PHP General Mailing List
(http://www.php.net/)
Post by Matijn Woudt
Post by Ethan Rosenberg
To
http://www.php.net/unsub.php
Post by Matijn Woudt
Post by Matijn Woudt
Found
this in ubuntu forums.
Post by Matijn Woudt
http://ubuntuforums.org/showthread.php?t=1814736
sudo apt-get install
Post by Matijn Woudt
php5-mysql
This package contains the PHP module that
interfaces with the MySQL
Post by Matijn Woudt
Post by Matijn Woudt
Post by Matijn Woudt
server.
Could it be that the mysql service on the
server has stopped.
Post by Matijn Woudt
Post by Matijn Woudt
Typically
service mysqld status
That would certainly stop the extension
working from within PHP.
Thanks,
Post by Matijn Woudt
Post by Matijn Woudt
Ash
I'm sorry, but this is just plain wrong.
The extension has nothing to do with the mysql service. In
fact, a lot
Post by Matijn Woudt
Post by Matijn Woudt
of
the larger websites
have their database service running at a different
Post by Matijn Woudt
server, and probably don't even have the mysql service installed.
Post by Matijn Woudt
- Matijn
Look at his connection settings, it says localhost...
Post by Matijn Woudt
Thanks,
Ash
var_dump(function_exists('**mysqli_connect'));// this returns
boo(false)
Post by Matijn Woudt
I think it explains everything.
You guys aren't being terribly helpful.  My mostly stock
12.04 has the mysqli library so something else is going on.  You
might give the guy a little direction rather than berating him. or
me.  His question was about the library being missing.  My
answer was that it was included in the php_mysql package already and that
was the correct answer to his question.  The following is the result
of a "locate mysqli"  I've also followed with a sample
script that I ran against the localhost database which returned 11
rows.

These are the results of the locate command.
/usr/include/php5/ext/mysqli
/usr/include/php5/ext/mysqli/php_mysqli_structs.h
/usr/lib/php5/20090626/mysqli.so
/usr/share/man/man1/mysqlimport.1.gz
/usr/share/php/.registry/mdb2_driver_mysqli.reg
/usr/share/php/MDB2/Driver/mysqli.php
/usr/share/php/MDB2/Driver/Datatype/mysqli.php
/usr/share/php/MDB2/Driver/Function/mysqli.php
/usr/share/php/MDB2/Driver/Manager/mysqli.php
/usr/share/php/MDB2/Driver/Native/mysqli.php
/usr/share/php/MDB2/Driver/Reverse/mysqli.php
/usr/share/php/data/MDB2_Driver_mysqli
/usr/share/php/data/MDB2_Driver_mysqli/package_mysqli.xml
/usr/share/php/test/MDB2_Driver_mysqli
/usr/share/php/test/MDB2_Driver_mysqli/tests
/usr/share/php/test/MDB2_Driver_mysqli/tests/MDB2_nonstandard_mysqli.php

<?
$conn = new mysqli("localhost",
"user", "password", "mysql");

if
($conn->connect_errno)
{
  printf("Connect failed:
%s\n", $conn->connect_error);
  exit();
}

if ($result = $conn->query("SELECT * FROM user")){

   printf("Select returned %d rows.\n",
$result->num_rows);

   $result->close();
}

Mind you I had a lot wrong with this script as I wrote it
because I don't generally use mysqli directly and mysqli didn't complain
about things being wrong.  I thought that was a bit strange since I
work mostly in Java these days and Java complains mercilessly about this
that and the other thing.

Curtis
Daniel P. Brown
2013-08-19 19:42:37 UTC
Permalink
Post by Ethan Rosenberg
Dear List -
My mysqli extension seems to have gone away.
(REACTED)

Remember: avoid putting passwords - especially for root users - on a
public mailing list, which is also permanently archived.
Post by Ethan Rosenberg
echo "hello2<br />";
var_dump(function_exists('mysqli_connect'));// this returns boo(false)
$db = 'Store';
$cxn = mysqli_connect($host,$user,$password,$db);
I tried to reinstall -
rosenberg:/home/ethan# apt-get install php5-common libapache2-mod-php5
php5-cli
Post by Ethan Rosenberg
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php5 is already the newest version.
libapache2-mod-php5 set to manually installed.
php5-cli is already the newest version.
php5-cli set to manually installed.
php5-common is already the newest version.
php5-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It did not help.
TIA
Ethan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...