Re: [PHP-DB] Re: PostgreSQL pg_query_params, PHP locales, and double data types

2008-11-16 Thread Chris

Alec Smecher wrote:

Hi all,

If you'll excuse my persistence, I'm still wondering about this issue. 
Is there a better place to go for feedback, or someone I can contact 
directly?


You'll have to join the -internals list if you want to discuss. The 
-general, -db (and other) lists are only 'users' of php, not the core 
developers.


--
Postgresql  php tutorials
http://www.designmagick.com/


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




[PHP-DB] Re: PostgreSQL pg_query_params, PHP locales, and double data types

2008-11-14 Thread Alec Smecher

Hi all,

If you'll excuse my persistence, I'm still wondering about this issue. 
Is there a better place to go for feedback, or someone I can contact 
directly?


Thanks,
Alec Smecher
Public Knowledge Project Team

Alec Smecher wrote:

Hi all,

I'm trying to get a PHP bug in the PostgreSQL pg_query_params function 
reopened; it's been marked bogus (incorrectly IMO). There are lots of 
details at http://bugs.php.net/bug.php?id=46408. If this is in fact 
bogus, I'd appreciate a little bit of feedback.


Many thanks!
Alec Smecher
Public Knowledge Project Team




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



Re: [PHP-DB] Re: PostgreSQL error with PHP

2005-06-27 Thread Martín Marqués
El Dom 26 Jun 2005 22:48, Thomas Bonham escribió:
 Thanks for the help.
 The code now looks like this.
 CODE:
 
 htmlheadtitleLogin/title
 
 /head
 body
 ?php
   
   $conn = pg_connect(user=auth dbname=auth password=redhat)
   or die (Could not connect) ;
   echo Connectd Successfully;
   pg_close($conn);
   
 ?
 /body
 /html
 
 And now the error I get is the following.
 
 
 Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
 IDENT authentication failed for user auth in 
 /var/www/html/thomas/cis166ae/database/secretdb.php on line 8
 Could not connect

Check your pg_hba.conf file. Looks like you have IDENT authentification, and 
auth is not a system user.

Read the PostgreSQL documentation about this.

-- 
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-
Martín Marqués  |   Programador, DBA
Centro de Telemática| Administrador
   Universidad Nacional
del Litoral
-

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



[PHP-DB] Re: PostgreSQL error with PHP

2005-06-26 Thread Thomas Bonham
I modafide the code some more and now with the following code I get this 
error.

CODE:
 htmlheadtitleLogin/title

   /head
   body
   ?php

pg_connect(name=auth); (user=auth);
   ?
   /body
   /html


Parse error: parse error, unexpected '=' in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Thanks

Thomas Bonham wrote:

Hello All,
I’m trying to get php to connect to my PostgreSQL database.
The code that I’m using is below.


   htmlheadtitleLogin/title

   /head
   body
   ?php
   $conn = dbname=auth user=auth;
$db = pg_connect ( $conn );
   ?
   /body
   /html

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Below is how I set up my database.

[EMAIL PROTECTED] # Su – postgres

-bash-3.00$ createuser –D –A –E
auth
-bash-3.00$ createdb auth

Thanks Helping


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



RE: [PHP-DB] Re: PostgreSQL error with PHP

2005-06-26 Thread Robbert van Andel
The error is in your function pg_connect
pg_connect(name=auth user=auth);

I'm not a PostgreSQL user but your connection string should be enclosed into
by quotes.  Documentation can be found at
http://us3.php.net/manual/en/function.pg-connect.php

Hope this helps,
Robbert

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 26, 2005 5:43 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Re: PostgreSQL error with PHP

I modafide the code some more and now with the following code I get this 
error.
CODE:
  htmlheadtitleLogin/title

/head
body
?php

pg_connect(name=auth); (user=auth);
?
/body
/html


Parse error: parse error, unexpected '=' in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8

Thanks

Thomas Bonham wrote:
 Hello All,
 I'm trying to get php to connect to my PostgreSQL database.
 The code that I'm using is below.
 
 
htmlheadtitleLogin/title
 
/head
body
?php
$conn = dbname=auth user=auth;
 $db = pg_connect ( $conn );
?
/body
/html
 
 Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
 IDENT authentication failed for user auth in 
 /var/www/html/thomas/cis166ae/database/secretdb.php on line 8
 
 Below is how I set up my database.
 
 [EMAIL PROTECTED] # Su - postgres
 
 -bash-3.00$ createuser -D -A -E
 auth
 -bash-3.00$ createdb auth
 
 Thanks Helping

-- 
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] Re: PostgreSQL error with PHP

2005-06-26 Thread Thomas Bonham

Thanks for the help.
The code now looks like this.
CODE:

   htmlheadtitleLogin/title

   /head
   body
   ?php

$conn = pg_connect(user=auth dbname=auth password=redhat)
or die (Could not connect) ;
echo Connectd Successfully;
pg_close($conn);

   ?
   /body
   /html

And now the error I get is the following.


Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8

Could not connect


Thomas

Robbert van Andel wrote:

The error is in your function pg_connect
pg_connect(name=auth user=auth);

I'm not a PostgreSQL user but your connection string should be enclosed into
by quotes.  Documentation can be found at
http://us3.php.net/manual/en/function.pg-connect.php

Hope this helps,
Robbert

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 26, 2005 5:43 PM

To: php-db@lists.php.net
Subject: [PHP-DB] Re: PostgreSQL error with PHP

I modafide the code some more and now with the following code I get this 
error.

CODE:
  htmlheadtitleLogin/title

/head
body
?php

pg_connect(name=auth); (user=auth);
?
/body
/html


Parse error: parse error, unexpected '=' in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Thanks

Thomas Bonham wrote:


Hello All,
I'm trying to get php to connect to my PostgreSQL database.
The code that I'm using is below.


  htmlheadtitleLogin/title

  /head
  body
  ?php
  $conn = dbname=auth user=auth;
   $db = pg_connect ( $conn );
  ?
  /body
  /html

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Below is how I set up my database.

[EMAIL PROTECTED] # Su - postgres

-bash-3.00$ createuser -D -A -E
   auth
-bash-3.00$ createdb auth

Thanks Helping





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



RE: [PHP-DB] Re: PostgreSQL error with PHP

2005-06-26 Thread Robbert van Andel
You might need to include the hostname and port.

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 26, 2005 6:48 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Re: PostgreSQL error with PHP

Thanks for the help.
The code now looks like this.
CODE:

htmlheadtitleLogin/title

/head
body
?php

$conn = pg_connect(user=auth dbname=auth password=redhat)
or die (Could not connect) ;
echo Connectd Successfully;
pg_close($conn);

