pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Connecting PHP-based Application to Postgres-9.0.3
42+ messages / 7 participants
[nested] [flat]

* Connecting PHP-based Application to Postgres-9.0.3
@ 2011-04-07 16:05 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-08 14:02 ` Re: Connecting PHP-based Application to Postgres-9.0.3 [UPDATE] Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 3 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 16:05 UTC (permalink / raw)
  To: pgsql-php

   I'm migrating our Web site to CMS Made Simple, it worked here with
postgres-8.4, but stopped working when I upgraded to postgres-9.0.0 (and I'm
now running 9.0.3). This is with php-5.2.17 on Slackware-13.1. I need help
since I don't know PHP or ADOdb.

   /var/log/httpd/error_log shows:

[Tue Apr 05 16:45:39 2011] [error] [client 127.0.0.1] PHP Fatal error:
Attempt to connect to database cms on rshepard@localhost failed in
/var/www/htdocs/cmsms/lib/adodb.functions.php on line 85

   I've attached a copy of that function.

   So far the message I posted to the adodb mail list yesterday is the only
one there, and there's no response to my help request on the phplens
adodb-php Web forum.

Rich

Attachments:

adodb.functions.php (text/plain, 4.0K) download <?php /** * @package CMS */ /** * A method to initialize the connection with the CMSMS configured database. * * @internal * @access private */ function load_adodb() { global $gCms; global $ADODB_vers; $config =& $gCms->GetConfig(); // @TODO: Remove dependence on PEAR for error handling if ($config['debug'] == true) { #@include_once(cms_join_path(dirname(__FILE__), $config['use_adodb_lite'] == true ? 'adodb_lite' : 'adodb', 'adodb-errorpear.inc.php')); } define('ADODB_OUTP', 'debug_sql'); //define('ADODB_ERROR_HANDLER', 'adodb_error'); $loaded_adodb = false; if ($config['use_adodb_lite'] == false || (isset($USE_OLD_ADODB) && $USE_OLD_ADODB == 1)) { # CMSMS is configured to use full ADOdb $full_adodb = cms_join_path(dirname(__FILE__),'adodb','adodb.inc.php'); if (! file_exists($full_adodb)) { # Full ADOdb cannot be found, show a debug error message $gCms->errors[] = 'CMS Made Simple is configured to use the full ADOdb Database Abstraction library, but it\'s not in the lib' .DIRECTORY_SEPARATOR. 'adodb directory. Switched back to ADOdb Lite.'; } else { # Load (full) ADOdb require($full_adodb); $loaded_adodb = true; } } if (!$loaded_adodb) { $adodb_light = cms_join_path(dirname(__FILE__),'adodb_lite','adodb.inc.php'); # The ADOdb library is not yet included, try ADOdb Lite if (file_exists($adodb_light)) { # Load ADOdb Lite require($adodb_light); } else { # ADOdb cannot be found, show a message and stop the script execution die('The ADOdb Lite database abstraction library cannot be found, CMS Made Simple cannot load.'); } } define('CMS_ADODB_DT', $config['use_adodb_lite'] ? 'DT' : 'T'); } /** * A method to re-initialize connections to the CMSMS configured database. * This method should be used by any UDT's or other plugins that use any other method * than the standard CMSMS supplied database object to connect to a database. * */ function & adodb_connect() { global $gCms; $config =& $gCms->GetConfig(); $dbinstance =& ADONewConnection($config['dbms'], 'pear:date:extend:transaction'); $dbinstance->raiseErrorFn = "adodb_error"; $conn_func = (isset($config['persistent_db_conn']) && $config['persistent_db_conn'] == true) ? 'PConnect' : 'Connect'; if(!empty($config['db_port'])) $dbinstance->port = $config['db_port']; $connect_result = $dbinstance->$conn_func($config['db_hostname'], $config['db_username'], $config['db_password'], $config['db_name']); if (FALSE == $connect_result) { $str = "Attempt to connect to database {$config['db_name']} on {$config['db_username']}@{$config['db_hostname']} failed"; trigger_error($str,E_USER_ERROR); die($str); } $dbinstance->raiseErrorFn = null; $dbinstance->SetFetchMode(ADODB_FETCH_ASSOC); if ($config['debug'] == true) { $dbinstance->debug = true; #$dbinstance->LogSQL(); } if ($config['dbms'] == 'sqlite') { $dbinstance->Execute('PRAGMA short_column_names = 1;'); sqlite_create_function($config['use_adodb_lite'] ? $db->connectionId : $db->_connectionID, 'now', 'time', 0); } else { if(!empty($config['default_encoding']) && $config['default_encoding'] == 'utf-8' && $config['set_names'] == true) { $dbinstance->Execute("SET NAMES 'utf8'"); } } $db =& $dbinstance; return $db; } /** * @ignore */ function adodb_error($dbtype, $function_performed, $error_number, $error_message, $host, $database, &$connection_obj) { if(file_exists(cms_join_path(dirname(CONFIG_FILE_LOCATION), 'db_error.html'))) { include_once cms_join_path(dirname(CONFIG_FILE_LOCATION), 'db_error.html'); exit; } else { echo "<strong>Database Connection Failed</strong><br />"; echo "Error: {$error_message} ({$error_number})<br />"; echo "Function Performed: {$function_performed}<br />"; echo "Host/DB: {$host}/{$database}<br />"; echo "Database Type: {$dbtype}<br />"; } } ?>
^ permalink raw reply [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 16:20 ` Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2 siblings, 1 reply; 42+ messages in thread

From: Alan Hodgson @ 2011-04-07 16:20 UTC (permalink / raw)
  To: pgsql-php

On April 7, 2011, Rich Shepard <rshepard@appl-ecosys.com> wrote:
>    /var/log/httpd/error_log shows:
> 
> [Tue Apr 05 16:45:39 2011] [error] [client 127.0.0.1] PHP Fatal error:
> Attempt to connect to database cms on rshepard@localhost failed in
> /var/www/htdocs/cmsms/lib/adodb.functions.php on line 85

Can you connect to the database with psql using the same credentials?  PHP 
will use the same underlying postgresql library to connect.

-- 
The era of procrastination, of half-measures, of soothing and baffling 
expedients, of delays, is coming to a close. In its place we are entering a 
period of consequences.

^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
@ 2011-04-07 16:35   ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:51     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  0 siblings, 2 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 16:35 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Alan Hodgson wrote:

> Can you connect to the database with psql using the same credentials?  PHP
> will use the same underlying postgresql library to connect.

Alan,

   If you mean can I as a user connect to that same database, the answer is
yes:

[rshepard@salmo ~]$ psql cms
psql (9.0.3)
Type "help" for help.

cms=# \d
                         List of relations
  Schema |               Name                |   Type   |  Owner 
--------+-----------------------------------+----------+----------
  public | cms_additional_htmlblob_users     | table    | rshepard
  public | cms_additional_htmlblob_users_seq | sequence | rshepard
  public | cms_additional_users              | table    | rshepard
  public | cms_additional_users_seq          | sequence | rshepard
  public | cms_admin_bookmarks               | table    | rshepard
  public | cms_admin_bookmarks_seq           | sequence | rshepard
  public | cms_admin_recent_pages            | table    | rshepard
  public | cms_admin_recent_pages_seq        | sequence | rshepard
  public | cms_adminlog                      | table    | rshepard
  public | cms_content                       | table    | rshepard
  public | cms_content_props                 | table    | rshepard
  public | cms_content_props_seq             | sequence | rshepard
  public | cms_content_seq                   | sequence | rshepard
  public | cms_crossref                      | table    | rshepard
  public | cms_css                           | table    | rshepard
  public | cms_css_assoc                     | table    | rshepard
  public | cms_css_seq                       | sequence | rshepard

   etc.

   So, what can I do here?

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 16:51     ` Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 17:13       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  1 sibling, 1 reply; 42+ messages in thread

From: Alan Hodgson @ 2011-04-07 16:51 UTC (permalink / raw)
  To: pgsql-php

On April 7, 2011, Rich Shepard <rshepard@appl-ecosys.com> wrote:
> On Thu, 7 Apr 2011, Alan Hodgson wrote:
> > Can you connect to the database with psql using the same credentials? 
> > PHP will use the same underlying postgresql library to connect.
> 
> Alan,
> 
>    If you mean can I as a user connect to that same database, the answer
> is yes:
> 

What does your pg_hba.conf file contain?



-- 
The era of procrastination, of half-measures, of soothing and baffling 
expedients, of delays, is coming to a close. In its place we are entering a 
period of consequences…

^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:51     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
@ 2011-04-07 17:13       ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:42         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 17:13 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Alan Hodgson wrote:

> What does your pg_hba.conf file contain?

   Unmodified from the sample:

# TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD

@remove-line-for-nolocal@# "local" is for Unix domain socket connections
only
@remove-line-for-nolocal@local   all             all 
# IPv4 local connections:
host    all             all             127.0.0.1/32            @authmethod@
# IPv6 local connections:
host    all             all             ::1/128                 @authmethod@

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:51     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 17:13       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 17:42         ` Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 17:52           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Alan Hodgson @ 2011-04-07 17:42 UTC (permalink / raw)
  To: pgsql-php

On April 7, 2011, Rich Shepard <rshepard@appl-ecosys.com> wrote:
> On Thu, 7 Apr 2011, Alan Hodgson wrote:
> > What does your pg_hba.conf file contain?
> 
>    Unmodified from the sample:
> 
> # TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD
> 
> @remove-line-for-nolocal@# "local" is for Unix domain socket connections
> only
> @remove-line-for-nolocal@local   all             all
> # IPv4 local connections:
> host    all             all             127.0.0.1/32           
> @authmethod@ # IPv6 local connections:
> host    all             all             ::1/128                
> @authmethod@
> 
> Rich

What is @authmethod@? That looks like a substitution parameter from 
something?

The default that should be in there is I think ident, which probably allows 
you to access it as rshepard but not the web server to do so, which is 
running under a different user.

Try changing the auth method on 127.0.0.1/32  to trust (just for testing), 
and then if that works set it to md5 and assign a password.

-- 
The era of procrastination, of half-measures, of soothing and baffling 
expedients, of delays, is coming to a close. In its place we are entering a 
period of consequences…

^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:51     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 17:13       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:42         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
@ 2011-04-07 17:52           ` Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 0 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 17:52 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Alan Hodgson wrote:

> What is @authmethod@? That looks like a substitution parameter from
> something?

Alan,

   Oops! Copied tail of wrong file. It's not at the end of
/usr/local/pgsql/data/pg_hba.conf. That has:

# TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

> Try changing the auth method on 127.0.0.1/32  to trust (just for testing),
> and then if that works set it to md5 and assign a password.

   That's what it is: trust.

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 16:56     ` Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  1 sibling, 1 reply; 42+ messages in thread

From: Bill Moran @ 2011-04-07 16:56 UTC (permalink / raw)
  To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-php

In response to Rich Shepard <rshepard@appl-ecosys.com>:

> On Thu, 7 Apr 2011, Alan Hodgson wrote:
> 
> > Can you connect to the database with psql using the same credentials?  PHP
> > will use the same underlying postgresql library to connect.
> 
> Alan,
> 
>    If you mean can I as a user connect to that same database, the answer is
> yes:
> 
> [rshepard@salmo ~]$ psql cms
> psql (9.0.3)
> Type "help" for help.

This is incorrect.

The ADODB error message indicates that you are connecting to localhost
via TCP/IP.  The default for psql when you don't specify a host is to
connect via unix domain socket.  You're not testing the same thing.

See if
psql -h localhost cms
works.

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
@ 2011-04-07 17:15       ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 17:15 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Bill Moran wrote:

> The ADODB error message indicates that you are connecting to localhost via
> TCP/IP. The default for psql when you don't specify a host is to connect
> via unix domain socket. You're not testing the same thing.

Bill

   Oh.

> See if
> psql -h localhost cms
> works.

   Yes, it does:

[rshepard@salmo ~]$ psql -h localhost cms
psql (9.0.3)
Type "help" for help.

cms=#


Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 17:20         ` Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Bill Moran @ 2011-04-07 17:20 UTC (permalink / raw)
  To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-php

In response to Rich Shepard <rshepard@appl-ecosys.com>:

> On Thu, 7 Apr 2011, Bill Moran wrote:
> 
> > The ADODB error message indicates that you are connecting to localhost via
> > TCP/IP. The default for psql when you don't specify a host is to connect
> > via unix domain socket. You're not testing the same thing.
> 
> Bill
> 
>    Oh.
> 
> > See if
> > psql -h localhost cms
> > works.
> 
>    Yes, it does:
> 
> [rshepard@salmo ~]$ psql -h localhost cms
> psql (9.0.3)
> Type "help" for help.
> 
> cms=#

Well, that blows my first theory out of the water ;)

Check the PG server logs, and consider increasing some logging levels
on the server.  PG does some pretty good logging of failed connections
if you have the settings right.

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
@ 2011-04-07 17:35           ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 17:35 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Bill Moran wrote:

> Check the PG server logs, and consider increasing some logging levels on
> the server.  PG does some pretty good logging of failed connections if you
> have the settings right.

Bill,

   There was no logging. I looked at /usr/local/pgsql/data/postgresql.conf
and had no idea what should be changed (and to what values) to enable
appropriate logging to /var/log/messages (where syslog messages go). Please
advise.

Thanks,

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 17:56             ` Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:17               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 2 replies; 42+ messages in thread

From: Brian Fehrle @ 2011-04-07 17:56 UTC (permalink / raw)
  To: pgsql-php

