Getting PHP 5 w/mysqli to communicate with MySQL 5
Getting PHP 5 w/mysqli to communicate with MySQL 5
am 20.01.2006 01:16:03 von Allen Schultz
Hi, all:
I having trouble getting my php to communicate with my MySQL database.
I have it where I can connect, but afterwards, it sees nothing for
information after being connected.
Any suggestions will help.
Thanks,
Allen
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 20.01.2006 01:50:51 von Bastien Koert
code versions of mysql and any error messages would help too
bastien
>From: Allen Schultz
>To: php-db@lists.php.net
>Subject: [PHP-DB] Getting PHP 5 w/mysqli to communicate with MySQL 5
>Date: Thu, 19 Jan 2006 17:16:03 -0700
>
>Hi, all:
>
>I having trouble getting my php to communicate with my MySQL database.
>I have it where I can connect, but afterwards, it sees nothing for
>information after being connected.
>
>Any suggestions will help.
>
>Thanks,
>Allen
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 20.01.2006 02:12:26 von Julien Bonastre
Without some good information I'm going to take a stab in the dark
here..
You are using the mysqli functions right? Not the older mysql ones for
mysql4.x and older??
If you only compiled php with the mysqli libraries then you need to use
them
You "can" connect in some fashions to mysql5 db's with mysql_ functions
and the older libmysql4 libraries but the authentication method needs to
be worked into it [newer mysql password function is different to mysql4
and older password function]
otherwise though I compiled both libraries mysql and mysqli into my
php: http://aries.the-spectrum.org/phpinfo.php and use a mySQL 5 engine
but only using mysql_ functions currently due to backwards compatibility
of old sites and old code.
What exactly are you have troubles with? A code snippet or version
examples would be good. Also is your database mysql5 engine I take it?
Regards,
Julien Bonastre
[aside]
I'll try and be VERY precise from now on in this list so people don't
interrogate my help and advice and construe it as definitive BIBLE like
answers. I'm only trying to help. I am barely 21 and I am non-qualified
academically. Doesn't mean I don't know what I'm talking about. Fear my
wrath, or my wife, equally dangerous I assure you haha.
[/aside]
----- Original Message -----
From: "Allen Schultz"
To:
Sent: Friday, January 20, 2006 10:16 AM
Subject: [PHP-DB] Getting PHP 5 w/mysqli to communicate with MySQL 5
Hi, all:
I having trouble getting my php to communicate with my MySQL database.
I have it where I can connect, but afterwards, it sees nothing for
information after being connected.
Any suggestions will help.
Thanks,
Allen
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.21/235 - Release Date:
19/01/2006
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.21/235 - Release Date: 19/01/2006
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 20.01.2006 13:19:11 von Arie Nugraha
------=_Part_574_657710.1137759551203
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
To solve compability problem with mysql library, try to save your mysql use=
r
password with OLD_PASSWORD('some pass') function, not the ordinary
PASSWORD('some pass') function.
With this you can connect to MySQL 4.1 > 5 even with php 4
------=_Part_574_657710.1137759551203--
Re: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 20.01.2006 18:51:40 von Allen Schultz
Sorry, I was in a rush to work guys.
All these were downloaded pre-compliled for Win32.
Apache 2.0.55
PHP 5.1.1 w/php_mysqli.dll (improved mysql)
MySQL 5.0.18
This script:
$link =3D mysqli_connect('localhost','root','xxxxxx');
if (mysqli_connect_errno()) {
echo "error";
exit();
} else { echo "no error"; }
?>
turns into this:
no error
And this script:
$link =3D mysqli_connect('localhost','root','xxxxxx');
if (mysqli_connect_errno()) {
echo "error";
exit();
}
if (!mysqli_select_db($link,"pers")) {
echo "pers not found"; }
else {
if ($result =3D mysqli_multi_query($link, "select helloworld();")) {
$row =3D mysqli_fetch_array($result, MYSQLI_NUM);
echo $row[0];
} else { echo "problem :("; }
}
?>
turns to this:
In summary again, It seems to want to connect to the database, but
doesnt see anything after connecting using mysqli functions. That
helloworld() function in the database exists.
I'm following this page for a tutorial to find out why I cant use the datab=
ase:
http://mysql.gilfster.com/page.php?parent_id=3D4&page_id=3D4 .0.2
On 1/19/06, Julien Bonastre wrote:
> If you only compiled php with the mysqli libraries then you need to use
> them
>
> What exactly are you have troubles with? A code snippet or version
> examples would be good. Also is your database mysql5 engine I take it?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 22.01.2006 19:34:15 von Unknown Unknown
------=_Part_19832_26114572.1137954855805
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
did you turn on display_errors and set error reporting to E_ALL in php.ini?
if not you should
On 1/20/06, Allen Schultz wrote:
>
> Sorry, I was in a rush to work guys.
>
> All these were downloaded pre-compliled for Win32.
> Apache 2.0.55
> PHP 5.1.1 w/php_mysqli.dll (improved mysql)
> MySQL 5.0.18
>
> This script:
>
>
>
> $link =3D mysqli_connect('localhost','root','xxxxxx');
> if (mysqli_connect_errno()) {
> echo "error";
> exit();
> } else { echo "no error"; }
> ?>
>
>
> turns into this:
>
>
> no error
>
>
> And this script:
>
>
>
> $link =3D mysqli_connect('localhost','root','xxxxxx');
> if (mysqli_connect_errno()) {
> echo "error";
> exit();
> }
> if (!mysqli_select_db($link,"pers")) {
> echo "pers not found"; }
> else {
> if ($result =3D mysqli_multi_query($link, "select helloworld();")) {
> $row =3D mysqli_fetch_array($result, MYSQLI_NUM);
> echo $row[0];
> } else { echo "problem :("; }
> }
> ?>
>
>
> turns to this:
>
>
>
>
> In summary again, It seems to want to connect to the database, but
> doesnt see anything after connecting using mysqli functions. That
> helloworld() function in the database exists.
> I'm following this page for a tutorial to find out why I cant use the
> database:
>
> http://mysql.gilfster.com/page.php?parent_id=3D4&page_id=3D4 .0.2
>
> On 1/19/06, Julien Bonastre wrote:
> > If you only compiled php with the mysqli libraries then you need to use
> > them
> >
> > What exactly are you have troubles with? A code snippet or version
> > examples would be good. Also is your database mysql5 engine I take it?
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
------=_Part_19832_26114572.1137954855805--
Re: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 22.01.2006 19:43:06 von Allen Schultz
Just turned on display_errors. Let me check.
On 1/22/06, PHP Superman wrote:
> did you turn on display_errors and set error reporting to E_ALL in php.in=
i?
> if not you should
>
>
> On 1/20/06, Allen Schultz wrote:
> >
> > Sorry, I was in a rush to work guys.
> >
> > All these were downloaded pre-compliled for Win32.
> > Apache 2.0.55
> > PHP 5.1.1 w/php_mysqli.dll (improved mysql)
> > MySQL 5.0.18
> >
> > This script:
> >
> >
> >
> > $link =3D mysqli_connect('localhost','root','xxxxxx');
> > if (mysqli_connect_errno()) {
> > echo "error";
> > exit();
> > } else { echo "no error"; }
> > ?>
> >
> >
> > turns into this:
> >
> >
> > no error
> >
> >
> > And this script:
> >
> >
> >
> > $link =3D mysqli_connect('localhost','root','xxxxxx');
> > if (mysqli_connect_errno()) {
> > echo "error";
> > exit();
> > }
> > if (!mysqli_select_db($link,"pers")) {
> > echo "pers not found"; }
> > else {
> > if ($result =3D mysqli_multi_query($link, "select helloworld();")) {
> > $row =3D mysqli_fetch_array($result, MYSQLI_NUM);
> > echo $row[0];
> > } else { echo "problem :("; }
> > }
> > ?>
> >
> >
> > turns to this:
> >
> >
> >
> >
> > In summary again, It seems to want to connect to the database, but
> > doesnt see anything after connecting using mysqli functions. That
> > helloworld() function in the database exists.
> > I'm following this page for a tutorial to find out why I cant use the
> database:
> >
> >
> http://mysql.gilfster.com/page.php?parent_id=3D4&page_id=3D4 .0.2
> >
> > On 1/19/06, Julien Bonastre < julien@the-spectrum.org> wrote:
> > > If you only compiled php with the mysqli libraries then you need to u=
se
> > > them
> > >
> > > What exactly are you have troubles with? A code snippet or version
> > > examples would be good. Also is your database mysql5 engine I take it=
?
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 22.01.2006 19:53:16 von Allen Schultz
Nope, still getting the same responses.
On 1/22/06, Allen Schultz wrote:
> Just turned on display_errors. Let me check.
>
> On 1/22/06, PHP Superman wrote:
> > did you turn on display_errors and set error reporting to E_ALL in php.=
ini?
> > if not you should
> >
> >
> > On 1/20/06, Allen Schultz wrote:
> > >
> > > Sorry, I was in a rush to work guys.
> > >
> > > All these were downloaded pre-compliled for Win32.
> > > Apache 2.0.55
> > > PHP 5.1.1 w/php_mysqli.dll (improved mysql)
> > > MySQL 5.0.18
> > >
> > > This script:
> > >
> > >
> > >
> > > $link =3D mysqli_connect('localhost','root','xxxxxx');
> > > if (mysqli_connect_errno()) {
> > > echo "error";
> > > exit();
> > > } else { echo "no error"; }
> > > ?>
> > >
> > >
> > > turns into this:
> > >
> > >
> > > no error
> > >
> > >
> > > And this script:
> > >
> > >
> > >
> > > $link =3D mysqli_connect('localhost','root','xxxxxx');
> > > if (mysqli_connect_errno()) {
> > > echo "error";
> > > exit();
> > > }
> > > if (!mysqli_select_db($link,"pers")) {
> > > echo "pers not found"; }
> > > else {
> > > if ($result =3D mysqli_multi_query($link, "select helloworld();")) {
> > > $row =3D mysqli_fetch_array($result, MYSQLI_NUM);
> > > echo $row[0];
> > > } else { echo "problem :("; }
> > > }
> > > ?>
> > >
> > >
> > > turns to this:
> > >
> > >
> > >
> > >
> > > In summary again, It seems to want to connect to the database, but
> > > doesnt see anything after connecting using mysqli functions. That
> > > helloworld() function in the database exists.
> > > I'm following this page for a tutorial to find out why I cant use the
> > database:
> > >
> > >
> > http://mysql.gilfster.com/page.php?parent_id=3D4&page_id=3D4 .0.2
> > >
> > > On 1/19/06, Julien Bonastre < julien@the-spectrum.org> wrote:
> > > > If you only compiled php with the mysqli libraries then you need to=
use
> > > > them
> > > >
> > > > What exactly are you have troubles with? A code snippet or version
> > > > examples would be good. Also is your database mysql5 engine I take =
it?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 22.01.2006 22:14:14 von Allen Schultz
Nevermind, fellow php users, unless you want to try to think of
solving this problem for us in the near future. :)
I have uninstalled PHP5, and reinstall PHP as v4.4.2 using mysql and
old_password in database to get PHP to talk with mysql. *Sigh.* I
don't know what happened.
Thanks to all that helped,
Allen
PS: thanks for bringing up that display_errors to on thing. But weird
that PHP4 reported it and not php5.
> On 1/22/06, Allen Schultz wrote:
> > Just turned on display_errors. Let me check.
> >
> > On 1/22/06, PHP Superman wrote:
> > > did you turn on display_errors and set error reporting to E_ALL in ph=
p.ini?
> > > if not you should
> > >
> > > On 1/20/06, Allen Schultz wrote:
> > > >
> > > > Sorry, I was in a rush to work guys.
> > > >
> > > > All these were downloaded pre-compliled for Win32.
> > > > Apache 2.0.55
> > > > PHP 5.1.1 w/php_mysqli.dll (improved mysql)
> > > > MySQL 5.0.18
> > > >
> > > > This script:
> > > >
> > > >
> > > >
> > > > $link =3D mysqli_connect('localhost','root','xxxxxx');
> > > > if (mysqli_connect_errno()) {
> > > > echo "error";
> > > > exit();
> > > > } else { echo "no error"; }
> > > > ?>
> > > >
> > > >
> > > > turns into this:
> > > >
> > > >
> > > > no error
> > > >
> > > >
> > > > And this script:
> > > >
> > > >
> > > >
> > > > $link =3D mysqli_connect('localhost','root','xxxxxx');
> > > > if (mysqli_connect_errno()) {
> > > > echo "error";
> > > > exit();
> > > > }
> > > > if (!mysqli_select_db($link,"pers")) {
> > > > echo "pers not found"; }
> > > > else {
> > > > if ($result =3D mysqli_multi_query($link, "select helloworld();")) =
{
> > > > $row =3D mysqli_fetch_array($result, MYSQLI_NUM);
> > > > echo $row[0];
> > > > } else { echo "problem :("; }
> > > > }
> > > > ?>
> > > >
> > > >
> > > > turns to this:
> > > >
> > > >
> > > >
> > > >
> > > > In summary again, It seems to want to connect to the database, but
> > > > doesnt see anything after connecting using mysqli functions. That
> > > > helloworld() function in the database exists.
> > > > I'm following this page for a tutorial to find out why I cant use t=
he
> > > database:
> > > >
> > > >
> > > http://mysql.gilfster.com/page.php?parent_id=3D4&page_id=3D4 .0.2
> > > >
> > > > On 1/19/06, Julien Bonastre < julien@the-spectrum.org> wrote:
> > > > > If you only compiled php with the mysqli libraries then you need =
to use
> > > > > them
> > > > >
> > > > > What exactly are you have troubles with? A code snippet or versio=
n
> > > > > examples would be good. Also is your database mysql5 engine I tak=
e it?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Getting PHP 5 w/mysqli to communicate with MySQL 5
am 22.01.2006 22:15:17 von Georg Richter
Am Fr, den 20.01.2006 schrieb Allen Schultz um 1:16:
> Hi, all:
>
> I having trouble getting my php to communicate with my MySQL database.
> I have it where I can connect, but afterwards, it sees nothing for
> information after being connected.
Any additonal information would be helpful...
a) what doesn't work ?
b) do you get any error messages?
c) which platform and versions of PHP and MYSQL do you use?
/Georg
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php