?
/body
/html

And now the error I get is the following.


Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8
Could not connect


Thomas

Robbert van Andel wrote:
 The error is in your function pg_connect
 pg_connect(name=auth user=auth);
 
 I'm not a PostgreSQL user but your connection string should be enclosed
into
 by quotes.  Documentation can be found at
 http://us3.php.net/manual/en/function.pg-connect.php
 
 Hope this helps,
 Robbert
 
 -Original Message-
 From: Thomas Bonham [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, June 26, 2005 5:43 PM
 To: php-db@lists.php.net
 Subject: [PHP-DB] Re: PostgreSQL error with PHP
 
 I modafide the code some more and now with the following code I get this 
 error.
 CODE:
   htmlheadtitleLogin/title
 
 /head
 body
 ?php
   
   pg_connect(name=auth); (user=auth);
 ?
 /body
 /html
 
 
 Parse error: parse error, unexpected '=' in 
 /var/www/html/thomas/cis166ae/database/secretdb.php on line 8
 
 Thanks
 
 Thomas Bonham wrote:
 
Hello All,
I'm trying to get php to connect to my PostgreSQL database.
The code that I'm using is below.


   htmlheadtitleLogin/title

   /head
   body
   ?php
   $conn = dbname=auth user=auth;
$db = pg_connect ( $conn );
   ?
   /body
   /html

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8

Below is how I set up my database.

[EMAIL PROTECTED] # Su - postgres

-bash-3.00$ createuser -D -A -E
auth
-bash-3.00$ createdb auth

Thanks Helping
 
 

-- 
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] Re: PostgreSQL error with PHP

2005-06-26 Thread Thomas Bonham
I add the hostname and port, then I configure postgresql.conf and enable 
the port 5432 line in the config file.


So this is the new code.


   htmlheadtitleLogin/title

   /head
   body
   ?php

$conn = pg_connect(
user=auth dbname=auth password=redhat host=thomas.example.com
port=5432 ) or die (Could not connect) ;
echo Connected Successfully;
pg_close($conn);

   ?
   /body
   /html

With the new error.

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not 
connect to server: Connection refused Is the server running on host 
thomas.example.com and accepting TCP/IP connections on port 5432? in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 10

Could not connect

Thomas



Robbert van Andel wrote:

You might need to include the hostname and port.

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 26, 2005 6:48 PM

To: php-db@lists.php.net
Subject: Re: [PHP-DB] Re: PostgreSQL error with PHP

Thanks for the help.
The code now looks like this.
CODE:

htmlheadtitleLogin/title

/head
body
?php

$conn = pg_connect(user=auth dbname=auth password=redhat)
or die (Could not connect) ;
echo Connectd Successfully;
pg_close($conn);

?
/body
/html

And now the error I get is the following.


Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8

Could not connect


Thomas

Robbert van Andel wrote:


The error is in your function pg_connect
pg_connect(name=auth user=auth);

I'm not a PostgreSQL user but your connection string should be enclosed


into


by quotes.  Documentation can be found at
http://us3.php.net/manual/en/function.pg-connect.php

Hope this helps,
Robbert

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 26, 2005 5:43 PM

To: php-db@lists.php.net
Subject: [PHP-DB] Re: PostgreSQL error with PHP

I modafide the code some more and now with the following code I get this 
error.

CODE:
 htmlheadtitleLogin/title

   /head
   body
   ?php

pg_connect(name=auth); (user=auth);
   ?
   /body
   /html


Parse error: parse error, unexpected '=' in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Thanks

Thomas Bonham wrote:



Hello All,
I'm trying to get php to connect to my PostgreSQL database.
The code that I'm using is below.


 htmlheadtitleLogin/title

 /head
 body
 ?php
 $conn = dbname=auth user=auth;
  $db = pg_connect ( $conn );
 ?
 /body
 /html

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Below is how I set up my database.

[EMAIL PROTECTED] # Su - postgres

-bash-3.00$ createuser -D -A -E
  auth
-bash-3.00$ createdb auth

Thanks Helping







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



Re: [PHP-DB] Re: PostgreSQL error with PHP

2005-06-26 Thread Thomas Bonham

I rewrote the code. This is the code and errors.
This is starting to get old, I have been working on this for over a week 
now.


CODE:

   htmlheadtitleLogin/title

   /head
   body
   ?php

$conn = user=auth password=redhat
dbname=auth host=localhost port=5432;

$dbconn = pg_connect($conn);
echo Connected Successfully;


   ?
   /body
   /html

Error:

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not 
connect to server: Connection refused Is the server running on host 
localhost and accepting TCP/IP connections on port 5432? in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 11

Connected Successfully


Thomas



Thomas Bonham wrote:
I add the hostname and port, then I configure postgresql.conf and enable 
the port 5432 line in the config file.


So this is the new code.


   htmlheadtitleLogin/title

   /head
   body
   ?php

$conn = pg_connect(

user=auth dbname=auth password=redhat host=thomas.example.com
port=5432 ) or die (Could not connect) ;
echo Connected Successfully;
pg_close($conn);

   ?

   /body
   /html

With the new error.

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not 
connect to server: Connection refused Is the server running on host 
thomas.example.com and accepting TCP/IP connections on port 5432? in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 10

Could not connect

Thomas



Robbert van Andel wrote:


You might need to include the hostname and port.

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] Sent: Sunday, 
June 26, 2005 6:48 PM

To: php-db@lists.php.net
Subject: Re: [PHP-DB] Re: PostgreSQL error with PHP

Thanks for the help.
The code now looks like this.
CODE:

htmlheadtitleLogin/title

/head
body
?php

$conn = pg_connect(user=auth dbname=auth password=redhat)

or die (Could not connect) ;
echo Connectd Successfully;
pg_close($conn);

?

/body
/html

And now the error I get is the following.


Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8

Could not connect


Thomas

Robbert van Andel wrote:


The error is in your function pg_connect
pg_connect(name=auth user=auth);

I'm not a PostgreSQL user but your connection string should be enclosed



into


by quotes.  Documentation can be found at
http://us3.php.net/manual/en/function.pg-connect.php

Hope this helps,
Robbert

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] Sent: Sunday, 
June 26, 2005 5:43 PM

To: php-db@lists.php.net
Subject: [PHP-DB] Re: PostgreSQL error with PHP

I modafide the code some more and now with the following code I get 
this error.

CODE:
 htmlheadtitleLogin/title

   /head
   body
   ?php
  
pg_connect(name=auth); (user=auth);

   ?
   /body
   /html


Parse error: parse error, unexpected '=' in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Thanks