In the postgresql.conf file, look for these parameters.

log_destination (can be set to stderr, csvlog, syslog, and eventlog, you 
probably want syslog).
log_connections (default is off, turn this on to see all connection 
attempts to the database)
log_disconnections (same as log_connections)

These should let you see the connection information from the perspective 
of the database.

- Brian F

Consistent State


On 04/07/2011 11:35 AM, Rich Shepard wrote:
> On Thu, 7 Apr 2011, Bill Moran wrote:
>
>> Check the PG server logs, and consider increasing some logging levels on
>> the server.  PG does some pretty good logging of failed connections 
>> if you
>> have the settings right.
>
> Bill,
>
>   There was no logging. I looked at /usr/local/pgsql/data/postgresql.conf
> and had no idea what should be changed (and to what values) to enable
> appropriate logging to /var/log/messages (where syslog messages go). 
> Please
> advise.
>
> Thanks,
>
> Rich
>




^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
@ 2011-04-07 18:17               ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 18:58                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  1 sibling, 2 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 18:17 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Brian Fehrle wrote:

> In the postgresql.conf file, look for these parameters.
>
> log_destination (can be set to stderr, csvlog, syslog, and eventlog, you 
> probably want syslog).
> log_connections (default is off, turn this on to see all connection attempts 
> to the database)
> log_disconnections (same as log_connections)

Brian,

   Hmm-m-m.

log_destination = 'syslog'              # Valid values are combinations of
                                         # stderr, csvlog, syslog, and eventlog,
                                         # depending on platform.  csvlog
                                         # requires logging_collector to be on.
log_connections = on
log_disconnections = on

   Yet, there's noting in /var/log/messages after restarting postgres.

Apr  7 11:13:14 salmo postgres[6652]: [1-1] LOG:  database system is ready
to accept connections
Apr  7 11:13:14 salmo postgres[6656]: [1-1] LOG:  autovacuum launcher
started

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:17               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 18:58                 ` Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:00                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  1 sibling, 1 reply; 42+ messages in thread

From: Brian Fehrle @ 2011-04-07 18:58 UTC (permalink / raw)
  To: pgsql-php

If nothing is appearing in the log after a restart and new connection 
attempts, that makes me think that the database isn't even receiving the 
connection attempt, which would mean either wrong connection credentials 
or something blocking it in between (since it looks like it's an app on 
the same machine as the database, that's most likely not it.

I'd verify that the full connection string is correct, host, port, user, 
and database name. Connect with psql like you did before, but specify 
all the parameters:
psql -h localhost -p <port> -U <user> <database name>
and if it works, make sure it's the same information in the 
configuration for your application.

Also, this may help: 
http://forum.cmsmadesimple.org/viewtopic.php?t=53350&p=251336 as it 
mentions something about changing postgres7 to just postgres in the 
config.php file.

- Brian F

Consistent State

On 04/07/2011 12:17 PM, Rich Shepard wrote:
> On Thu, 7 Apr 2011, Brian Fehrle wrote:
>
>> In the postgresql.conf file, look for these parameters.
>>
>> log_destination (can be set to stderr, csvlog, syslog, and eventlog, 
>> you probably want syslog).
>> log_connections (default is off, turn this on to see all connection 
>> attempts to the database)
>> log_disconnections (same as log_connections)
>
> Brian,
>
>   Hmm-m-m.
>
> log_destination = 'syslog'              # Valid values are 
> combinations of
>                                         # stderr, csvlog, syslog, and 
> eventlog,
>                                         # depending on platform.  csvlog
>                                         # requires logging_collector 
> to be on.
> log_connections = on
> log_disconnections = on
>
>   Yet, there's noting in /var/log/messages after restarting postgres.
>
> Apr  7 11:13:14 salmo postgres[6652]: [1-1] LOG:  database system is 
> ready
> to accept connections
> Apr  7 11:13:14 salmo postgres[6656]: [1-1] LOG:  autovacuum launcher
> started
>
> Rich
>




^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:17               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 18:58                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
@ 2011-04-07 20:00                   ` Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 0 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 20:00 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Brian Fehrle wrote:

> Also, this may help:
> http://forum.cmsmadesimple.org/viewtopic.php?t=53350&p=251336 as it
> mentions something about changing postgres7 to just postgres in the
> config.php file.

Brian,

   Yep. That's my thread and my statement that I changed postgres7 to
postgres.

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:17               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 18:59                 ` Brian Fehrle <brianf@consistentstate.com>
  1 sibling, 0 replies; 42+ messages in thread

From: Brian Fehrle @ 2011-04-07 18:59 UTC (permalink / raw)
  To: pgsql-php

Um, strike that link, just looked at the name and realized who posted 
that message.

doh.

On 04/07/2011 12:17 PM, Rich Shepard wrote:
> On Thu, 7 Apr 2011, Brian Fehrle wrote:
>
>> In the postgresql.conf file, look for these parameters.
>>
>> log_destination (can be set to stderr, csvlog, syslog, and eventlog, 
>> you probably want syslog).
>> log_connections (default is off, turn this on to see all connection 
>> attempts to the database)
>> log_disconnections (same as log_connections)
>
> Brian,
>
>   Hmm-m-m.
>
> log_destination = 'syslog'              # Valid values are 
> combinations of
>                                         # stderr, csvlog, syslog, and 
> eventlog,
>                                         # depending on platform.  csvlog
>                                         # requires logging_collector 
> to be on.
> log_connections = on
> log_disconnections = on
>
>   Yet, there's noting in /var/log/messages after restarting postgres.
>
> Apr  7 11:13:14 salmo postgres[6652]: [1-1] LOG:  database system is 
> ready
> to accept connections
> Apr  7 11:13:14 salmo postgres[6656]: [1-1] LOG:  autovacuum launcher
> started
>
> Rich
>




^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
@ 2011-04-07 18:59               ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  1 sibling, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 18:59 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Brian Fehrle wrote:

> These should let you see the connection information from the perspective
> of the database.

   Ah, I was looking at the wrong log file. Messages are in
/var/log/httpd/error_log:

[Thu Apr 07 11:13:43 2011] [error] [client 127.0.0.1] File does not exist:
/srv/httpd/htdocs/cms
[Thu Apr 07 11:51:11 2011] [error] [client 127.0.0.1] File does not exist:
/srv/httpd/htdocs/cms

   From the access_log:

127.0.0.1 - - [07/Apr/2011:11:13:43 -0700] "GET /cms/index.php HTTP/1.1" 404 211
127.0.0.1 - - [07/Apr/2011:11:51:11 -0700] "GET /cms/index.php HTTP/1.1" 404 211

   Yet:

drwxr-xr-x 11 rshepard users    4096 Apr  5 16:45 cmsms/

and:

   I do see the Joomla-R-Us page, but neither a green "OK" nor an error
message; just the page with the script

-rwxr-xr-x  1 rshepard users   22077 Apr  7 09:54 postgresql.php

127.0.0.1 - - [07/Apr/2011:11:54:56 -0700] "GET /postgresql.php HTTP/1.1" 200 220

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 19:06                 ` Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Brian Fehrle @ 2011-04-07 19:06 UTC (permalink / raw)
  To: pgsql-php

