Re: [GENERAL] PHP and PostgreSQL 9.0, pg_connect fails to connect

2011-04-27 Thread Thomas Harold
On 4/27/2011 12:24 PM, Michael Nolan wrote: On Wed, Apr 27, 2011 at 10:42 AM, Thomas Harold mailto:thomas-li...@nybeta.com>> wrote: On 4/27/2011 9:16 AM, Thomas Harold wrote: - SELinux is running, but there are no denied messages in /var/log/audit/audit.log and no setroubl

Re: [GENERAL] PHP and PostgreSQL 9.0, pg_connect fails to connect

2011-04-27 Thread Michael Nolan
On Wed, Apr 27, 2011 at 10:42 AM, Thomas Harold wrote: > On 4/27/2011 9:16 AM, Thomas Harold wrote: > >> - SELinux is running, but there are no denied messages in >> /var/log/audit/audit.log and no setroubleshooting alerts in >> /var/log/messages either. >> >> > Well, interestingly enough it is SE

Re: [GENERAL] PHP and PostgreSQL 9.0, pg_connect fails to connect

2011-04-27 Thread Thomas Harold
On 4/27/2011 11:42 AM, Thomas Harold wrote: On 4/27/2011 9:16 AM, Thomas Harold wrote: - SELinux is running, but there are no denied messages in /var/log/audit/audit.log and no setroubleshooting alerts in /var/log/messages either. Well, interestingly enough it is SELinux getting in the way, b

Re: [GENERAL] PHP and PostgreSQL 9.0, pg_connect fails to connect

2011-04-27 Thread Rich Shepard
On Wed, 27 Apr 2011, Thomas Harold wrote: Well, interestingly enough it is SELinux getting in the way, but not logging anything. Temporarily disabling SELinux suddenly makes it work. This is interesting. I don't run SElinux on my Slackware systems, but a PHP application (CMS Made Simple) fa

Re: [GENERAL] PHP and PostgreSQL 9.0, pg_connect fails to connect

2011-04-27 Thread Thomas Harold
On 4/27/2011 9:16 AM, Thomas Harold wrote: - SELinux is running, but there are no denied messages in /var/log/audit/audit.log and no setroubleshooting alerts in /var/log/messages either. Well, interestingly enough it is SELinux getting in the way, but not logging anything. Temporarily disabl

[GENERAL] PHP and PostgreSQL 9.0, pg_connect fails to connect

2011-04-27 Thread Thomas Harold
I'm having trouble figuring out where this one is going wrong. It's a brand new install of PostgreSQL 9.0 from PGDG on a RHEL5 box, running Apache 2.2 and PHP 5.3 (from IUS). - PostgreSQL 9.0 is running and listening on the localhost. I can run pgAdmin III and connect to it over a SSH port-f

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-11 Thread Torsten Zühlsdorff
Thom Brown schrieb: A long-standing problem we've had with PostgreSQL queries in PHP is that the returned data for boolean columns is the string 'f' instead of the native boolean value of false. This problem is solved since nearly 5 years with PDO. You can use an abstraction like DDDBL (see m

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Torsten Zühlsdorff
Thom Brown schrieb: A long-standing problem we've had with PostgreSQL queries in PHP is that the returned data for boolean columns is the string 'f' instead of the native boolean value of false. This problem is solved since nearly 5 years with PDO. You can use an abstraction like DDDBL (see my

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Thom Brown
On 10 February 2010 12:11, A. Kretschmer wrote: > In response to Thom Brown : >> Hi, >> >> A long-standing problem we've had with PostgreSQL queries in PHP is >> that the returned data for boolean columns is the string 'f' instead >> of the native boolean value of false. > > http://andreas.scherba

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Tommy Gildseth
Thom Brown wrote: Is this a limitation of libpq or a flawed implementation in the php library? And if this is just the case for backwards-compatibility, is there a way to switch it to a more sensible PHP data type? Using PDO(http://no.php.net/pdo) will at least give you native values for tru

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread A. Kretschmer
In response to Thom Brown : > Hi, > > A long-standing problem we've had with PostgreSQL queries in PHP is > that the returned data for boolean columns is the string 'f' instead > of the native boolean value of false. http://andreas.scherbaum.la/blog/archives/302-BOOLEAN-datatype-with-PHP-compatib

[GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Thom Brown
Hi, A long-standing problem we've had with PostgreSQL queries in PHP is that the returned data for boolean columns is the string 'f' instead of the native boolean value of false. An obvious example of this would be for a table with users and their boolean registered status: Select user, register

Re: [GENERAL] PHP and Postgresql on Windows

2005-04-24 Thread Hannes Dorbath
On 23.04.2005 00:03, David Roussel wrote: Try PEAR DB. http://pear.php.net/package/DB It's a database abstraction layer, which means that you can change DB later, with less hasle. http://www.powerpostgresql.com/Downloads/database_depends_public.swf :) I really dislike db abstraction layers and PEA

[GENERAL] PHP and Postgresql on Windows

2005-04-22 Thread typing80wpm
I searched on goolge and found my answer, I think.   From what I see (below), all I need to do is a WAMP install from one of the CDs in the back of the PHP books I bought, and then un-comment the extension=php_pgsql.dll       http://www.sitepoint.com/article/use-postgresql-php-windows/3   Connect t

[GENERAL] PHP and Postgresql on Windows

2005-04-22 Thread typing80wpm
What would I need to do to make PHP, installed on my desktop, talk to Postgresql.  I have several CDS with WAMP installs (Windows Apache Mysgl PHP).   Would I use some special driver to allow PHP to connect to Postgresql?  I am going to search on google as soon as I post, but just curious if someon

Re: [GENERAL] PHP and Postgresql on Windows

2005-04-22 Thread David Roussel
Try PEAR DB. http://pear.php.net/package/DB It's a database abstraction layer, which means that you can change DB later, with less hasle. Have a look at how phpPgAdmin works. Download the source and have a look. http://phppgadmin.sourceforge.net/ On 22 Apr 2005, at 20:04, [EMAIL PROTECTED] wro

Re: [GENERAL] PHP and PostgreSQL

2001-01-06 Thread Partyka Robert
Hi I think You misunderstand the function You use. What was You expect to get when You try to access to not exsisting row? When You are doing "while" it will exit on ``false'' value - so when You access to not existing row the function produce ``false'', but also PHP produce Error message if You

Re: [GENERAL] PHP and PostgreSQL

2001-01-05 Thread Adam Haberlach
On Fri, Jan 05, 2001 at 11:17:29PM +0100, Uro Gruber wrote: > Hi! > > I have some questions about coding in php with postgre. > > Here is my code > > $qu = pg_exec ($db_conn, "SELECT * FROM clients ORDER BY username"); > $row = 0; // postgres needs a row counter other dbs might not > while ($da

[GENERAL] PHP and PostgreSQL

2001-01-05 Thread Uro Gruber
Hi! I have some questions about coding in php with postgre. Here is my code $qu = pg_exec ($db_conn, "SELECT * FROM clients ORDER BY username"); $row = 0; // postgres needs a row counter other dbs might not while ($data = @pg_fetch_object ($qu, $row)) { echo $data->username." ("; echo $data->pa