Thomas Bonham wrote:



Hello All,
I'm trying to get php to connect to my PostgreSQL database.
The code that I'm using is below.


 htmlheadtitleLogin/title

 /head
 body
 ?php
 $conn = dbname=auth user=auth;
  $db = pg_connect ( $conn );
 ?
 /body
 /html

Warning: pg_connect(): Unable to connect to PostgreSQL server: 
FATAL: IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Below is how I set up my database.

[EMAIL PROTECTED] # Su - postgres

-bash-3.00$ createuser -D -A -E
  auth
-bash-3.00$ createdb auth

Thanks Helping








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



RE: [PHP-DB] Re: PostgreSQL error with PHP

2005-06-26 Thread Robbert van Andel
Can you log into the PostgreSQL server from the console or command line?
Are you sure you are using the right username, password or host?

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 26, 2005 8:03 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Re: PostgreSQL error with PHP

I rewrote the code. This is the code and errors.
This is starting to get old, I have been working on this for over a week 
now.

CODE:

htmlheadtitleLogin/title

/head
body
?php

$conn = user=auth password=redhat
dbname=auth host=localhost port=5432;

$dbconn = pg_connect($conn);
echo Connected Successfully;


?
/body
/html

Error:

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not 
connect to server: Connection refused Is the server running on host 
localhost and accepting TCP/IP connections on port 5432? in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 11
Connected Successfully


Thomas



Thomas Bonham wrote:
 I add the hostname and port, then I configure postgresql.conf and enable 
 the port 5432 line in the config file.
 
 So this is the new code.
 
 
htmlheadtitleLogin/title
 
/head
body
?php
 
 $conn = pg_connect(
 user=auth dbname=auth password=redhat host=thomas.example.com
 port=5432 ) or die (Could not connect) ;
 echo Connected Successfully;
 pg_close($conn);
 
?
/body
/html
 
 With the new error.
 
 Warning: pg_connect(): Unable to connect to PostgreSQL server: could not 
 connect to server: Connection refused Is the server running on host 
 thomas.example.com and accepting TCP/IP connections on port 5432? in 
 /var/www/html/thomas/cis166ae/database/secretdb.php on line 10
 Could not connect
 
 Thomas
 
 
 
 Robbert van Andel wrote:
 
 You might need to include the hostname and port.

 -Original Message-
 From: Thomas Bonham [mailto:[EMAIL PROTECTED] Sent: Sunday, 
 June 26, 2005 6:48 PM
 To: php-db@lists.php.net
 Subject: Re: [PHP-DB] Re: PostgreSQL error with PHP

 Thanks for the help.
 The code now looks like this.
 CODE:

 htmlheadtitleLogin/title

 /head
 body
 ?php
 
 $conn = pg_connect(user=auth dbname=auth password=redhat)
 or die (Could not connect) ;
 echo Connectd Successfully;
 pg_close($conn);
 
 ?
 /body
 /html

 And now the error I get is the following.


 Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
 IDENT authentication failed for user auth in 
 /var/www/html/thomas/cis166ae/database/secretdb.php on line 8
 Could not connect


 Thomas

 Robbert van Andel wrote:

 The error is in your function pg_connect
 pg_connect(name=auth user=auth);

 I'm not a PostgreSQL user but your connection string should be enclosed


 into

 by quotes.  Documentation can be found at
 http://us3.php.net/manual/en/function.pg-connect.php

 Hope this helps,
 Robbert

 -Original Message-
 From: Thomas Bonham [mailto:[EMAIL PROTECTED] Sent: Sunday, 
 June 26, 2005 5:43 PM
 To: php-db@lists.php.net
 Subject: [PHP-DB] Re: PostgreSQL error with PHP

 I modafide the code some more and now with the following code I get 
 this error.
 CODE:
  htmlheadtitleLogin/title

/head
body
?php
   
 pg_connect(name=auth); (user=auth);
?
/body
/html


 Parse error: parse error, unexpected '=' in 
 /var/www/html/thomas/cis166ae/database/secretdb.php on line 8

 Thanks

 Thomas Bonham wrote:


 Hello All,
 I'm trying to get php to connect to my PostgreSQL database.
 The code that I'm using is below.


  htmlheadtitleLogin/title

  /head
  body
  ?php
  $conn = dbname=auth user=auth;
   $db = pg_connect ( $conn );
  ?
  /body
  /html

 Warning: pg_connect(): Unable to connect to PostgreSQL server: 
 FATAL: IDENT authentication failed for user auth in 
 /var/www/html/thomas/cis166ae/database/secretdb.php on line 8

 Below is how I set up my database.

 [EMAIL PROTECTED] # Su - postgres

 -bash-3.00$ createuser -D -A -E
   auth
 -bash-3.00$ createdb auth

 Thanks Helping





-- 
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] Re: PostgreSQL error with PHP

2005-06-26 Thread Thomas Bonham

I think so.
I'm going to go there my book (agin) and I'm also going to ask the head 
IT guy.


Thanks for all of your help!

Thomas


Robbert van Andel wrote:

Can you log into the PostgreSQL server from the console or command line?
Are you sure you are using the right username, password or host?

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 26, 2005 8:03 PM

To: php-db@lists.php.net
Subject: Re: [PHP-DB] Re: PostgreSQL error with PHP

I rewrote the code. This is the code and errors.
This is starting to get old, I have been working on this for over a week 
now.


CODE:

htmlheadtitleLogin/title

/head
body
?php

$conn = user=auth password=redhat
dbname=auth host=localhost port=5432;

$dbconn = pg_connect($conn);
echo Connected Successfully;


?
/body
/html

Error:

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not 
connect to server: Connection refused Is the server running on host 
localhost and accepting TCP/IP connections on port 5432? in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 11

Connected Successfully


Thomas



Thomas Bonham wrote:

I add the hostname and port, then I configure postgresql.conf and enable 
the port 5432 line in the config file.


So this is the new code.


  htmlheadtitleLogin/title

  /head
  body
  ?php
   
   $conn = pg_connect(

   user=auth dbname=auth password=redhat host=thomas.example.com
   port=5432 ) or die (Could not connect) ;
   echo Connected Successfully;
   pg_close($conn);
   
  ?

  /body
  /html

With the new error.

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not 
connect to server: Connection refused Is the server running on host 
thomas.example.com and accepting TCP/IP connections on port 5432? in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 10

Could not connect

Thomas



Robbert van Andel wrote:



You might need to include the hostname and port.

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] Sent: Sunday, 
June 26, 2005 6:48 PM

To: php-db@lists.php.net
Subject: Re: [PHP-DB] Re: PostgreSQL error with PHP