Is it trying to access /srv/httpd/htdocs/cms/ but your directory is at 
/srv/httpd/htdocs/cmsms/ by chance?



On 04/07/2011 12:59 PM, Rich Shepard wrote:
> On Thu, 7 Apr 2011, Brian Fehrle wrote:
>
>> These should let you see the connection information from the perspective
>> of the database.
>
>   Ah, I was looking at the wrong log file. Messages are in
> /var/log/httpd/error_log:
>
> [Thu Apr 07 11:13:43 2011] [error] [client 127.0.0.1] File does not 
> exist:
> /srv/httpd/htdocs/cms
> [Thu Apr 07 11:51:11 2011] [error] [client 127.0.0.1] File does not 
> exist:
> /srv/httpd/htdocs/cms
>
>   From the access_log:
>
> 127.0.0.1 - - [07/Apr/2011:11:13:43 -0700] "GET /cms/index.php 
> HTTP/1.1" 404 211
> 127.0.0.1 - - [07/Apr/2011:11:51:11 -0700] "GET /cms/index.php 
> HTTP/1.1" 404 211
>
>   Yet:
>
> drwxr-xr-x 11 rshepard users    4096 Apr  5 16:45 cmsms/
>
> and:
>
>   I do see the Joomla-R-Us page, but neither a green "OK" nor an error
> message; just the page with the script
>
> -rwxr-xr-x  1 rshepard users   22077 Apr  7 09:54 postgresql.php
>
> 127.0.0.1 - - [07/Apr/2011:11:54:56 -0700] "GET /postgresql.php 
> HTTP/1.1" 200 220
>
> Rich
>




^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
@ 2011-04-07 20:10                   ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 20:10 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Brian Fehrle wrote:

> Is it trying to access /srv/httpd/htdocs/cms/ but your directory is at
> /srv/httpd/htdocs/cmsms/ by chance?

Brian,

   I can see where I may have mis-typed the directory. It is
/srv/httpd/htdocs/cmsms/ and now I see in /var/log/httpd/error_log:

[Thu Apr 07 13:05:39 2011] [error] [client 127.0.0.1] PHP Fatal error:
Attempt to connect to database cms on rshepard@localhost failed in
/var/www/htdocs/cmsms/lib/adodb.functions.php on line 88

   The error had been on line 85 before. And the access_log still shows an
internal server error:

127.0.0.1 - - [07/Apr/2011:13:05:39 -0700] "GET /cmsms/index.php HTTP/1.1"
500

   It is quite frustrating. And I appreciate your help, and that of everyone
else.

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 20:25                     ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 20:25 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Rich Shepard wrote:

>  The error had been on line 85 before. And the access_log still shows an
> internal server error:

   That's an artifact of lines wrapping. Same error.

   To clarify: the application directory on the Web server is
/var/www/htdocs/cmsms (a.k.a. /srv/htdocs/cmsms). The name of the database
in postgres is cms. I turned on the page display in config.php so now I see
the error there:

Fatal error: Attempt to connect to database cms on rshepard@localhost failed
in /var/www/htdocs/cmsms/lib/adodb.functions.php on line 87

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 20:39                       ` Raymond O'Donnell <rod@iol.ie>
  2011-04-07 20:51                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-07 22:02                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 2 replies; 42+ messages in thread

From: Raymond O'Donnell @ 2011-04-07 20:39 UTC (permalink / raw)
  To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-php

On 07/04/2011 21:25, Rich Shepard wrote:
> On Thu, 7 Apr 2011, Rich Shepard wrote:
>
>> The error had been on line 85 before. And the access_log still shows an
>> internal server error:
>
> That's an artifact of lines wrapping. Same error.
>
> To clarify: the application directory on the Web server is
> /var/www/htdocs/cmsms (a.k.a. /srv/htdocs/cmsms). The name of the database
> in postgres is cms. I turned on the page display in config.php so now I see
> the error there:
>
> Fatal error: Attempt to connect to database cms on rshepard@localhost
> failed
> in /var/www/htdocs/cmsms/lib/adodb.functions.php on line 87

Have you located the Postgres log yet? ISTM that that's where you need 
to be looking.

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
@ 2011-04-07 20:51                         ` Daniel Carrero <dcarreroc@gmail.com>
  2011-04-07 20:59                           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 22:05                           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 22:08                           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  1 sibling, 3 replies; 42+ messages in thread

From: Daniel Carrero @ 2011-04-07 20:51 UTC (permalink / raw)
  To: rod@iol.ie; +Cc: Rich Shepard <rshepard@appl-ecosys.com>; pgsql-php

I think is better wait the response of Adodb Forum[1], but look the
adodb5\drivers\ directory, I downloaded and here we have this files:

adodb-postgres64.inc.php
adodb-postgres7.inc.php
adodb-postgres8.inc.php

Nothing about postgres9 :D

I hope you can find the solution CMS Made Simple is a great tool and Adodb too.


Greetings.

[1] http://phplens.com/lens/lensforum/msgs.php?id=18852

2011/4/7 Raymond O'Donnell <rod@iol.ie>:
> On 07/04/2011 21:25, Rich Shepard wrote:
>>
>> On Thu, 7 Apr 2011, Rich Shepard wrote:
>>
>>> The error had been on line 85 before. And the access_log still shows an
>>> internal server error:
>>
>> That's an artifact of lines wrapping. Same error.
>>
>> To clarify: the application directory on the Web server is
>> /var/www/htdocs/cmsms (a.k.a. /srv/htdocs/cmsms). The name of the database
>> in postgres is cms. I turned on the page display in config.php so now I
>> see
>> the error there:
>>
>> Fatal error: Attempt to connect to database cms on rshepard@localhost
>> failed
>> in /var/www/htdocs/cmsms/lib/adodb.functions.php on line 87
>
> Have you located the Postgres log yet? ISTM that that's where you need to be
> looking.
>
> Ray.
>
> --
> Raymond O'Donnell :: Galway :: Ireland
> rod@iol.ie
>
> --
> Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-php
>



