[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-tracker] [bug #5628] Setup does not create db
From: |
nobody |
Subject: |
[Phpgroupware-tracker] [bug #5628] Setup does not create db |
Date: |
Fri, 03 Oct 2003 11:48:58 -0400 |
User-agent: |
Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131 |
=================== BUG #5628: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=5628&group_id=509
Changes by: Johnson <address@hidden>
Date: Fri 10/03/2003 at 15:48 (GMT)
------------------ Additional Follow-up Comments ----------------------------
Here is patch (diff phpgwapi/inc/class.db_pgsql.inc.php
phpgwapi/inc/class.db_pgsql.inc.php.orig):
58a59
>
68c69
< $this->address@hidden($cstr);
---
> $this->Link_ID=pg_pconnect($cstr);
72c73
< $this->address@hidden($cstr);
---
> $this->Link_ID=pg_connect($cstr);
77,78c78
<
$this->halt(($GLOBALS['phpgw_info']['server']['db_persistent']?'p':'')."connect($Host,
$User, $Password) failed.");
< return 0;
---
> $this->halt('Link-ID == false,
> '.($GLOBALS['phpgw_info']['server']['db_persistent']?'p':'').'connect
> failed');
83a84
>
89d89
< return $this->Link_ID;
150d149
<
158,171c157,159
< if (!$this->connect())
< {
< return 0; /* we already complained in
connect() about that. */
< };
< # New query, discard previous result.
< if ($this->Query_ID)
< {
< $this->free();
< }
<
< if ($this->Debug)
< {
< printf("Debug: query = %s<br>n",
$Query_String);
< }
---
> $this->connect();
>
> /* printf("<br>Debug: query = %s<br>n", $Query_String);
> */
176c164
< $this->Error = @pg_ErrorMessage($this->Link_ID);
---
> $this->Error = pg_ErrorMessage($this->Link_ID);
180d167
< return 0;
184d170
< # Will return nada if it fails. That's fine.
222,226c208,209
< if ($this->Link_ID)
< {
< $this->Error = pg_ErrorMessage($this->Link_ID);
< $this->Errno = ($this->Error == '') ? 0 : 1;
< }
---
> $this->Error = pg_ErrorMessage($this->Link_ID);
> $this->Errno = ($this->Error == '') ? 0 : 1;
261c244
< return @pg_Exec($this->Link_ID,'rollback');
---
> return pg_Exec($this->Link_ID,'rollback');
412d394
< /* private: error handling */
415,417d396
< $this->Error = @pg_ErrorMessage($this->Link_ID);
< $this->Errno = 1;
<
421a401
>
424a405
>
522d502
< $this->Database = "template1";
525,528d504
< /*
< This doesn't work if the httpd server user doesn't have
execute permissions on the createdb program
< */
< /*
536a513
>
539c516
< // either the rights r not available or the
postmaster is not running ....
---
> /* either the rights r not available or the
> postmaster is not running .... */
543,546d519
< */
<
< $this->query("CREATE DATABASE $currentDatabase");
< $this->query("grant all on $currentDatabase.* to
address@hidden identified by '$currentPassword'");
=================== BUG #5628: FULL BUG SNAPSHOT ===================
Submitted by: jecinc Project: phpGroupWare
Submitted on: Tue 09/30/2003 at 03:30
Category: API - Setup Bug Group: 0.9.16RC1
Severity: 5 - Major Priority: None
Resolution: None Assigned to: cw
Status: Open Component Version: CVS
Platform Version: Linux - RedHat Reproducibility: None
Summary: Setup does not create db
Original Submission: It is my understanding that the setup app is to create
the db if it doesn't exist (after the header file is made).
When I log into setup I get:
Warning: pg_pconnect() PostgreSQL link lost, unable to reconnect in
/home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php on line 69
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 164
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 208
Warning: pg_pconnect() unable to connect to PostgreSQL server: FATAL 1:
Database "phpgroupwaretest16" does not exist in the system catalog. in
/home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php on line 69
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 164
Warning: pg_pconnect() unable to connect to PostgreSQL server: FATAL 1:
Database "phpgroupwaretest16" does not exist in the system catalog. in
/home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php on line 69
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 164
Warning: pg_pconnect() unable to connect to PostgreSQL server: FATAL 1:
Database "phpgroupwaretest16" does not exist in the system catalog. in
/home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php on line 69
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 164
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 208
Warning: pg_pconnect() unable to connect to PostgreSQL server: FATAL 1:
Database "phpgroupwaretest16" does not exist in the system catalog. in
/home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php on line 69
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 164
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 208
Warning: pg_pconnect() unable to connect to PostgreSQL server: FATAL 1:
Database "phpgroupwaretest16" does not exist in the system catalog. in
/home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php on line 69
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 164
Warning: pg_pconnect() unable to connect to PostgreSQL server: FATAL 1:
Database "phpgroupwaretest16" does not exist in the system catalog. in
/home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php on line 69
Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link
resource in /home/htdocs/phpgroupwaretest16/phpgwapi/inc/class.db_pgsql.inc.php
on line 164
Follow-up Comments
*******************
-------------------------------------------------------
Date: Fri 10/03/2003 at 15:48 By: jecinc
Here is patch (diff phpgwapi/inc/class.db_pgsql.inc.php
phpgwapi/inc/class.db_pgsql.inc.php.orig):
58a59
>
68c69
< $this->address@hidden($cstr);
---
> $this->Link_ID=pg_pconnect($cstr);
72c73
< $this->address@hidden($cstr);
---
> $this->Link_ID=pg_connect($cstr);
77,78c78
<
$this->halt(($GLOBALS['phpgw_info']['server']['db_persistent']?'p':'')."connect($Host,
$User, $Password) failed.");
< return 0;
---
> $this->halt('Link-ID == false,
> '.($GLOBALS['phpgw_info']['server']['db_persistent']?'p':'').'connect
> failed');
83a84
>
89d89
< return $this->Link_ID;
150d149
<
158,171c157,159
< if (!$this->connect())
< {
< return 0; /* we already complained in
connect() about that. */
< };
< # New query, discard previous result.
< if ($this->Query_ID)
< {
< $this->free();
< }
<
< if ($this->Debug)
< {
< printf("Debug: query = %s<br>n",
$Query_String);
< }
---
> $this->connect();
>
> /* printf("<br>Debug: query = %s<br>n", $Query_String);
> */
176c164
< $this->Error = @pg_ErrorMessage($this->Link_ID);
---
> $this->Error = pg_ErrorMessage($this->Link_ID);
180d167
< return 0;
184d170
< # Will return nada if it fails. That's fine.
222,226c208,209
< if ($this->Link_ID)
< {
< $this->Error = pg_ErrorMessage($this->Link_ID);
< $this->Errno = ($this->Error == '') ? 0 : 1;
< }
---
> $this->Error = pg_ErrorMessage($this->Link_ID);
> $this->Errno = ($this->Error == '') ? 0 : 1;
261c244
< return @pg_Exec($this->Link_ID,'rollback');
---
> return pg_Exec($this->Link_ID,'rollback');
412d394
< /* private: error handling */
415,417d396
< $this->Error = @pg_ErrorMessage($this->Link_ID);
< $this->Errno = 1;
<
421a401
>
424a405
>
522d502
< $this->Database = "template1";
525,528d504
< /*
< This doesn't work if the httpd server user doesn't have
execute permissions on the createdb program
< */
< /*
536a513
>
539c516
< // either the rights r not available or the
postmaster is not running ....
---
> /* either the rights r not available or the
> postmaster is not running .... */
543,546d519
< */
<
< $this->query("CREATE DATABASE $currentDatabase");
< $this->query("grant all on $currentDatabase.* to
address@hidden identified by '$currentPassword'");
-------------------------------------------------------
Date: Tue 09/30/2003 at 21:18 By: cw
um, yeah, I added/fixed this for mysql, but I don't have a pgsql install (and
don't plan on learning it anytime soon). Can someone port teh mysql functions
to pg?
CC list is empty
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=5628&group_id=509
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Phpgroupware-tracker] [bug #5628] Setup does not create db,
nobody <=
- [Phpgroupware-tracker] [bug #5628] Setup does not create db, nobody, 2003/10/03
- [Phpgroupware-tracker] [bug #5628] Setup does not create db, nobody, 2003/10/08
- [Phpgroupware-tracker] [bug #5628] Setup does not create db, nobody, 2003/10/09
- [Phpgroupware-tracker] [bug #5628] Setup does not create db, nobody, 2003/10/09
- [Phpgroupware-tracker] [bug #5628] Setup does not create db, nobody, 2003/10/09
- [Phpgroupware-tracker] [bug #5628] Setup does not create db, nobody, 2003/10/10