Thanks for the help.
The code now looks like this.
CODE:

   htmlheadtitleLogin/title

   /head
   body
   ?php
   
   $conn = pg_connect(user=auth dbname=auth password=redhat)

   or die (Could not connect) ;
   echo Connectd Successfully;
   pg_close($conn);
   
   ?

   /body
   /html

And now the error I get is the following.


Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8

Could not connect


Thomas

Robbert van Andel wrote:



The error is in your function pg_connect
pg_connect(name=auth user=auth);

I'm not a PostgreSQL user but your connection string should be enclosed



into



by quotes.  Documentation can be found at
http://us3.php.net/manual/en/function.pg-connect.php

Hope this helps,
Robbert

-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED] Sent: Sunday, 
June 26, 2005 5:43 PM

To: php-db@lists.php.net
Subject: [PHP-DB] Re: PostgreSQL error with PHP

I modafide the code some more and now with the following code I get 
this error.

CODE:
htmlheadtitleLogin/title

  /head
  body
  ?php
 
   pg_connect(name=auth); (user=auth);

  ?
  /body
  /html


Parse error: parse error, unexpected '=' in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Thanks

Thomas Bonham wrote:




Hello All,
I'm trying to get php to connect to my PostgreSQL database.
The code that I'm using is below.


htmlheadtitleLogin/title

/head
body
?php
$conn = dbname=auth user=auth;
 $db = pg_connect ( $conn );
?
/body
/html

Warning: pg_connect(): Unable to connect to PostgreSQL server: 
FATAL: IDENT authentication failed for user auth in 
/var/www/html/thomas/cis166ae/database/secretdb.php on line 8


Below is how I set up my database.

[EMAIL PROTECTED] # Su - postgres

-bash-3.00$ createuser -D -A -E
 auth
-bash-3.00$ createdb auth

Thanks Helping








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



[PHP-DB] Re: PostgreSQL

2004-09-29 Thread Stefan Reimers
M Saleh Eg wrote:
Any Idea about where I'd get an installer version of PostgreSQL for windows?
Wow, I recently had a project working on PostgreSQL.
For local development we installed cygwin on WIN and tried to keep that 
working.
How long does that installer exist?
Nevertheless, thx for the link, I reported it to my successors on the 
project.

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


[PHP-DB] Re: PostgreSQL lib and character case

2004-04-28 Thread Hans Lellelid
Hi -

Tumurbaatar S. wrote:
I use pg_fetch_array() to get a record content. But it seems that
to access elements of  the returned associative array, I should
use lowercase field names. Is there any way to use case-insensitive
field names?
This is how Postgres works: it always returns arrays indexed with 
lowercase results.  AFAIK there's no way to change this behavior from PHP.

In general, it's important to know that different databases do this 
differently:

 - MySQL will return case matching the case of column names in the db 
-- or if you specify column names in your select clause (SELECT 
myColUmnName FROM ...) then the case of the array will match the case 
you use in your SELECT clause.
 - Oracle will return all UPPERCASE column names.
 - SQLite is configurable (defaults to mixed case)
 - PostgreSQL returns all lowercase
  ... etc.

Of course, as someone mentioned, you can always col strtolower() when 
trying to access a column from postgres result set:

$arr = pg_fetch_array($q);
$value = $arr[ strtolower($mixedCaseColName) ];
It's best practice to use a database abstraction layer that provides 
column name case changing portability features -- like PEAR::DB or 
Creole.  That way you can always use a single case (e.g. lowercase) for 
accessing columns and you won't have to rewrite all your code when you 
try to deploy your app on Oracle.

Hans

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


[PHP-DB] Re: postgresql

2004-04-14 Thread Jason S Motes
if i remember correctly you have to do this

  su
  su postgres
  createuser your-user-id


Adam Williams wrote:
Hi, I know this isn't PHP related but I have a quick question about 
postgresql.  I come from a mysql enviroment so I'm a little clueless, even 
after reading the postgresql docs.  

I am moving a postgresql database from one server to another.  As the user 
that owns the database, lculber, I ran pg_dump sroom1  sroom1.database 
but on the server I'm moving the database to, I can't figure out how to 
get into psql to create the user lculber so I can do psql sroom1  
sroom1.database

so how can I create the users lculber in postgresql.  I can't even connect 
to psql.  any advice? :)  below is my command.  I'm not trying to database 
root, I just want to get the psql prompt so I can create the user lculber.

[EMAIL PROTECTED] root]# psql -U root
psql: FATAL:  Database root does not exist in the system catalog.
[EMAIL PROTECTED] root]# createuser lculber
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
psql: FATAL:  user root does not exist
createuser: creation of user lculber failed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: PostgreSQL connection

2003-08-15 Thread Stephane
take a look at your postgresql.conf config
optimize request and test  your requests