-- 
Daniel Carrero Canales
Analista programador de sistemas
+56974726453
http://www.kode.cl



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 20:51                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
@ 2011-04-07 20:59                           ` Raymond O'Donnell <rod@iol.ie>
  2 siblings, 0 replies; 42+ messages in thread

From: Raymond O'Donnell @ 2011-04-07 20:59 UTC (permalink / raw)
  To: Daniel Carrero <dcarreroc@gmail.com>; +Cc: Rich Shepard <rshepard@appl-ecosys.com>; pgsql-php

On 07/04/2011 21:51, Daniel Carrero wrote:
> I think is better wait the response of Adodb Forum[1], but look the
> adodb5\drivers\ directory, I downloaded and here we have this files:
>
> adodb-postgres64.inc.php
> adodb-postgres7.inc.php
> adodb-postgres8.inc.php
>
> Nothing about postgres9 :D

Without having seen the PG log, my guess is that that's where the 
problem lies... I'll guess a bit more and say that maybe it's the 
different handling of bytea columns.

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 20:51                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
@ 2011-04-07 22:05                           ` Rich Shepard <rshepard@appl-ecosys.com>
  2 siblings, 0 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 22:05 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Daniel Carrero wrote:

> I think is better wait the response of Adodb Forum[1], but look the
> adodb5\drivers\ directory, I downloaded and here we have this files:
>
> adodb-postgres64.inc.php
> adodb-postgres7.inc.php
> adodb-postgres8.inc.php
>
> Nothing about postgres9 :D

Daniel,

   There does not seem to be much activity on that forum. Everyone here has
been much more responsive.

> I hope you can find the solution CMS Made Simple is a great tool and Adodb too.

   I decided on CMS Made Simple because it's the only CMS that works for a
fairly static site and supports postgres as well as mysql. All the others
are hard-coded to mysql for reasons I cannot understand.

Thanks,

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 20:51                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
@ 2011-04-07 22:08                           ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 23:20                             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 22:08 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Daniel Carrero wrote:

> adodb-postgres64.inc.php
> adodb-postgres7.inc.php
> adodb-postgres8.inc.php
> Nothing about postgres9 :D

   Rod may be right. I don't seem to have any of these here:

[root@salmo /usr/local/pgsql/data]# find / -name adodb*php
/var/www/htdocs/cmsms/lib/adodb.functions.php
/var/www/htdocs/cmsms/lib/adodb_lite/lang/adodb-en.inc.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb-xmlschema.inc.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb-time.inc.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb.config.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb-exceptions.inc.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb-errorpear.inc.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb-error.inc.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb-datadict.inc.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb.inc.php
/var/www/htdocs/cmsms/lib/adodb_lite/adodb-errorhandler.inc.php
/opt/lib/adodb_lite/adodb-exceptions.inc.php
/opt/lib/adodb_lite/lang/adodb-en.inc.php
/opt/lib/adodb_lite/adodb-time.inc.php
/opt/lib/adodb_lite/adodb-errorhandler.inc.php
/opt/lib/adodb_lite/adodb.inc.php
/opt/lib/adodb_lite/adodb-error.inc.php
/opt/lib/adodb_lite/adodb.config.php
/opt/lib/adodb_lite/adodb-datadict.inc.php
/opt/lib/adodb_lite/adodb-xmlschema.inc.php
/opt/lib/adodb_lite/adodb-errorpear.inc.php
/opt/lib/adodb.functions.php

[root@salmo /usr/local/pgsql/data]# find / -name adodb-postgres*
[root@salmo /usr/local/pgsql/data]#

   Where might I get the adodb-postgres*.inc.php?

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 20:51                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-07 22:08                           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 23:20                             ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 12:53                               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Matthias Ritzkowski <matthiar@gmail.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 23:20 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Jose Luis Salcedo wrote:

> Hello guys, I think the best way to know what's happenning with the
> connection is make a file that try to connect with the simple instructions
> that provide php itself, if the simple connection works it means the problem
> is with the ADODB library, otherwise will be the database server.

Jose,

   Mea culpa! I forgot to turn on the executable bits for test.php. When I
did nothing appears on the browser but /var/log/httpd/access_log has:

127.0.0.1 - - [07/Apr/2011:16:17:53 -0700] "GET /test.php HTTP/1.1" 200 192

   So, if the issue is with adodb is it missing a driver or something else?

Thanks,

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 20:51                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-07 22:08                           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 23:20                             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 12:53                               ` Matthias Ritzkowski <matthiar@gmail.com>
  0 siblings, 0 replies; 42+ messages in thread

From: Matthias Ritzkowski @ 2011-04-08 12:53 UTC (permalink / raw)
  To: pgsql-php

Put a couple of print "Line is xyz" statements into test.php to see
where it fails ...
That non-existent adodb library for postgres 9.x would make this a
strong candidate to revert to 8.4. Why do you need cutting edge
postgres for a cms?

On 4/7/11, Rich Shepard <rshepard@appl-ecosys.com> wrote:
> On Thu, 7 Apr 2011, Jose Luis Salcedo wrote:
>
>> Hello guys, I think the best way to know what's happenning with the
>> connection is make a file that try to connect with the simple instructions
>> that provide php itself, if the simple connection works it means the
>> problem
>> is with the ADODB library, otherwise will be the database server.
>
> Jose,
>
>    Mea culpa! I forgot to turn on the executable bits for test.php. When I
> did nothing appears on the browser but /var/log/httpd/access_log has:
>
> 127.0.0.1 - - [07/Apr/2011:16:17:53 -0700] "GET /test.php HTTP/1.1" 200 192
>
>    So, if the issue is with adodb is it missing a driver or something else?
>
> Thanks,
>
> Rich
>
> --
> Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-php
>

-- 
Sent from my mobile device

Regards
Matthias Ritzkowski



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
@ 2011-04-07 22:02                         ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 22:19                           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  1 sibling, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 22:02 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Raymond O'Donnell wrote:

> Have you located the Postgres log yet? ISTM that that's where you need to
> be looking.

Ray,

   Yes ... and no. I think that I turned on all the right switches in
postgresql.conf, but the logging is displayed to stdout rather than to
syslog. I have a /var/log/postgresql but that has a few entries from last
December and nothing since. I can post the .conf file to learn what I set
incorrectly (or didn't set when it should be).

   I also changed bytea_encoding to 'escape' from 'hex', stopped and
restarted the postmaster, and there's no change.

   In C and python I'd be putting little stub code to print in the function
with the problems so I can tell just where I am when it fails. I've no idea
of how to do this in php, or where it would be appropriate to insert code to
generate diagnostics.

Thanks,

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 22:02                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-07 22:19                           ` Raymond O'Donnell <rod@iol.ie>
  2011-04-07 22:51                             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Raymond O'Donnell @ 2011-04-07 22:19 UTC (permalink / raw)
  To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-php

On 07/04/2011 23:02, Rich Shepard wrote:
> On Thu, 7 Apr 2011, Raymond O'Donnell wrote:
>
>> Have you located the Postgres log yet? ISTM that that's where you need to
>> be looking.
>
> Ray,
>
> Yes ... and no. I think that I turned on all the right switches in
> postgresql.conf, but the logging is displayed to stdout rather than to
> syslog. I have a /var/log/postgresql but that has a few entries from last
> December and nothing since. I can post the .conf file to learn what I set
> incorrectly (or didn't set when it should be).

Hi Rich,

That is a bit odd. Yes, please do post the relevant bits of the .conf - 
clearer heads than mine may spot something.

What platform are you on (maybe you said already, and I missed it)? How 
did you install PostgreSQL?

> In C and python I'd be putting little stub code to print in the function
> with the problems so I can tell just where I am when it fails. I've no idea
> of how to do this in php, or where it would be appropriate to insert
> code to
> generate diagnostics.

I think you've already got all the diagnostics you're going to get from 
the PHP side of things... there are PHP functions to get the most recent 
error from the Postgres connection, but it sounds as though the 
connection isn't getting made in the first place (which of course 
negates my upthread guess about bytea... doh).

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 22:02                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 22:19                           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
@ 2011-04-07 22:51                             ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 13:17                               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-07 22:51 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Raymond O'Donnell wrote:

> That is a bit odd. Yes, please do post the relevant bits of the .conf -
> clearer heads than mine may spot something.

Ray,

#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

log_destination = 'syslog'		# Valid values are combinations of
 					# stderr, csvlog, syslog, and eventlog,
 					# depending on platform.  csvlog
 					# requires logging_collector to be on.

# This is used when logging to stderr:
logging_collector = on		# Enable capturing of stderr and csvlog
 					# into log files. Required to be on for
 					# csvlogs.
 					# (change requires restart)

# These are only used if logging_collector is on:
#log_directory = 'pg_log'		# directory where log files are written,
 					# can be absolute or relative to PGDATA
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'	# log file name pattern,
 					# can include strftime() escapes
#log_truncate_on_rotation = off		# If on, an existing log file of the
 					# same name as the new log file will be
 					# truncated rather than appended to.
 					# But such truncation only occurs on
 					# time-driven rotation, not on restarts
 					# or size-driven rotation.  Default is
 					# off, meaning append to existing files
 					# in all cases.
log_rotation_age = 1d			# Automatic rotation of logfiles will
 					# happen after that time.  0 disables.
log_rotation_size = 10MB		# Automatic rotation of logfiles will
 					# happen after that much log output.
 					# 0 disables.

# These are relevant when logging to syslog:
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'

silent_mode = off			# Run server silently.
 					# DO NOT USE without syslog or
 					# logging_collector
 					# (change requires restart)


# - When to Log -

#client_min_messages = notice		# values in order of decreasing detail:
client_min_messages = debug5					#   debug5
 					#   debug4
 					#   debug3
 					#   debug2
 					#   debug1
 					#   log
 					#   notice
 					#   warning
 					#   error

#log_min_messages = warning		# values in order of decreasing detail:
log_min_messages = debug5					#   debug5
 					#   debug4
 					#   debug3
 					#   debug2
 					#   debug1
 					#   info
 					#   notice
 					#   warning
 					#   error
 					#   log
 					#   fatal
 					#   panic

#log_min_error_statement = error	# values in order of decreasing detail:
log_min_error_statement = debug5				 	#   debug5
 					#   debug4
 					#   debug3
 					#   debug2
 					#   debug1
 				 	#   info
 					#   notice
 					#   warning
 					#   error
 					#   log
 					#   fatal
 					#   panic (effectively off)

#log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
 					# and their durations, > 0 logs only
 					# statements running at least this number
 					# of milliseconds


# - What to Log -

#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
log_connections = on
log_disconnections = on
#log_duration = off
log_error_verbosity = verbose		# terse, default, or verbose messages
#log_hostname = off
#log_line_prefix = ''			# special values:
 					#   %a = application name
 					#   %u = user name
 					#   %d = database name
 					#   %r = remote host and port
 					#   %h = remote host
 					#   %p = process ID
 					#   %t = timestamp without milliseconds
 					#   %m = timestamp with milliseconds
 					#   %i = command tag
 					#   %e = SQL state
 					#   %c = session ID
 					#   %l = session line number
 					#   %s = session start timestamp
 					#   %v = virtual transaction ID
 					#   %x = transaction ID (0 if none)
 					#   %q = stop here in non-session
 					#        processes
 					#   %% = '%'
 					# e.g. '<%u%%%d> '
#log_lock_waits = off			# log lock waits >= deadlock_timeout
#log_statement = 'none'			# none, ddl, mod, all
#log_temp_files = -1			# log temporary files equal or larger
 					# than the specified size in kilobytes;
 					# -1 disables, 0 logs all temp files
#log_timezone = unknown			# actually, defaults to TZ environment
 					# setting

> What platform are you on (maybe you said already, and I missed it)? How did 
> you install PostgreSQL?

   Slackware-13.1/32-bit (soon to be upgraded to -13.37/64-bit). The
SlackBuild script did not want to work for me so I built with the usual
./configure; make; make install.

> I think you've already got all the diagnostics you're going to get from
> the PHP side of things... there are PHP functions to get the most recent
> error from the Postgres connection, but it sounds as though the connection
> isn't getting made in the first place (which of course negates my upthread
> guess about bytea... doh).

   I think that's the problem. When I configured php I specified pgsql and
removed mysql, yet I don't see this database listed in the phpinfo output
nor do I have the libraries when I try to 'find' them. This may be the key.
I can send the php configure options, too.

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:20 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Alan Hodgson <ahodgson@simkin.ca>
  2011-04-07 16:35   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 16:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:15       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:20         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Bill Moran <wmoran@potentialtech.com>
  2011-04-07 17:35           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 17:56             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 18:59               ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 19:06                 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-07 20:10                   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:25                     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 20:39                       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 22:02                         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-07 22:19                           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Raymond O'Donnell <rod@iol.ie>
  2011-04-07 22:51                             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 13:17                               ` Raymond O'Donnell <rod@iol.ie>
  0 siblings, 0 replies; 42+ messages in thread

From: Raymond O'Donnell @ 2011-04-08 13:17 UTC (permalink / raw)
  To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-php

On 07/04/2011 23:51, Rich Shepard wrote:
> On Thu, 7 Apr 2011, Raymond O'Donnell wrote:
>
>> That is a bit odd. Yes, please do post the relevant bits of the .conf -
>> clearer heads than mine may spot something.
>
> Ray,
>
> #------------------------------------------------------------------------------
>
> # ERROR REPORTING AND LOGGING
> #------------------------------------------------------------------------------
>
>
> # - Where to Log -
>
> log_destination = 'syslog' # Valid values are combinations of
> # stderr, csvlog, syslog, and eventlog,
> # depending on platform. csvlog
> # requires logging_collector to be on.
>
> # This is used when logging to stderr:
> logging_collector = on # Enable capturing of stderr and csvlog
> # into log files. Required to be on for
> # csvlogs.
> # (change requires restart)
>
> # These are only used if logging_collector is on:
> #log_directory = 'pg_log' # directory where log files are written,
> # can be absolute or relative to PGDATA
> #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
> # can include strftime() escapes

That all looks fine.... I seem to remember from upthread that you were 
looking for logging output in /var/log/messages, but syslog output 
should be in /var/log/syslog (on my Debian system anyway).

Also, from the above, look in the pg_log directory under the data 
directory for any log files that might get written there.

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3 [UPDATE]
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 14:02 ` Rich Shepard <rshepard@appl-ecosys.com>
  2 siblings, 0 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-08 14:02 UTC (permalink / raw)
  To: pgsql-php

