RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-07 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 06 January 2005 21:10, Norland, Martin wrote:

> > -Original Message-
> > From: Ford, Mike [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, January 06, 2005 1:13 PM
> > Subject: RE: [PHP-DB] Trying to connext to MySQL with PEAR [snip]
> > Oh dear, as a fully-paid-up pedant, I'm afriad I can't resist this
> > one: 
> > 
> > Doesn't affect the answer, but this occurrence of 'effect' should
> > be 'affect'. ;) 
> > 
> > Cheers!
> > 
> > Mike
> 
> * Joining in on the fun *
> 
> I'm afraid you spelled afraid incorrectly.  I'll be sending you the
> bill for my services related to this matter.

Please send it to Mr Murphy, who obviously insinuated one of his pet
gremlins into my keyboard for those few moments...! ;)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jochem Maas
Ford, Mike wrote:
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

On 06 January 2005 16:39, Jochem Maas wrote:

Hutchins, Richard wrote:
echo $dsn; $isPersistant = TRUE;
doesn't effect the code but 'Persistant' is spelled 'Persistent'

Oh dear, as a fully-paid-up pedant, I'm afriad I can't resist this one:
Doesn't affect the answer, but this occurrence of 'effect' should be
'affect'. ;)
DOH! :-)
Cheers!
Mike
-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Norland, Martin
> -Original Message-
> From: Ford, Mike [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 06, 2005 1:13 PM
> Subject: RE: [PHP-DB] Trying to connext to MySQL with PEAR
[snip]
> Oh dear, as a fully-paid-up pedant, I'm afriad I can't resist this
one:
> 
> Doesn't affect the answer, but this occurrence of 'effect' should be
'affect'. ;)
> 
> Cheers!
> 
> Mike

* Joining in on the fun *

I'm afraid you spelled afraid incorrectly.  I'll be sending you the bill
for my services related to this matter.

:)

- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Wong
On Friday 07 January 2005 03:12, Ford, Mike wrote:
> Oh dear, as a fully-paid-up pedant, I'm afriad I can't resist this one:

I'm afraid it's "afraid" ... :-)

> Doesn't affect the answer, but this occurrence of 'effect' should be
> 'affect'. ;)

Yeah and it annoys me too when people mix up "you're" and "your", and just to 
annoy the Americans, it's "ensure" and not "insure"!

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
New Year Resolution: Ignore top posted posts

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 06 January 2005 16:39, Jochem Maas wrote:

> Hutchins, Richard wrote:
> > echo $dsn; $isPersistant = TRUE;
> 
> doesn't effect the code but 'Persistant' is spelled 'Persistent'

Oh dear, as a fully-paid-up pedant, I'm afriad I can't resist this one:

Doesn't affect the answer, but this occurrence of 'effect' should be
'affect'. ;)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
This helped a LOT! With that info I was able to figure out that I need to do
this. http://dev.mysql.com/doc/mysql/en/Old_client.html
Thanks everyone,

Jason Davis


"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thursday 06 January 2005 23:41, Jason Davis wrote:
> > Hi all I am new to PHP and am trying to connect to mysql for the first
> > time.
>
> In that case I strongly suggest that you at least vaguely familiarise
yourself
> with using the basic PHP-native mysql_*() functions first. Go through the
> examples in the manual, learn how to:
>
> - connect to the server
> - select a database
> - perform some simple queries
> - retrieve the results of the queries
> - handle errors
>
> Whilst doing that you will have also confirmed whether your connection
> parameters (username/password/hostname/dbname) are correct.
>
> > I get activity on the mysql monitor when I run it,
>
> What is this monitor? Doesn't it give any clearer indication of what is
> failing? Because this ...
>
> > but get the following error.
> > DB Error: connect failed
>
> ... seems to be an error produced by your Pear DB class and isn't very
> informative at all. If you do the above and use mysql_error() you'll get a
> more precise error message.
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-db
> --
> New Year Resolution: Ignore top posted posts


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
Ok tried that and go this error message instead.

Client does not support authentication protocol requested by server;
consider upgrading MySQL client

Going to MySQL site to try to figure out what this means/which other clients
are available.

Jason Davis

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thursday 06 January 2005 23:41, Jason Davis wrote:
> > Hi all I am new to PHP and am trying to connect to mysql for the first
> > time.
>
> In that case I strongly suggest that you at least vaguely familiarise
yourself
> with using the basic PHP-native mysql_*() functions first. Go through the
> examples in the manual, learn how to:
>
> - connect to the server
> - select a database
> - perform some simple queries
> - retrieve the results of the queries
> - handle errors
>
> Whilst doing that you will have also confirmed whether your connection
> parameters (username/password/hostname/dbname) are correct.
>
> > I get activity on the mysql monitor when I run it,
>
> What is this monitor? Doesn't it give any clearer indication of what is
> failing? Because this ...
>
> > but get the following error.
> > DB Error: connect failed
>
> ... seems to be an error produced by your Pear DB class and isn't very
> informative at all. If you do the above and use mysql_error() you'll get a
> more precise error message.
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-db
> --
> New Year Resolution: Ignore top posted posts

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread James Pancoast
In my (very) limited experience with PEAR::DB, I've found that
getMessage() doesn't give very verbose error messages :).

