|
From: SourceForge.net <no...@so...> - 2010-08-26 22:43:22
|
Bugs item #2718225, was opened at 2009-03-28 06:25 Message generated for change (Comment added) made by ioguix You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=418980&aid=2718225&group_id=37132 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Import/Export Group: GIT >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Mike Robinson (blackmagic1943) Assigned to: Guillaume `ioguix` de Rorthais (ioguix) Summary: dbexport.php problem Initial Comment: I'm running Pgsql 8.3.6. When I try to export a table in phpPdAdmin 4.2.2 I get the following message <br /> <b>Notice</b>: Undefined offset: 1 in <b>/usr/src/library/docs/pgadmin/dbexport.php</b> on line <b>75</b><br /> <br /> <b>Notice</b>: Undefined offset: 1 in <b>/usr/src/library/docs/pgadmin/dbexport.php</b> on line <b>78</b><br /> On inspecting the code it appears the code at line 71 of dbexport.php is not creating the required array elements in $version. To get past the problem I inserted " $version[1]='8.3.6' " at line 72, and although it fixed the error message it didn't fix the problem because nothing was dumped from the table. I looked at the variable $cmd and it contains: /home/pgsql/bin/pg_dump -i -t '"public"'.'"tindex"'. Executing this command on the command line produces an error message: pg_dump: [archiver (db)] connection to database "root" failed: FATAL: database "root" does not exist. I'm trying to connect to database 'webRIMS' so I changed the command to /home/pgsql/bin/pg_dump -i -t '"public"'.'"tindex"' webRIMS, adding the name of the database as required by pg_dump. This produced the following error: pg_dump: [archiver (db)] connection to database "webRIMS" failed: FATAL: role "root" does not exist. Here is my config file: <?php $conf['servers'][0]['desc'] = 'webRIMS'; $conf['servers'][0]['host'] = '127.0.0.1'; $conf['servers'][0]['port'] = 5432; $conf['servers'][0]['sslmode'] = 'allow'; $conf['servers'][0]['defaultdb'] = 'webRIMS'; $conf['servers'][0]['pg_dump_path'] = '/home/pgsql/bin/pg_dump'; $conf['servers'][0]['pg_dumpall_path'] = '/home/pgsql/bin/pg_dumpall'; $conf['servers'][0]['slony_support'] = false; $conf['servers'][0]['slony_sql'] = '/usr/share/pgsql'; $conf['default_lang'] = 'english'; $conf['autocomplete'] = 'default on'; $conf['extra_login_security'] = false; // MJR changed from true; $conf['owned_only'] = false; $conf['show_comments'] = true; $conf['show_advanced'] = false; $conf['show_system'] = false; $conf['show_reports'] = true; $conf['reports_db'] = 'phppgadmin'; $conf['reports_schema'] = 'public'; $conf['reports_table'] = 'ppa_reports'; $conf['owned_reports_only'] = false; $conf['min_password_length'] = 6; // MJR changed from 1; $conf['left_width'] = 250; // MJR changed from 200; $conf['theme'] = 'default'; $conf['show_oids'] = false; $conf['max_rows'] = 300; // MJR changed from 30; $conf['max_chars'] = 50; $conf['use_xhtml_strict'] = false; $conf['help_base'] = 'http://www.postgresql.org/docs/%s/interactive/'; $conf['version'] = 19; ?> I created the database 'webRIMS' using psql, and I created the tables in webRIMS using phpPgAdmin 4.2.2. MJR ---------------------------------------------------------------------- >Comment By: Guillaume `ioguix` de Rorthais (ioguix) Date: 2010-08-27 00:43 Message: oh, it was actually solved...so I guess I can just close it :) ---------------------------------------------------------------------- Comment By: Guillaume `ioguix` de Rorthais (ioguix) Date: 2010-08-27 00:40 Message: Hey, I fixed a couple of bugs in this file (dbexport.php). Please, give it a test using our current dev tree snapshot from our GIT repository: http://github.com/xzilla/phppgadmin you can download a tarbal or a zip file from this page. Thank you for your report and next feedback ! ---------------------------------------------------------------------- Comment By: Mike Robinson (blackmagic1943) Date: 2009-04-08 02:23 Message: Guillaume, You're right. The pgsql install process created /home/pgsql with restricted access, although the pg_dump program has 0755 permissions, which is why it works when copied to /bin. Thank you for your assistance. ---------------------------------------------------------------------- Comment By: Guillaume `ioguix` de Rorthais (ioguix) Date: 2009-04-05 02:47 Message: Mike, I suspect you have some kind of permissions problems when you try to use pg_dump from the /home/pgsql folder. Take care anyone have enought rights to access files in /home/pgsql/bin/ AND execute them. As instance, your PPA is probably runned with your httpd user rights, usualy httpd or www-data. /ioguix ---------------------------------------------------------------------- Comment By: Mike Robinson (blackmagic1943) Date: 2009-04-03 08:57 Message: Guillaume, I copied pg_dump into /usr/bin/ and changed conf/config.inc.php to reflect this, and the export function works. However, I know of no rule that says pg_dump must reside in a specific location. Is there such a rule? MJR ---------------------------------------------------------------------- Comment By: Mike Robinson (blackmagic1943) Date: 2009-04-03 02:36 Message: Thanks Guillaume, but the change you made doesn't fix the problem. Now I get the following error message: Export error: Failed to execute pg_dump (given path in your conf/config.inc.php : /home/pgsql/bin/pg_dump). Please, fix this path in your configuration and relog. My copy of pg_dump is in /home/pgsql/bin, and I want to leave it there. [root@Centos ~]# locate pg_dump /home/pgsql/bin/pg_dump /home/pgsql/bin/pg_dumpall /usr/share/man/man1/pg_dump.1 /usr/share/man/man1/pg_dumpall.1 [root@Centos ~]# ls -l /home/pgsql/bin/pg_dump -rwxr-xr-x 1 root root 1628312 2009-03-25 09:34 /home/pgsql/bin/pg_dump MJR ---------------------------------------------------------------------- Comment By: Guillaume `ioguix` de Rorthais (ioguix) Date: 2009-04-02 22:52 Message: Hi, Thanks for your report. It seems pretty similar to the bug #2605601: https://sourceforge.net/tracker/?func=detail&aid=2605601&group_id=37132&atid=418980 Please, check your paths to pg_dump and pg_dumpall. It has been fixed in the current repository. This fix will be available in our next release, but you can already get the latest code from this page: http://github.com/xzilla/phppgadmin/commits/REL_4-2. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=418980&aid=2718225&group_id=37132 |