Thread: Probleme with Postgresql and phpPgAdmin on a Debian Linux

Probleme with Postgresql and phpPgAdmin on a Debian Linux

From
"Samuel Torton"
Date:
Hi,


I'm having problem with Postgresql and phpPgAdmin on my Debian Linux
box:
  - Debian Woody 3.0
  - PostgreSQL 7.2.1
  - phpPgAdmin 2.4.1

If I want to run a SQL from phpPgAdmin interface, such as:

    ------
    INSERT INTO content VALUES (1, '1 description', 'content_tpl1',
    'content_tpl1.gif', 'Il s\'agit d\'une simple page avec du
    texte.<br>Vous n\'avez qu\'à rajouter la
    <b><i>description</i></b> dans l\'espace réservé
    à cet effet.');
    ------

... I get the following error message :

    ------
    Warning: PostgreSQL query failed: ERROR: parser: parse error at
    or near "agit" in /usr/share/phppgadmin/db_readdump.php on line
33
    Error - /usr/share/phppgadmin/db_readdump.php -- Line: 33
    PostgreSQL said: ERROR: parser: parse error at or near "agit"
    Your query:
    INSERT INTO content VALUES (1, '1 description', 'content_tpl1',
    'content_tpl1.gif', 'Il s'agit d'une simple page avec du
    texte.<br>Vous n'avez qu'à rajouter la
    <b><i>description</i></b> dans l'espace ré
    ....
    ------

This type of command lines (with "\'" strings) used to work successfully
with previous versions of PostgreSQL 7.0.3


Would anybody have any idea to debug ?

Thank you,
--
Samuel Torton
http://www.ncslab.com



Re: Probleme with Postgresql and phpPgAdmin on a Debian Linux

From
Christopher Kings-Lynne
Date:
Yes, phpPgAdmin 2.4.2 is not quoting your strings properly.  We're working
on phpPgAdmin 3.0, but inthe mean time, try making sure magic_quotes_gpc
is enabled for that directory.

Project page: http://phppgadmin.sourceforge.net/

Chris

On Mon, 27 Jan 2003, Samuel Torton wrote:

> Hi,
>
>
> I'm having problem with Postgresql and phpPgAdmin on my Debian Linux
> box:
>   - Debian Woody 3.0
>   - PostgreSQL 7.2.1
>   - phpPgAdmin 2.4.1
>
> If I want to run a SQL from phpPgAdmin interface, such as:
>
>     ------
>     INSERT INTO content VALUES (1, '1 description', 'content_tpl1',
>     'content_tpl1.gif', 'Il s\'agit d\'une simple page avec du
>     texte.<br>Vous n\'avez qu\'à rajouter la
>     <b><i>description</i></b> dans l\'espace réservé
>     à cet effet.');
>     ------
>
> ... I get the following error message :
>
>     ------
>     Warning: PostgreSQL query failed: ERROR: parser: parse error at
>     or near "agit" in /usr/share/phppgadmin/db_readdump.php on line
> 33
>     Error - /usr/share/phppgadmin/db_readdump.php -- Line: 33
>     PostgreSQL said: ERROR: parser: parse error at or near "agit"
>     Your query:
>     INSERT INTO content VALUES (1, '1 description', 'content_tpl1',
>     'content_tpl1.gif', 'Il s'agit d'une simple page avec du
>     texte.<br>Vous n'avez qu'à rajouter la
>     <b><i>description</i></b> dans l'espace ré
>     ....
>     ------
>
> This type of command lines (with "\'" strings) used to work successfully
> with previous versions of PostgreSQL 7.0.3
>
>
> Would anybody have any idea to debug ?
>
> Thank you,
> --
> Samuel Torton
> http://www.ncslab.com
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


Re: Probleme with Postgresql and phpPgAdmin on a Debian Linux

From
Andrei Verovski (aka MacGuru)
Date:
On Monday, Jan 27, 2003, at 15:42 Europe/Helsinki, Christopher
Kings-Lynne wrote:

> Yes, phpPgAdmin 2.4.2 is not quoting your strings properly.  We're
> working
> on phpPgAdmin 3.0, but inthe mean time, try making sure
> magic_quotes_gpc
> is enabled for that directory.
>
> Project page: http://phppgadmin.sourceforge.net/
>

Dear Christofer,

Is option magic_quotes_gpc should be initialized in php.ini or somehwre
else?

Thanks


*********************************************
*   Best Regards   ---   Andrei Verovski
*
*   Personal Home Page
*   http://snow.prohosting.com/guru4mac
*   Mac, Linux, DTP, Development, IT WEB Site
*********************************************


Re: Probleme with Postgresql and phpPgAdmin on a Debian Linux

From
"Christopher Kings-Lynne"
Date:
> On Monday, Jan 27, 2003, at 15:42 Europe/Helsinki, Christopher
> Kings-Lynne wrote:
>
> > Yes, phpPgAdmin 2.4.2 is not quoting your strings properly.  We're
> > working
> > on phpPgAdmin 3.0, but inthe mean time, try making sure
> > magic_quotes_gpc
> > is enabled for that directory.
> >
> > Project page: http://phppgadmin.sourceforge.net/
> >
>
> Dear Christofer,
>
> Is option magic_quotes_gpc should be initialized in php.ini or somehwre
> else?

Yes, but it's just a guess - I can't guarantee that it will fix the issue.
I really do suggest tracking the webdb CVS module which is to become
phpPgAdmin 3.

Chris


Re: Probleme with Postgresql and phpPgAdmin on a Debian Linux

From
"Samuel Torton"
Date:
Hi Chris and the list,

I checked the PHP.INI conf file and I could see that the
"magic_quote_gpc" is enabled.

So, phpPgAdmin 2.4.2 is bugged, but in the meanwhile it's possible to
avoid this bug by using the "psql" command line with "-f file" argument,
and then everything is ok to dump / restore tables.

Cheers,
--
Samuel Torton
http://www.ncslab.com

> -----Original Message-----
> From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-
> owner@postgresql.org] On Behalf Of Christopher Kings-Lynne
> Sent: mardi 28 janvier 2003 02:12
> To: Andrei Verovski (aka MacGuru); pgsql-php@postgresql.org
> Subject: Re: [PHP] Probleme with Postgresql and phpPgAdmin on a Debian
> Linux
>
> > On Monday, Jan 27, 2003, at 15:42 Europe/Helsinki, Christopher
> > Kings-Lynne wrote:
> >
> > > Yes, phpPgAdmin 2.4.2 is not quoting your strings properly.  We're
> > > working
> > > on phpPgAdmin 3.0, but inthe mean time, try making sure
> > > magic_quotes_gpc
> > > is enabled for that directory.
> > >
> > > Project page: http://phppgadmin.sourceforge.net/
> > >
> >
> > Dear Christofer,
> >
> > Is option magic_quotes_gpc should be initialized in php.ini or
somehwre
> > else?
>
> Yes, but it's just a guess - I can't guarantee that it will fix the
issue.
> I really do suggest tracking the webdb CVS module which is to become
> phpPgAdmin 3.
>
> Chris
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster