Menu

Parse errors when inserting or editing rows

Help
2002-09-12
2002-09-24
  • Nobody/Anonymous

    I upgraded PHP to 4.2.3 and switched from mysql to PostgreSQL. phppgAdmin works for most functions but now when I try to insert a row or edit (save) a row I get ugly parse errors. The data that was in the form has been chopped and diced. It also quotes all fields in the insert which postgreSQL does not like.

    I'm assuming that I have a configuration switch set wrong, but I don't know where to look.

     
    • Nobody/Anonymous

      does 4.2.3 have a "magic quotes" setting? That would be the first thing I'd look at.

       
      • Dan Wilson

        Dan Wilson - 2002-09-24

        Did you ever get this resolved?  If not, please give more details.  I've never seen anything like the error that you posted where it chopped off the beginning of much of the text in the queires.

         
    • Nobody/Anonymous

      I click on the edit button and get the edit form. as follows:

      Database test - Table books

      Field    Type    Function    Value    Comments
      code    bpchar 0-596-00160-6
      title    varchar Learning Cocoa
      author    varchar Apple Computer
      price    numeric 34.99
      kind    varchar macintosh

      Save

      When I click save this is what the error looks like:

      Error - /Library/WebServer/Documents/apps/phpPgAdmin/tbl_replace.php -- Line: 77

      PostgreSQL said: ERROR: parser: parse error at or near "cocoa"
      Your query:
      UPDATE "books" SET "code" = 6-00160-6, "title" = ning Cocoa, "author" = e Computer, "price" = 9, "kind" = ntosh WHERE "code" = '0-596-00160-6'

      Notice the chopped up data.

      Here are the magic quotes settings from phpinfo:
      magic_quotes_gpc    Off    Off
      magic_quotes_runtime    Off    Off
      magic_quotes_sybase    Off    Off

      I did have gpc set on On On so I tried turning it off.

      Good suggestion though.

      Vince

       
      • Dan Wilson

        Dan Wilson - 2002-09-13

        What version of phpPgAdmin are you using?

         
        • Nobody/Anonymous

          This is my phpPgAdmin home page

          Welcome to phpPgAdmin 2.4.2
          PostgreSQL 7.2.1 running on 127.0.0.1:5432

           
    • Nobody/Anonymous

      Here is my phpPgAdmin Home screen.

      Welcome to phpPgAdmin 2.4.2
      PostgreSQL 7.2.1 running on 127.0.0.1:5432

       
    • Nobody/Anonymous

      Welcome to phpPgAdmin 2.4.2
      PostgreSQL 7.2.1 running on 127.0.0.1:5432

       

Log in to post a comment.