On Thu, 7 Apr 2011, Rich Shepard wrote:

>  I'm migrating our Web site to CMS Made Simple, it worked here with
> postgres-8.4, but stopped working when I upgraded to postgres-9.0.0 (and I'm
> now running 9.0.3). This is with php-5.2.17 on Slackware-13.1. I need help
> since I don't know PHP or ADOdb.

Everyone:

    I _think_ that I found the source of the problem, but I cannot seem to
get it fixed. When I looked more closely this morning at the configuration
section of the phpinfo() output I saw that the database was specified as
'postgreql-shared' and 'pdo-postgresql-shared'. I had done that a couple of
days ago when I re-built 5.2.17, then discoverdd that the actual name php
wants is 'pgsql.' So, I changed the options in the SlackBuild script to
reflect that:

    --with-pgsql=shared,/usr \
    --with-pdo-pgsql=shared,/usr \

and rebuilt the package. I then upgraded the installed package. However,
phpinfo() still showed

...ldap=shared' '--enable-mbstring=shared' '--enable-hash'
'--with-mhash=shared,/usr' '--with-postgresql=shared,/usr'
'--enable-pdo=shared' '--with-pdo-postgresql=shared,/usr' '--with-...

in the configure command section at the very top of the page.

    Hmmm-m-m-m. So, just now I removed the package completely, rebuilt and
re-installed it. But, phpinfo() _still_ shows 'postgresql' rather than
'pgsql' and in the pdo section of the page only sqlite is shown. My
application still does not run.

    The issue now is how to get rid of whatever phpinfo() is seeing so that it
can see (and use) the proper reference to the database. Why would phpinfo()
show the incorrect string if the configure options are correct?

   Any ideas?

Rich





^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 15:34 ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:39   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
  2011-04-08 15:45   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2 siblings, 2 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-08 15:34 UTC (permalink / raw)
  To: pgsql-php

   Where does phpinfo() get its information to display on the browser page? I
just noticed that the build date shown is 5 days old and does not reflect
the proper configuration of the build I did a couple of hours ago.

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 15:39   ` Brian Fehrle <brianf@consistentstate.com>
  2011-04-08 15:48     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  1 sibling, 1 reply; 42+ messages in thread

From: Brian Fehrle @ 2011-04-08 15:39 UTC (permalink / raw)
  To: pgsql-php

My experience with php and httpd is low, but I believe it does an audit 
of the httpd server, seeing what is available in terms of services and 
programs it can use. If what it shows is not correct, it could mean the 
httpd server is not configured correctly, or possibly needs a restart.

- Brian F

On 04/08/2011 09:34 AM, Rich Shepard wrote:
>   Where does phpinfo() get its information to display on the browser 
> page? I
> just noticed that the build date shown is 5 days old and does not reflect
> the proper configuration of the build I did a couple of hours ago.
>
> Rich
>




^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:39   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Brian Fehrle <brianf@consistentstate.com>
@ 2011-04-08 15:48     ` Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 0 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-08 15:48 UTC (permalink / raw)
  To: pgsql-php

On Fri, 8 Apr 2011, Brian Fehrle wrote:

> ... it could mean the httpd server is not configured correctly, or
> possibly needs a restart.

Brian,

   Restarting httpd did the trick. Still cannot start CMS, but the build date
is correct and so are the configuration options.

Thanks,

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 15:45   ` Daniel Carrero <dcarreroc@gmail.com>
  2011-04-08 15:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 22:07     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  1 sibling, 2 replies; 42+ messages in thread

From: Daniel Carrero @ 2011-04-08 15:45 UTC (permalink / raw)
  To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-php

Rich, I download CMS Made Simple 1.9.4.1 (the latest) and searching
for a adodb library I found that is using adodb lite [1] again not
explain how use with postgresql 9.

What if you install xdebug for more details?

I install CMS Made Simple and I have some errors with my version of
php (5.3.5 xampp windows 7)


[1] http://adodblite.sourceforge.net/howtoinstall.php

2011/4/8 Rich Shepard <rshepard@appl-ecosys.com>:
>  Where does phpinfo() get its information to display on the browser page? I
> just noticed that the build date shown is 5 days old and does not reflect
> the proper configuration of the build I did a couple of hours ago.
>
> Rich
>
> --
> Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-php
>



-- 
Daniel Carrero Canales
Analista programador de sistemas
+56974726453
http://www.kode.cl



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:45   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
@ 2011-04-08 15:56     ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 16:01       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  1 sibling, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-08 15:56 UTC (permalink / raw)
  To: pgsql-php

On Fri, 8 Apr 2011, Daniel Carrero wrote:

> Rich, I download CMS Made Simple 1.9.4.1 (the latest) and searching for a
> adodb library I found that is using adodb lite [1] again not explain how
> use with postgresql 9.

Daniel,

   Yes, I see it's using adodb-lite. That's what I have here.

> What if you install xdebug for more details?

   Haven't used this before. I'll take a look.

   Restarting httpd fixed the phpinfo() display. But trying to access cms
shows a page-not-found error in the access_log (but a success earlier this
morning although I did not see the CMS Made Simple page displayed). Many
errors in the error_log.

Thanks,

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:45   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-08 15:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 16:01       ` Daniel Carrero <dcarreroc@gmail.com>
  2011-04-08 16:32         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Daniel Carrero @ 2011-04-08 16:01 UTC (permalink / raw)
  To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-php

Rich, maybe you can create a connection file to test and enable the
debug option for adodb.... [1]

http://adodblite.sourceforge.net/howtoinstall.php

2011/4/8 Rich Shepard <rshepard@appl-ecosys.com>:
> On Fri, 8 Apr 2011, Daniel Carrero wrote:
>
>> Rich, I download CMS Made Simple 1.9.4.1 (the latest) and searching for a
>> adodb library I found that is using adodb lite [1] again not explain how
>> use with postgresql 9.
>
> Daniel,
>
>  Yes, I see it's using adodb-lite. That's what I have here.
>
>> What if you install xdebug for more details?
>
>  Haven't used this before. I'll take a look.
>
>  Restarting httpd fixed the phpinfo() display. But trying to access cms
> shows a page-not-found error in the access_log (but a success earlier this
> morning although I did not see the CMS Made Simple page displayed). Many
> errors in the error_log.
>
> Thanks,
>
> Rich
>
> --
> Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-php
>



