From: jovino B. <jo...@ue...> - 2015-03-27 00:11:14
|
Hi again Karl, After working in another project, finally I am returning to operating systems again in my job. Well, I am trying to resolve that problem with phppgadmin 5.1 and Postgresql 8.4.20 (that run in differents servers). I have already understood that /usr/bin/pg_dump program is working fine in the webserver because I have got a good backup after using this command at the shell line command, doing it as a common user. Database server (Postgresql) receives the command, performs a backup and returns the file to the webserver, at the home of the common user. I have used a command like this at the shell: /usr/bin/pg_dump -Ft -U bduser -h "database server address" -f output.tar db_input After putting the password of bduser, everything work fine. After analyzing program /var/www/html/phppgadmin.dinfo/paginas/dbexport.php I could understand that it is sending that message: Export error: Failed to execute pg_dumpall (given path in your conf/config.inc.php : /usr/bin/pg_dumpall). Please, fix this path in your configuration and relog. because it can´t take the correct version of pg_dumps installed in the webserver. File config.inc.php has the correct paths: $conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump'; $conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall'; A piece of dbexport.php program follows: ................................................................... ................................................................... // Obtain the pg_dump version number and check if the path is good $version = array(); preg_match("/(\d+(?:\.\d+)?)(?:\.\d+)?.*$/", exec($exe . " --version"), $version); if (empty($version)) { if ($dumpall) printf($lang['strbadpgdumpallpath'], $server_info['pg_dumpall_path']); else printf($lang['strbadpgdumppath'], $server_info['pg_dump_path']); exit; } ......................................................................................................... ......................................................................................................... Strbadpgdumppath has the message "Export error: Failed......" Also, I have inserted command $version = '8.4.20' before the if (empty($version)) expression, in order to make this program follow. Besides, at the end of this dbexport.php program, before the function passthru($cmd), I have put a command echo "command is: ".$cmd; in order to do the phppgadmin software show me at my browser, what the real command dbexport.php is assembling. So, phppgadmin shows, when I try to do a backup (with any options at the phppgadmin interface) : command is /usr/bin/pg_dumpall -i -a And no backup process occurs. Besides, at the database server nothing is logged in the postgresql logs. I think there is a bug in dbexport.php but I am not sure. I know that $cmd is not complete (no address of dbserver, no user, no db, etc.) Any help will be appreciated. Thank you a lot. -----Mensagem original----- De: Karl .O Pinc [mailto:ko...@me...] Enviada em: sexta-feira, 28 de novembro de 2014 15:16 Para: jo...@ue... Cc: php...@li... Assunto: Re: [ppa-users] RES: Error trying to do a Postgresql Export using phppgadmin interface Perhaps we are both not paying attention. I look at your log entry below and notice that it says pg_dumpall not pg_dump , but it is looking for pg_dump . Perhaps your config file is not correct? On November 27, 2014 2:02:25 PM CST, jovino Borret <jo...@ue...> wrote: >Hi Karl, > > Thanks a lot for your attention. > > I have checked /usr/bin/pg_dumpall > and this program is installed ok in web page server (in the > Postgresql database server, too). > > I think phppgadmin from web server (I mean config.inc.php, that has > the path for pg_dumpall) is not working fine in order to pass the > correct link (name) of the database server (where pg_dumpall must run > in order to do the backup). > > I don't know why, because the other functions of phppagadmin > is running well (accessing database server and doing others requests). > >I have searched log of database server and there is no register of >backup attempts > from web server. > >Even so, >thank you > > >-----Mensagem original----- >De: Karl O. Pinc [mailto:ko...@me...] >Enviada em: quarta-feira, 19 de novembro de 2014 18:59 >Para: jo...@ue... >Cc: php...@li... >Assunto: Re: [ppa-users] Error trying to do a Postgresql Export using >phppgadmin interface > >On 11/19/2014 02:35:20 PM, jovino Borret wrote: >> Hi all, >> >> >> >> I am trying to do an export of a Postgresql data base table >> using >> www.phppgadmin... 5.1 web interface >> >> and the system (web page server) returns the following message: >> >> >> >> >> >> Export error: Failed to execute pg_dump (given path in your >> conf/config.inc.php : >> /usr/bin/pg_dumpall). Please, fix this path in your configuration and > >> relog. >> >> >> >> >> >> We have two different servers (computers) installed: >> >> >> >> one of them is the web page server (CentOS, Apache, PHP, >> Phppgadmin 5.1); >> >> >> >> the other server runs Postgresql (CentOS, Postgresql 8.4.20). > >I suspect that you do not have pg_dump installed on your web server. > >Something like: > > yum install postgresql > >should install the client programs, including pg_dump. > > >Karl <ko...@me...> >Free Software: "You don't pay back, you pay forward." > -- Robert A. Heinlein >= > > >--- >Este email está limpo de vírus e malwares porque a proteção do avast! >Antivírus está ativa. >http://www.avast.com > > >------------------------------------------------------------------------------ >Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >from Actuate! Instantly Supercharge Your Business Reports and >Dashboards >with Interactivity, Sharing, Native Excel Exports, App Integration & >more >Get technology previously reserved for billion-dollar corporations, >FREE >http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >_______________________________________________ >phpPgAdmin-users mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/phppgadmin-users Karl <ko...@me...> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein --- Este email está limpo de vírus e malwares porque a proteção do avast! Antivírus está ativa. http://www.avast.com |