So if I'm really having a problem, I do all 4 of these:

echo 'Standard Message: ' . $db->getMessage() . "\n";
echo 'Standard Code: ' . $db->getCode() . "\n";
echo 'DBMS/User Message: ' . $db->getUserInfo() . "\n";
echo 'DBMS/Debug Message: ' . $db->getDebugInfo() . "\n";


At least for me, this gives me a lot more useful information (DB
1.6.8, but PHP 5.0.3).  Hope this helps.

On Thu, 6 Jan 2005 11:42:03 -0500, Jason Davis <[EMAIL PROTECTED]> wrote:
> Pear DB version is 1.6.8
> 
> 
> "Jason Davis" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > MySQL 4.1
> > PHP 4.3.10
> > PEAR 0.5.0 (I think, not sure how to test that)
> >
> > On two different boxes
> > one is an XP Pro box
> > one is an Win2K Pro Box
> >
> > both running IIS
> >
> > "Richard Hutchins" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > What version of PHP?
> > > What version of MySQL?
> > >
> > > -Original Message-
> > > From: Jason Davis [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, January 06, 2005 10:42 AM
> > > To: php-db@lists.php.net
> > > Subject: [PHP-DB] Trying to connext to MySQL with PEAR
> > >
> > >
> > > Hi all I am new to PHP and am trying to connect to mysql for the first
> > time.
> > > I get activity on the mysql monitor when I run it, but get the following
> > > error.
> > >
> > > DB Error: connect failed
> > >
> > > The lines of code are:
> > > require_once( "DB.php" );
> > > $dsn = "mysql://".DB_USER.":".DB_PASS."@".DB_SERVER."/".DB_NAME;
> > > echo $dsn;
> > > $isPersistant = TRUE;
> > > $db = DB::connect($dsn, $isPersistant);
> > >
> > > if ( DB::isError( $db ) ) {
> > > die ($db->getMessage());
> > > }
> > >
> > > The constants are properly defined and passing through to this page
> > (checked
> > > with echo), the database is created, the user has an account, and the
> > > account has rights to do all funcitons on the db. Any thoughts on what
> > might
> > > be wrong?
> > >
> > >

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jochem Maas
Hutchins, Richard wrote:
What version of PHP?
What version of MySQL?
while your at it what version of PEAR::DB ;-)
-Original Message-
From: Jason Davis [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 06, 2005 10:42 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Trying to connext to MySQL with PEAR
Hi all I am new to PHP and am trying to connect to mysql for the first time.
I get activity on the mysql monitor when I run it, but get the following
error.
if this is your first time & your new to PHP I would suggest that you 
try the mysql_*() function directly before moving to an Abstraction 
class. that way you are closer to the 'problem' and you also learn the 
underlying functions that the (PEAR) class(es) use.

DB Error: connect failed
The lines of code are:
require_once( "DB.php" );
$dsn = "mysql://".DB_USER.":".DB_PASS."@".DB_SERVER."/".DB_NAME;
echo $dsn;
$isPersistant = TRUE;
doesn't effect the code but 'Persistant' is spelled 'Persistent'
$db = DB::connect($dsn, $isPersistant);
if ( DB::isError( $db ) ) {
try placing the following here (here as in: in this spot in your code). 
not sure if this will work - depends on exactly what goes on inside the 
PEAR DB class - but I guess it will show you a more helpful error than 
the class does:

print_r( mysql_error() );
die ($db->getMessage());
}
The constants are properly defined and passing through to this page (checked
with echo), the database is created, the user has an account, and the
account has rights to do all funcitons on the db. Any thoughts on what might
be wrong?
Thanks
Jason
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
MySQL 4.1
PHP 4.3.10
PEAR 0.5.0 (I think, not sure how to test that)

On two different boxes
one is an XP Pro box
one is an Win2K Pro Box

both running IIS

"Richard Hutchins" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What version of PHP?
> What version of MySQL?
>
> -Original Message-
> From: Jason Davis [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 06, 2005 10:42 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Trying to connext to MySQL with PEAR
>
>
> Hi all I am new to PHP and am trying to connect to mysql for the first
time.
> I get activity on the mysql monitor when I run it, but get the following
> error.
>
> DB Error: connect failed
>
> The lines of code are:
> require_once( "DB.php" );
> $dsn = "mysql://".DB_USER.":".DB_PASS."@".DB_SERVER."/".DB_NAME;
> echo $dsn;
> $isPersistant = TRUE;
> $db = DB::connect($dsn, $isPersistant);
>
> if ( DB::isError( $db ) ) {
> die ($db->getMessage());
> }
>
> The constants are properly defined and passing through to this page
(checked
> with echo), the database is created, the user has an account, and the
> account has rights to do all funcitons on the db. Any thoughts on what
might
> be wrong?
>
>
> Thanks
> Jason
>
> -- 
> 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: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
Pear DB version is 1.6.8


"Jason Davis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> MySQL 4.1
> PHP 4.3.10
> PEAR 0.5.0 (I think, not sure how to test that)
>
> On two different boxes
> one is an XP Pro box
> one is an Win2K Pro Box
>
> both running IIS
>
> "Richard Hutchins" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > What version of PHP?
> > What version of MySQL?
> >
> > -Original Message-
> > From: Jason Davis [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, January 06, 2005 10:42 AM
> > To: php-db@lists.php.net
> > Subject: [PHP-DB] Trying to connext to MySQL with PEAR
> >
> >
> > Hi all I am new to PHP and am trying to connect to mysql for the first
> time.
> > I get activity on the mysql monitor when I run it, but get the following
> > error.
> >
> > DB Error: connect failed
> >
> > The lines of code are:
> > require_once( "DB.php" );
> > $dsn = "mysql://".DB_USER.":".DB_PASS."@".DB_SERVER."/".DB_NAME;
> > echo $dsn;
> > $isPersistant = TRUE;
> > $db = DB::connect($dsn, $isPersistant);
> >
> > if ( DB::isError( $db ) ) {
> > die ($db->getMessage());
> > }
> >
> > The constants are properly defined and passing through to this page
> (checked
> > with echo), the database is created, the user has an account, and the
> > account has rights to do all funcitons on the db. Any thoughts on what
> might
> > be wrong?
> >
> >
> > Thanks
> > Jason
> >
> > -- 
> > 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: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Wong
On Thursday 06 January 2005 23:41, Jason Davis wrote:
> Hi all I am new to PHP and am trying to connect to mysql for the first
> time. 

In that case I strongly suggest that you at least vaguely familiarise yourself 
with using the basic PHP-native mysql_*() functions first. Go through the 
examples in the manual, learn how to:

- connect to the server
- select a database
- perform some simple queries
- retrieve the results of the queries
- handle errors

Whilst doing that you will have also confirmed whether your connection 
parameters (username/password/hostname/dbname) are correct.

> I get activity on the mysql monitor when I run it,  

What is this monitor? Doesn't it give any clearer indication of what is 
failing? Because this ...

> but get the following error.
> DB Error: connect failed

... seems to be an error produced by your Pear DB class and isn't very 
informative at all. If you do the above and use mysql_error() you'll get a 
more precise error message.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
New Year Resolution: Ignore top posted posts

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Hutchins, Richard
What version of PHP?
What version of MySQL?

-Original Message-
From: Jason Davis [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 06, 2005 10:42 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Trying to connext to MySQL with PEAR


Hi all I am new to PHP and am trying to connect to mysql for the first time.
I get activity on the mysql monitor when I run it, but get the following
error.

DB Error: connect failed

The lines of code are:
require_once( "DB.php" );
$dsn = "mysql://".DB_USER.":".DB_PASS."@".DB_SERVER."/".DB_NAME;
echo $dsn;
$isPersistant = TRUE;
$db = DB::connect($dsn, $isPersistant);

if ( DB::isError( $db ) ) {
die ($db->getMessage());
}

The constants are properly defined and passing through to this page (checked
with echo), the database is created, the user has an account, and the
account has rights to do all funcitons on the db. Any thoughts on what might
be wrong?


Thanks
Jason

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



[PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
Hi all I am new to PHP and am trying to connect to mysql for the first time.
I get activity on the mysql monitor when I run it, but get the following
error.

DB Error: connect failed

The lines of code are:
require_once( "DB.php" );
$dsn = "mysql://".DB_USER.":".DB_PASS."@".DB_SERVER."/".DB_NAME;
echo $dsn;
$isPersistant = TRUE;
$db = DB::connect($dsn, $isPersistant);

if ( DB::isError( $db ) ) {
die ($db->getMessage());
}

The constants are properly defined and passing through to this page (checked
with echo), the database is created, the user has an account, and the
account has rights to do all funcitons on the db. Any thoughts on what might
be wrong?


Thanks
Jason

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php