php-general Digest 20 Aug 2013 14:00:35 -0000 Issue 8337

Topics (messages 321880 through 321890):

Re: Mysqli Extension
        321880 by: Matijn Woudt
        321881 by: Curtis Maurand
        321882 by: Ashley Sheridan
        321884 by: Matijn Woudt
        321885 by: Ashley Sheridan
        321886 by: Daniel P. Brown
        321887 by: Matijn Woudt
        321888 by: Curtis Maurand
        321889 by: Lester Caine

Re: How can I submit more than 2000 items of data?
        321883 by: Robert Cummings

PHP vs JAVA
        321890 by: Tedd Sperling

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Mon, Aug 19, 2013 at 8:02 PM, Ethan Rosenberg <
erosenb...@hygeiabiomedical.com> wrote:

> 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

--- End Message ---
--- Begin Message ---

Ethan Rosenberg wrote:
> 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
> 
> 


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.




--- End Message ---
--- Begin Message ---

Curtis Maurand <cur...@maurand.com> wrote:
>
>
>Ethan Rosenberg wrote:
>> 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
>> 
>> 
>
>
>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

--- End Message ---
--- Begin Message ---
On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk>wrote:

>
>
> Curtis Maurand <cur...@maurand.com> wrote:
> >
> >
> >Ethan Rosenberg wrote:
> >> 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
> >>
> >>
> >
> >
> >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
>
>
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

--- End Message ---
--- Begin Message ---

Matijn Woudt <tijn...@gmail.com> wrote:
>On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan
><a...@ashleysheridan.co.uk>wrote:
>
>>
>>
>> Curtis Maurand <cur...@maurand.com> wrote:
>> >
>> >
>> >Ethan Rosenberg wrote:
>> >> 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
>> >>
>> >>
>> >
>> >
>> >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
>>
>>
>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

--- End Message ---
--- Begin Message ---
On Aug 19, 2013 2:32 PM, "Ethan Rosenberg" <erosenb...@hygeiabiomedical.com>
wrote:
>
> 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.

> 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
>

--- End Message ---
--- Begin Message ---
On Mon, Aug 19, 2013 at 9:40 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk>wrote:

>
>
> Matijn Woudt <tijn...@gmail.com> wrote:
> >On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan
> ><a...@ashleysheridan.co.uk>wrote:
> >
> >>
> >>
> >> Curtis Maurand <cur...@maurand.com> wrote:
> >> >
> >> >
> >> >Ethan Rosenberg wrote:
> >> >> 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
> >> >>
> >> >>
> >> >
> >> >
> >> >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
> >>
> >>
> >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

--- End Message ---
--- Begin Message ---

Matijn Woudt wrote:
> On Mon, Aug 19, 2013 at 9:40 PM, Ashley
Sheridan
> <a...@ashleysheridan.co.uk>wrote:
> 
>>
>>
>> Matijn Woudt
<tijn...@gmail.com> wrote:
>> >On Mon, Aug 19, 2013 at
8:55 PM, Ashley Sheridan
>>
><a...@ashleysheridan.co.uk>wrote:
>> >
>> >>
>> >>
>> >> Curtis
Maurand <cur...@maurand.com> wrote:
>> >> >
>> >> >
>> >> >Ethan Rosenberg
wrote:
>> >> >> 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
>> >> >>
>> >> >>
>> >> >
>>
>> >
>> >> >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
>> >>
>>
>>
>> >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.
>


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


--- End Message ---
--- Begin Message ---
Matijn Woudt wrote:
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

--- End Message ---
--- Begin Message ---
On 13-08-19 11:32 AM, Stuart Dallas wrote:
On 19 Aug 2013, at 16:24, Matijn Woudt <tijn...@gmail.com> wrote:

You might want to explain how you convert form data to JSON without javascript?

PHP can do it. Ruby can do it. .NET can do it. Just because you want to use 
JSON in a web browser where Javascript is the go-to method, doesn't mean JSON 
requires Javascript.

-Stuart



Yes, of course they can do it, but then you first need to submit the POST data 
(which he could not do because of the above). Javascript is more or less the 
only way to do it (yes I know Flash….)

I wasn't speaking to his specific issue as that was solved by an earlier 
response. I was just commenting that the implied intrinsic link between JSON 
and Javascript in what he had said does not exist.

Your post didn't in anyway indicate that your response had nothing to do with his problem:

    "I know you've had the right answer, but I think it's worth
     pointing out that use of JSON in no way requires Javascript,
     despite its name."

As such, given the requirement of POSTing over HTTP(S) and that JavaScript is almost certainly more frequently used than ActionScript, I think a JSON based solution was at least 50% linked to JavaScript.

:)

Cheers,
Rob
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--- End Message ---
--- Begin Message ---
Hi guys:

A teacher at my college made the statement that JAVA for Web Development is 
more popular than PHP.

Where can I go to prove this right or wrong -- and/or -- what references do any 
of you have to support your answer? (sounds like a teacher, huh?)

Here are my two references:

http://w3techs.com/technologies/details/pl-php/all/all

http://w3techs.com/technologies/history_overview/programming_language/ms/y 

But I do not know how accurate they are.

What say you?

Cheers,


tedd

_______________
tedd sperling
t...@sperling.com






--- End Message ---

Reply via email to