Joe Nilson Zegarra Galvez [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi all, i have a question, i have a php file with all my class to
 connect into a postgresql db and i'm using the pg_connect in this form:

 pg_connect(192.168.1.100$dbase);

 but when i have 8 or 10 users inserting data the db response is very
 slow, is problem in the pg_connect?, all ppl use the same file_class.php
 to connect to the db.

 The SErver is a Compaq Proliant with two Xeon 2.20Ghz Processors, 1Gb
 Memory, 20Gb SCSI HD, 1Gb Ethernet and Redhat Linux with apache 2.0.47,
 php 4.2.2 and PostgreSQL 7.2.2

 Thankx for your answers

 Regards


 Nilson




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



[PHP-DB] Re: postgresql vs mysql

2003-01-02 Thread Diggy Bell
Ellen,

From a strict database perspective, PostgreSQL has a bit more power than
MySQL.  In particular, support for transactions (and database integrity) is
very complete with PostgreSQL.  With that being the case, the disadvantage
would be with MySQL, not PostgreSQL.

In addition, Tim Purdue (sourceforge.net) has done some excellent work to
compare MySQL and PostgreSQL.  His investigation concluded that PostgreSQL
was not only stronger in terms of database features, but was also able to
completely outperform MySQL, particularly on complex queries.  In
particular, the main reason for this was due to MySQL's table-level locking
as compared to PostgreSQL's 'better than row level' locking.

In my personal experiences, I've used PostgreSQL a lot more than MySQL.
It's been rock solid underneath a survey and assessment application that
would bring MySQL to it's knees.  Most of my career has been spent with very
large databases, including Oracle and others.  For my work, I can quite
happily say I'll never have to suffer through Oracle again!

Good luck with the project!

--
William D. 'Diggy' Bell
Principal
DB Software Development
http://www.dbsoftdev.com

Ellen Solomon [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm starting a project for which the lead programmer wants to use
 postgresql. I'll be working in php. Any major disadvantages to
 postgresql over mysql, other than mysql seems to be more widespread?

 TIA
 Ellen




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




[PHP-DB] Re: PostgreSQL and HTML output

2002-10-18 Thread Yasuo Ohgaki
Edwin Robertson wrote:
(B With psql you can get all your output in HTML format.  Anyone know of a way
(B to do this in PHP?
(B
(BIt's psql feature and there is no automatic HTML format
(Bin PHP's pgsql module.
(B
(BIf really would like, you can use passthru() and psql.
(B
(B?php
(Bpassthru('/usr/local/pgsql/bin/psql -f select.sql -H -U yohgaki -d test');
(B?
(B
(Bwhere "select.sql" is query you need.
(B
(B--
(BYasuo Ohgaki
(B
(B
(B-- 
(BPHP Database Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PostgreSQL and HTML output

2002-10-18 Thread Yasuo Ohgaki
If you need to dump query result for debugging purpose, etc.
(BTry something like,
(B
(B?php
(B
(B$db = pg_connect();
(B$result = pg_query($db, 'SELECT * FROM some_table');
(B
(Becho "pre\n";
(Bvar_dump(pg_fetch_all($result));
(Becho "/pre\n";
(B
(B?
(B
(BYou need PHP 4.3.0-dev or later for pg_fetch_all().
(B
(B--
(BYasuo Ohgaki
(B
(BYasuo Ohgaki wrote:
(B Edwin Robertson wrote:
(B 
(BWith psql you can get all your output in HTML format.  Anyone know of a way
(Bto do this in PHP?
(B 
(B 
(B It's psql feature and there is no automatic HTML format
(B in PHP's pgsql module.
(B 
(B If really would like, you can use passthru() and psql.
(B 
(B ?php
(B passthru('/usr/local/pgsql/bin/psql -f select.sql -H -U yohgaki -d test');
(B ?
(B 
(B where "select.sql" is query you need.
(B 
(B --
(B Yasuo Ohgaki
(B 
(B
(B
(B-- 
(BPHP Database Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-11-23 Thread Paul DuBois

Has this thread got anything at all to do with PHP?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: postgresql groups and users

2001-09-08 Thread Michiel_Lange


I finally had the time to check it out, your solution should be really
close...
to clarify:
- one user can be the member of many groups
- one group can have many members
I thought that was n on m relation, but oh well :)

Anyways:
there's no relation groups, but instead a pg_group and pg_user (real
database users, no new table users or groups, I wanted to eliminate that
one)
so in postgresql I do:
\d pg_group
And the outcome is something like this (it's on another computer, so I
could not copy paste)
Attribute Type  (modifier, but there are none)
groname   name
grousysid integer
grolistinteger[] (- those are square brackets in case it's hard to
see)
Indeces: pg_group_name_index,
  pg_group_sysid_index

When I tried to do a:
SELECT * FROM pg_group WHERE grolist='1005';
I get this error:
ERROR: array_in: Need to specify dimension

I think there's my problem, I don't know how to do that...

(I do my queries always first in pgsql first, then I parse them to php, to
make sure the query will work)
When I do a SELECT * FROM pg_group;
I get this list:
groname   grosysid  grolist
admins 1 {1004}
coders 5 {1006, 1005}
areas  4 {1006,1005}

Now I want the user that logs in with his/her name, and has uid 1005, to
get the options that belong to the groups he's member of.
So I need to filter something like this:
SELECT * FROM pg_group WHERE  his uid is in the grolist;
but how can I manage that?

Hope I have been clearer this time...



   
 
Steve Brett
 
steve.brett@e-   To: [EMAIL PROTECTED]
 
mis.co.ukcc:  
 
  Fax to:  
 
05-09-2001Subject: Re: postgresql groups and users 
 
15:24  
 
   
 
   
 





Michiel Lange [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 for my application in php I connect with a postgresql database.
 In this database I have made users and groups, where 1 user can be the
 member of many groups (n on m relation)
  ^^^
1 to many. 1  n.

 That works, but how do I let php find out if a user is a member of a
 certain group?

do a select . i'm assuming that you post the user id into the groups
tables.

select * from goups where group_id=7 and user_id=1;

if the query returns any results then you have a match.

so :

$numrows=pg_numrows($query);
if ($numrows0){printYou have a matchbr;}

Steve






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: postgresql groups and users

2001-09-05 Thread Steve Brett


Michiel Lange [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 for my application in php I connect with a postgresql database.
 In this database I have made users and groups, where 1 user can be the
 member of many groups (n on m relation)
  ^^^
1 to many. 1  n.

 That works, but how do I let php find out if a user is a member of a
 certain group?

do a select . i'm assuming that you post the user id into the groups tables.

select * from goups where group_id=7 and user_id=1;

if the query returns any results then you have a match.

so :

$numrows=pg_numrows($query);
if ($numrows0){printYou have a matchbr;}

Steve



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PostgreSQL connections within classes collisions.

2001-08-26 Thread Yasuo Ohgaki

I have very smilar code and they are working for me.
I'm using
  - PHP4.0.6 and PHP4.0.7RC1
  - PostgreSQL 7.1.3

They are built from source.
Your PHP might be linked against older libpq(?) than your PostgreSQL?

--
Yasuo Ohgaki

Justin Buist wrote:
 I recently did a re-install of PostgreSQL and php4 on Debian, which has
 broken some development code here.  None of the actual code has changed in
 days, which I can verify against the CVS tree, so I know it's one of two
 things:


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PostgreSQL connections within classes collisions.

2001-08-26 Thread Yasuo Ohgaki

I have very smilar code and they are working for me.
I'm using
  - PHP4.0.6 and PHP4.0.7RC1
  - PostgreSQL 7.1.3

They are built from source.
Your PHP might be linked against older libpq(?) than your PostgreSQL?

--
Yasuo Ohgaki

Justin Buist wrote:
 I recently did a re-install of PostgreSQL and php4 on Debian, which has
 broken some development code here.  None of the actual code has changed in
 days, which I can verify against the CVS tree, so I know it's one of two
 things:


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: Postgresql/PHP backend error

2001-08-21 Thread Steve Brett

i'd trt trawling the newsgroups - started to do it for you but got zillions
of results back.

try postgresql.org for starters ...

Steve

Nigel Gilbert [EMAIL PROTECTED] wrote in message
news:p05100314b7a6fc817874@[192.168.123.1]...
 I have PHP 4.06, Postgres7.1 and Apache on a Solaris server.  Most of
 the time all works as expected.  Occasionally I get an database error:

 Database error
 There was a database error when accessing Database zwg:
 pqReadData() -- backend closed the channel unexpectedly. This probably
 means the backend terminated abnormally before or while processing the
 request.
 (while evaluating: SELECT serializedobject FROM objects WHERE
name='Zurich')

 [This error page is generated by my application; it displays the
 error reported by Postgresql and the SQL that caused the error].

 The error is not caused by my SQL syntax, since this same code
 executes without a problem at other times.

 Has anyone else seen an error like this? Where do I start looking for
 the cause?  Which backend is terminating abnormally (Postgresql or
 PHP?)  and why should it do that?

 Nigel Gilbert





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: Postgresql/PHP backend error

2001-08-21 Thread Yasuo Ohgaki

Nigel Gilbert [EMAIL PROTECTED] wrote in message
news:p05100314b7a6fc817874@[192.168.123.1]...
 I have PHP 4.06, Postgres7.1 and Apache on a Solaris server.  Most
of
 the time all works as expected.  Occasionally I get an database
error:

I think you are better to post your problem in PostgreSQL list.
If you are not using 7.1.2, upgrade to 7.1.2 see if you have problem.
If you get core file, confiugre/build  PostgreSQL with debug and post
back trace to list.

--
Yasuo Ohgaki




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-11 Thread Bob Hall

On Mon, 9 Apr 2001, Bob Hall wrote:

 MySQL is providing an SQL frontend to a
   bunch of tables and indices, that is it ... it is up to the programmer to
   handle the "managing of data" part where it revolves around being
   relational ...
  
   I've developed database apps in which the data was inserted in
   batches, which meant that transactions were unnecessary. On the other
   hand, the apps needed an RDBMS to handle normalized tables.

Okay, so you start the insert, and one of the records in the batch failed
to insert ... then what?  You manually rollback the other ones?

Well, with MySQL, you start the batch over again, but use IGNORE in 
the INSERT statement, and MySQL passes over the records that are 
already inserted.

   A
"transaction" is effectively a batch ... if one of the batch fails, either
the programmer has to manually remember and roll everything back, or you
let the database itself handle it ..

No, a batch isn't very much like a transaction. In OLTP, the DBA 
doesn't initiate a transaction, has no control over it, and can't 
recover lost data. In batch processing, the DBA initiates and 
controls the batch, and any missing data is in the file.

   Futhermore, some datawarehousing and web projects involve relational
   databases that are inserted and updated in batches at night, making
   transactions unnecessary.

See above ... I have an application that loads ACT! data into a database
every night ... each contact in the system has something like 20-30 fields
associated with them ... if, for some reason, *one* of those fields fail
to insert properly, that contact is invalid, and the transaction that its
wrap'd in automatically rolls back everything I've done since the start of
the transaction, so that there is no record of that failed contact except
in my error log file ... no "incomplete" data, no stray data ...

If your DBMS doesn't give you the capability to restart the batch at 
the point where it failed, then that's necessary. I have a hard time 
believing, though, that you can't do that in whatever DBMS you're 
using. I'll concede that transactions are preferable in that 
circumstance, but I also have experience with databases where 
transactions have nothing to offer.

batch or interactive doesn't matter ... its the data integrity that is
maintained by using transactions that is key ...

   I'm not trying to claim that MySQL can handle all types of db
   applications. MySQL is a niche product that was never designed to
   handle certain types of applications. My point is that whether a DBMS
   is relational depends on the structure of the data it deals with.
   Whether it needs to support transaction depends on the environment it
   operates in. I think that your point is that in an OLTP environment,
   lack of transaction support screws up the data to the point that the
   database becomes useless. I agree, but not all RDBMSs operate in an
   OLTP environment.

No, my point is that in any environment that needs the features of being
"relational" (data spread across multiple tables, link'd together), IMHO,
transactions are required in order to maintain data integrity *unless* the
programmer himself wants to take it upon himself to maintain this data
integrity in the application layer ...

... if data in table C requires that the data saved to table B was stored,
then if table B fails, the transaction should fail and the changes to
table A should be reversed automatically ... *shrug*  By extension, if the
data to table C fails for whatever reason, the data put to Tables A and
B should be automatically reversed ...

... or the missing data inserted. How did DBAs handle batch 
processing before there were transactions?

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sql query database

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-10 Thread Bob Hall

Doug,

There's something wrong here. This is the internet, we're 
disagreeing, but we're not flaming each other. If we keep this up, 
they'll revoke all our software licenses because of our noncompliant 
behavior.

Hi Bob!

That would make a very interesting study.  Attempting to come up with a
modern definition of RDBMS.  Of course, it would be only an academic
exercise...but it would be a fascinating paper if any youngsters reading
this from a university dorm room or computer lab would like to tackle it.

It's too late. Everyone has their own definition of RDBMS, which they 
aren't going to give up. :)

Yes, the SQL standard is a moving target.  But so are the likes of COBOL
and FORTRAN.  So all one can do is attempt to produce a product that at
least attempts to conform somewhat to some published version of the
standard.  It is true that no product adheres perfectly to ANSI SQL
standards.  I believe that that's primarily because, as it exists, SQL is
an incomplete and underdefined language.  However, some products appear to
be more in compliance than others.  But I offer up my pet peeve (MySQL's
bastardization of LIKE and the recent addition of the BINARY keyword
instead of fixing the problem) as an example of MySQL's blatant
non-conformance.  There are examples in PostgreSQL's history (which indeed
has had a turbulent past) of similar things, but they seem to try with
every release to bring themselves more in conformance with either ANSI's
published standard or at least the generally accepted implementation of
what ANSI has published when the standard is unclear.  MySQL just
complicates an already bizarre language with even more bizarre constructs
(BINARY is a recent example).

 From Paul's book: "BINARY causes number-to-string conversion."

It may not comply with the letter of the SQL standards, but it 
certainly complies with the spirit; it's completely non-intuitive!

I would tend to agree with THH that if MySQL is a database management
system it should offer up more than just their SQL-like front end to a
bunch of indexed disk files.

I've read their site.  (I like their site and their documentation better
than PostgreSQL's site and documentation, by the way.)  Their excuse for
not conforming to SQL standards and for not implementing important features
is that they would slow it down unnecessarily.  Two things about that:

  * I do not think things like triggers and transactions are unnecessary, and

  * According to recent reports, PostgreSQL is no longer a dog.  Of course,
this is beta code...but all indications are that it not only performs
admirably, but it also exhibits quite acceptable performance under load.
That's something that a roughly similar MySQL installation appears to have
some problems with, according to the same studies.  (Major reference would
be SourceForge, but there have been some other reports bandied about.  Note
that one must take anything resembling a benchmark as an advisory, not
gospel.  Also note that for every experience or study that favors one
product over another, there will undoubtedly be another that says the
opposite.  So I encourage everyone to take all such reports as ADVISORY
ONLY and make up their own mind.)

Now, PostgreSQL has triggers and transactions and features that MySQL
specifically omits (and indeed eschews) because they say those features are
not important and they would slow everything down.  Do the stories we're
hearing about the new PostgreSQL offer evidence against MySQL's seemingly
firm stance against triggers and transactions?  I don't know.  I suppose
time will tell.

If anyone is actually following this conversation (other than us die
hards), please don't take all of this as MySQL bashing.  That's not what
I'm trying to do.  I use MySQL myself for certain things.  As a matter of
fact, I find that you can turn even the a Win32(R)(TM)(C)(BC)(AD) machine
(which is what I use for my favorite email client, Eudora) into a web
development powerhouse with the Win32 versions of Apache, PHP, MySQL, The
Gimp and WinCVS.  This laptop that I'm typing on right now is outfitted as
described.  I couldn't buy this laptop without Win98 so I am still using
it.  (Maybe my next laptop won't be so limited?)  Anyway, getting
PostgreSQL to work on Win32 is a PITA.  PostgreSQL does work on Win32.  I
know because I got it to work.  But I didn't like it, and stopped using it.

Doug

I will agree with everything thing you say, with the understanding 
that there are many projects for which the functionality missing from 
MySQL isn't necessary. (And with the understanding that there are 
many projects for which it is necessary.)

I have my own personal list of non-standard aspects of the MySQL SQL 
interface that tick me off, but I still prefer it to the QBE modules 
in Paradox and Access. And having used versions of Paradox who's 
support for SQL functionality was very poor, MySQL doesn't strike me 
as seriously nonconforming.

Just the same, more compliance is better 

RE: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-10 Thread Steve Brett


 
 I'm rooting for PostgreSQL to become the open source app that ate 
 Oracle. MySQL will never be capable of that, but I don't think it 
 needs to be. There will always be a niche for small, quirky apps that 
 have just enough functionality to get the job done and keep the 
 learning curve short and shallow.
 

sorry to interject. i'm using posatgresql at work for a calendar system and
have found it an excellent tool. still learning and i'm sure i've only
scraped the surface but it copes well with 100+ users whihc is what we want.
i've also used mysql at home and for web projects and found it ok. 

to make my point though which is this. i ,too, also hope that postgresql
will become the product that ate Oracle, along with MS SQL Server. the
groundwork is there and it gets better with each release. my company is on
the brink of dropping MS altogether (for internal network and server needs)
and i hope it is one of many.


 Bob Hall
 
 Know thyself? Absurd direction!
 Bubbles bear no introspection. -Khushhal Khan Khatak
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-09 Thread Bob Hall

On Sun, 8 Apr 2001, Bob Hall wrote:

   Doug,
  
   You've posted your usual good sense, combined with one statement I
   strongly disagree with.
  
   One of
   these products is a relational database management system.  The other is a
   quasi-SQL-like-front-end-to-systems-of-indexed-files that has never
   concerned itself with things like standards conformance.
  
   The implication is that MySQL is not an RDBMS. The only attempt I
   know of to define an RDBMS was Codd's, and no DBMS has ever met the
   criteria he published in a paper in the late 80s (1986?). Even though
   Oracle doesn't meet the criteria of the best known definition (only
   definition?) of an RDBMS, we all seem to agree that Oracle is an
   RDBMS. An RDBMS is a DBMS designed to manage a relational database,
   and a database is relational because it stores data in linked,
   normalized tables.

The only thing I question in this is that without transaction support,
what exactly is MySQL "managing"?

The data in the normalized tables.

  MySQL is providing an SQL frontend to a
bunch of tables and indices, that is it ... it is up to the programmer to
handle the "managing of data" part where it revolves around being
relational ...

I've developed database apps in which the data was inserted in 
batches, which meant that transactions were unnecessary. On the other 
hand, the apps needed an RDBMS to handle normalized tables.


Also, note, that even today, MySQL does not handle transactions, Berkeley
DB does, and its purely optional, and per table.  So, effectively, it has
"transactional tables", its not a "transactional system" ... if you didn't
define a table for transactions when you created it, you just created your
weak link ... again, its not MySQL that manages the system, its the
programmer who has to do it ... *shrug*

Transactions have to do with the environment the DBMS operates in, 
not the type of database. Relational database theory was developed 
when multi-user OSs were still pretty new, and database processing 
was batch processing. In that type of environment, ACIDity isn't an 
issue. In an OLTP environment, even OODBMSs have to deal with 
transactions. At the same time, the lack of transaction support 
doesn't disqualify an OODBMS from being object oriented.  Futhermore, 
some datawarehousing and web projects involve relational databases 
that are inserted and updated in batches at night, making 
transactions unnecessary.

I'm not trying to claim that MySQL can handle all types of db 
applications. MySQL is a niche product that was never designed to 
handle certain types of applications. My point is that whether a DBMS 
is relational depends on the structure of the data it deals with. 
Whether it needs to support transaction depends on the environment it 
operates in. I think that your point is that in an OLTP environment, 
lack of transaction support screws up the data to the point that the 
database becomes useless. I agree, but not all RDBMSs operate in an 
OLTP environment.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-09 Thread The Hermit Hacker

On Mon, 9 Apr 2001, Bob Hall wrote:

   MySQL is providing an SQL frontend to a
 bunch of tables and indices, that is it ... it is up to the programmer to
 handle the "managing of data" part where it revolves around being
 relational ...

 I've developed database apps in which the data was inserted in
 batches, which meant that transactions were unnecessary. On the other
 hand, the apps needed an RDBMS to handle normalized tables.

Okay, so you start the insert, and one of the records in the batch failed
to insert ... then what?  You manually rollback the other ones?  A
"transaction" is effectively a batch ... if one of the batch fails, either
the programmer has to manually remember and roll everything back, or you
let the database itself handle it ..

 Futhermore, some datawarehousing and web projects involve relational
 databases that are inserted and updated in batches at night, making
 transactions unnecessary.

See above ... I have an application that loads ACT! data into a database
every night ... each contact in the system has something like 20-30 fields
associated with them ... if, for some reason, *one* of those fields fail
to insert properly, that contact is invalid, and the transaction that its
wrap'd in automatically rolls back everything I've done since the start of
the transaction, so that there is no record of that failed contact except
in my error log file ... no "incomplete" data, no stray data ...

batch or interactive doesn't matter ... its the data integrity that is
maintained by using transactions that is key ...

 I'm not trying to claim that MySQL can handle all types of db
 applications. MySQL is a niche product that was never designed to
 handle certain types of applications. My point is that whether a DBMS
 is relational depends on the structure of the data it deals with.
 Whether it needs to support transaction depends on the environment it
 operates in. I think that your point is that in an OLTP environment,
 lack of transaction support screws up the data to the point that the
 database becomes useless. I agree, but not all RDBMSs operate in an
 OLTP environment.

No, my point is that in any environment that needs the features of being
"relational" (data spread across multiple tables, link'd together), IMHO,
transactions are required in order to maintain data integrity *unless* the
programmer himself wants to take it upon himself to maintain this data
integrity in the application layer ...

... if data in table C requires that the data saved to table B was stored,
then if table B fails, the transaction should fail and the changes to
table A should be reversed automatically ... *shrug*  By extension, if the
data to table C fails for whatever reason, the data put to Tables A and
B should be automatically reversed ...





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Odp: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-09 Thread Jarek Zgoda

Od: "Bob Hall" [EMAIL PROTECTED]
Temat: Re: [PHP-DB] Re: PostgreSQL versus MySQL


The implication is that MySQL is not an RDBMS. The only attempt I
know of to define an RDBMS was Codd's, and no DBMS has ever met the
criteria he published in a paper in the late 80s (1986?). Even though
Oracle doesn't meet the criteria of the best known definition (only
definition?) of an RDBMS, we all seem to agree that Oracle is an
RDBMS. An RDBMS is a DBMS designed to manage a relational database,
and a database is relational because it stores data in linked,
normalized tables.
 
 The only thing I question in this is that without transaction support,
 what exactly is MySQL "managing"?

 The data in the normalized tables.

Of 12 Codd's rules (1985), MySQL doesn't meet four:
5 - full internal language implementation with transactional processing
support;
6 - using views for data modification;
10 - autonomous referential integrity mechanism built into database;
11 - autonomous data distribution.
Of SQL-92 instructions MySQL doesn't implement following:
CREATE | DROP SCHEMA, DECLARE LOCAL TEMPORARY TABLE, CREATE | ALTER | DROP
DOMAIN, CREATE | DROP CHARACTER SET, CREATE | DROP COLLATION, CREATE | DROP
TRANSLATION, CREATE | DROP VIEW, ALLOCATE | DECLARE | OPEN | CLOSE CURSOR,
COMMIT, ROLLBACK, FETCH, CLOSE, CREATE | DROP ASSERTION, SET CONSTRAINTS
MODE, SET SESSION AUTHORIZATION, SET TRANSACTION MODE, SET NAMES, SET
SCHEMA, SET TIME ZONE, ALLOCATE | SET | GET | DEALLOCATE DESCRIPTOR,
DESCRIBE, PREPARE, DEALLOCATE PREPARE, EXECUTE, EXECUTE IMMEDIATE, GET
DIAGNOSTICS
This set is about 85% of SQL-92 standart, but i didn't see any DBMS that
implements that all.
Of SQL-92 keywords, about 65% is absent in MySQL, but they are not too often
used even if they are present with significant exception of trigger and
procedural language.

Cheers
Jarek Zgoda



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-08 Thread The Hermit Hacker

On Sun, 8 Apr 2001, Bob Hall wrote:

 Doug,

 You've posted your usual good sense, combined with one statement I
 strongly disagree with.

 One of
 these products is a relational database management system.  The other is a
 quasi-SQL-like-front-end-to-systems-of-indexed-files that has never
 concerned itself with things like standards conformance.

 The implication is that MySQL is not an RDBMS. The only attempt I
 know of to define an RDBMS was Codd's, and no DBMS has ever met the
 criteria he published in a paper in the late 80s (1986?). Even though
 Oracle doesn't meet the criteria of the best known definition (only
 definition?) of an RDBMS, we all seem to agree that Oracle is an
 RDBMS. An RDBMS is a DBMS designed to manage a relational database,
 and a database is relational because it stores data in linked,
 normalized tables.

The only thing I question in this is that without transaction support,
what exactly is MySQL "managing"?  MySQL is providing an SQL frontend to a
bunch of tables and indices, that is it ... it is up to the programmer to
handle the "managing of data" part where it revolves around being
relational ...

Also, note, that even today, MySQL does not handle transactions, Berkeley
DB does, and its purely optional, and per table.  So, effectively, it has
"transactional tables", its not a "transactional system" ... if you didn't
define a table for transactions when you created it, you just created your
weak link ... again, its not MySQL that manages the system, its the
programmer who has to do it ... *shrug*



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PostgreSQL versus MySQL

2001-04-07 Thread Jon Valvatne

On the contrary, MySQL is much better at handling table crashes and data corruption 
than PostgreSQL is. What you may have heard is that due to lack of transaction 
support, critical data may be lost "in transit" from your application to the database, 
in the event of a system crash or a dropped connection. Well, guess what? MySQL now 
supports transactions in its latest release. Using transactions is probably not really 
needed though, unless your data is critical, such as credit card numbers.

As for a full comparison between the two, I think the bottom line is that MySQL is 
slightly more light-weight, but easier to use and faster than PostgreSQL. So if you're 
looking for a database for a relatively noncritical web application, I'd say go with 
MySQL, especially since that's what you already have experience with.

One of the upcoming features in MySQL I'm really looking forward to is query caching, 
which is a great feature for web applications.

Jon Valvatne

 Can someone outline the differences between the two? I am partial to MySQL
 from experience but want to get a good view of why one is better than the
 other.
 
 Also, I've heard that you will lose data with MySQL if a system failure
 should occur.
 
 Thanks.
 
 Matt



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-07 Thread The Hermit Hacker

 As for a full comparison between the two, I think the bottom line is
 that MySQL is slightly more light-weight, but easier to use and faster
 than PostgreSQL. So if you're looking for a database for a relatively
 noncritical web application, I'd say go with MySQL, especially since
 that's what you already have experience with.

tim perdue recently negated this whole 'speed' argument with the
Sourceforge migration ... if you are planning on having a low-hit-rate web
site, go with MySQL, but as soon as you get into concurrent users, MySQL's
performance drops like a rock ...

See the numbers that Tim ran to compare the two:

http://www.phpbuilder.com/columns/tim20001112.php3

 One of the upcoming features in MySQL I'm really looking forward to is
 query caching, which is a great feature for web applications.

Something that PostgreSQL has always done ... glad they are starting to
catch up ...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]