-- 
Daniel Carrero Canales
Analista programador de sistemas
+56974726453
http://www.kode.cl



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:45   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-08 15:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 16:01       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
@ 2011-04-08 16:32         ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 18:53           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-08 16:32 UTC (permalink / raw)
  To: pgsql-php

On Fri, 8 Apr 2011, Daniel Carrero wrote:

> Rich, maybe you can create a connection file to test and enable the debug
> option for adodb.... [1]
> http://adodblite.sourceforge.net/howtoinstall.php

Daniel,

   adobd_lite is installed and configured by CMS Made Simple. I notice that
it does not explicitly support postgres9 yet, but changing the config.php to
postgres8 makes no difference.

   I'll keep digging.

Thanks,

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:45   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-08 15:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 16:01       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-08 16:32         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 18:53           ` Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 19:10             ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 1 reply; 42+ messages in thread

From: Rich Shepard @ 2011-04-08 18:53 UTC (permalink / raw)
  To: pgsql-php

On Fri, 8 Apr 2011, Rich Shepard wrote:

>  adobd_lite is installed and configured by CMS Made Simple. I notice that
> it does not explicitly support postgres9 yet, but changing the config.php
> to postgres8 makes no difference.

Folks:

   Now phpinfo() shows that postgres support is available in php and
recognized:

PDO
PDO support	enabled
PDO drivers 	pgsql, sqlite, sqlite2

pdo_pgsql
PDO Driver for PostgreSQL	enabled
PostgreSQL(libpq) Version 	9.0.3
Module version 	1.0.2
Revision 	$Id: pdo_pgsql.c 293036 2010-01-03 09:23:27Z sebastian $

pdo_sqlite
PDO Driver for SQLite 3.x	enabled
PECL Module version 	1.0.1 $Id: pdo_sqlite.c 293036 2010-01-03 09:23:27Z
sebastian $
SQLite Library 	3.6.23.1

pgsql
PostgreSQL Support	enabled
PostgreSQL(libpq) Version 	9.0.3
Multibyte character support 	enabled
SSL support 	enabled
Active Persistent Links 	0
Active Links 	0

Directive	Local Value	Master Value
pgsql.allow_persistent	On	On
pgsql.auto_reset_persistent	Off	Off
pgsql.ignore_notice	Off	Off
pgsql.log_notice	Off	Off
pgsql.max_links	Unlimited	Unlimited
pgsql.max_persistent	Unlimited	Unlimited

   This suggests to me that the problem is with adodb_lite. Since php is the
interface to that can the adodb.functions.php file be modified to try to
isolate the specific error?

   I'll go look on sourceforge.net to see if the adodb_lite source is there.

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:45   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-08 15:56     ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 16:01       ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
  2011-04-08 16:32         ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 18:53           ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
@ 2011-04-08 19:10             ` Rich Shepard <rshepard@appl-ecosys.com>
  0 siblings, 0 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-08 19:10 UTC (permalink / raw)
  To: pgsql-php

   I downloaded the adodb_lite source code (latest version from 2007). Is
there someone here fluent in PHP who will work with me to figure out what
needs to change in the postgres8 .php files to make them work with
postgres9?

   There are all of 8 php files:

postgres8_datadict.inc     postgres8_extend_module.inc
postgres8_date_module.inc  postgres8_meta_module.inc
postgres8_driver.inc       postgres8_transaction_module.inc

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread

* Re: Connecting PHP-based Application to Postgres-9.0.3
  2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:34 ` Re: Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
  2011-04-08 15:45   ` Re: Connecting PHP-based Application to Postgres-9.0.3 Daniel Carrero <dcarreroc@gmail.com>
@ 2011-04-08 22:07     ` Rich Shepard <rshepard@appl-ecosys.com>
  1 sibling, 0 replies; 42+ messages in thread

From: Rich Shepard @ 2011-04-08 22:07 UTC (permalink / raw)
  To: pgsql-php

On Fri, 8 Apr 2011, Daniel Carrero wrote:

> I install CMS Made Simple and I have some errors with my version of
> php (5.3.5 xampp windows 7)

   I've started to make adobd_lite work with postgresql-9.x. Modified 8 files
so far and now have explicit error messages to another 9 warnings and errors
to fix. When I get this all done I'll pass it on to the CMS Made Simple
devs.

   Turns out I can diff the version7 and version8 files and apply those
differences to the version9 files.

Rich



^ permalink  raw  reply  [nested|flat] 42+ messages in thread


end of thread, other threads:[~2011-04-08 22:07 UTC | newest]

Thread overview: 42+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07 16:05 Connecting PHP-based Application to Postgres-9.0.3 Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 16:20 ` Alan Hodgson <ahodgson@simkin.ca>
2011-04-07 16:35   ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 16:51     ` Alan Hodgson <ahodgson@simkin.ca>
2011-04-07 17:13       ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 17:42         ` Alan Hodgson <ahodgson@simkin.ca>
2011-04-07 17:52           ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 16:56     ` Bill Moran <wmoran@potentialtech.com>
2011-04-07 17:15       ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 17:20         ` Bill Moran <wmoran@potentialtech.com>
2011-04-07 17:35           ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 17:56             ` Brian Fehrle <brianf@consistentstate.com>
2011-04-07 18:17               ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 18:58                 ` Brian Fehrle <brianf@consistentstate.com>
2011-04-07 20:00                   ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 18:59                 ` Brian Fehrle <brianf@consistentstate.com>
2011-04-07 18:59               ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 19:06                 ` Brian Fehrle <brianf@consistentstate.com>
2011-04-07 20:10                   ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 20:25                     ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 20:39                       ` Raymond O'Donnell <rod@iol.ie>
2011-04-07 20:51                         ` Daniel Carrero <dcarreroc@gmail.com>
2011-04-07 20:59                           ` Raymond O'Donnell <rod@iol.ie>
2011-04-07 22:05                           ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 22:08                           ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 23:20                             ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 12:53                               ` Matthias Ritzkowski <matthiar@gmail.com>
2011-04-07 22:02                         ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-07 22:19                           ` Raymond O'Donnell <rod@iol.ie>
2011-04-07 22:51                             ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 13:17                               ` Raymond O'Donnell <rod@iol.ie>
2011-04-08 14:02 ` Re: Connecting PHP-based Application to Postgres-9.0.3 [UPDATE] Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 15:34 ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 15:39   ` Brian Fehrle <brianf@consistentstate.com>
2011-04-08 15:48     ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 15:45   ` Daniel Carrero <dcarreroc@gmail.com>
2011-04-08 15:56     ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 16:01       ` Daniel Carrero <dcarreroc@gmail.com>
2011-04-08 16:32         ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 18:53           ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 19:10             ` Rich Shepard <rshepard@appl-ecosys.com>
2011-04-08 22:07     ` Rich Shepard <rshepard@appl-ecosys.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox