php4-odbc problem

From: Manuel Martínez Valls (mmartinezv_at_sanostra.es)
Date: 02/18/04

  • Next message: Paul Morgan: "Info re. lilo 22.5.8-11 on Sarge"
    To: <debian-user@lists.debian.org>
    Date: Wed, 18 Feb 2004 16:13:05 +0100
    
    

    Hi,

      I've a little problem with a Debian woody machine with the postgresql-7.4
    deb package downloaded from:

        ftp://ftp.postgresql.org/pub/binary/v7.4/debian/ woody/main/binary-i386/

      When I use the substring sql command from a php script via an ODBC DSN I
    get no result. By example:

          $query = "select SUBSTRING(field_name,3)from table_name;";

          echo "$query";
          $resul = odbc_exec($conex, $query);

          if ($resul == 0){
             printf("Error %d \n", $resul);
             exit ();
          }

          $number_of_rows = odbc_num_rows($resul);
          if ($number_of_rows > 0)
          {
             for ($i=1; $i < $number_of_rows + 1; $i++)
             {
                $ret = odbc_fetch_into($resul, &$field);
                echo "field_name=$field[0]";
             }
          }

       This code returns a lot of empty rows.

       If I use the same query using the isql tool (with same DSN), i get the
    same number of rows with the correct.

       The rest of the php odbc scripts work fine, the only problem is with the
    queries containing SUBSTRING queries...

       I've installed the following packages:

    dpkg -l | grep php
    ii libphp-phplot 4.4.6-2 The graphic library for php.
    ii php4 4.1.2-6woody3 A server-side, HTML-embedded scripting
    langu
    ii php4-gd 4.1.2-6woody3 GD module for php4
    ii php4-ldap 4.1.2-6woody3 LDAP module for php4
    ii php4-mysql 4.1.2-6woody3 MySQL module for php4
    ii php4-odbc 4.1.2-6woody3 ODBC module for php4
    ii php4-pear 4.1.2-6woody3 PEAR - PHP Extension and Application
    Reposit
    ii php4-snmp 4.1.2-6woody3 SNMP module for php4
    ii php4-sybase 4.1.2-6woody3 Sybase / MS SQL Server module for php4
    ii phpdoc 20020310-1 Documentation for PHP4 and PHP3

    dpkg -l | grep odbc
    ii odbc-postgresq 7.4-0.woody.1 ODBC support for PostgreSQL
    ii odbcinst1 2.1.1-8 Support library and helper program for
    acces
    ii php4-odbc 4.1.2-6woody3 ODBC module for php4
    ii unixodbc 2.1.1-8 ODBC tools libraries

    dpkg -l | grep postgres
    ii odbc-postgresq 7.4-0.woody.1 ODBC support for PostgreSQL
    ii postgresql 7.4-0.woody.1 Object-relational SQL database, descended
    fr
    ii postgresql-cli 7.4-0.woody.1 Front-end programs for PostgreSQL
    ii postgresql-con 7.4-0.woody.1 Additional facilities for PostgreSQL
    ii postgresql-dev 7.4-0.woody.1 Header files for libpq (postgresql
    library)
    ii postgresql-plr 7.4-0.woody.1 Procedural Language interface between
    Postgr

    dpkg -l | grep libpq
    ii libpgsql2 7.2.1-2woody4 Shared library libpq.so.2 for PostgreSQL
    ii libpq3 7.4-0.woody.1 Shared library libpq.so.3 for PostgreSQL
    ii postgresql-dev 7.4-0.woody.1 Header files for libpq (postgresql
    library)

      Thanks in advance,

            Manuel Martínez Valls

    N… I@R 隊[huæâj{¬zºÞªç¬¶X¬¶Ç^n&§Â+ajË›ç-¡û§²æìr¸›y:è¹¹^
    ‰íiËeŠËfjË^®X¬¶Ç^n&§


  • Next message: Paul Morgan: "Info re. lilo 22.5.8-11 on Sarge"

    Relevant Pages

    • Re: OmniBase and STS not available
      ... ODBC can be used DSN-less. ... Concom public StORE repo (the only public PostgreSQL db I know of) using: ...       open. ... I find the easiest way to see what options are available for a given driver is ...
      (comp.lang.smalltalk.dolphin)
    • Re: IS PostgreSQL suitable in VFP Application
      ... a backend to VFP and it worked great. ... We had PostgreSQL running on a Red ... understanding was that PostgreSQL had features that MySQL lacked. ... of how it was setup is a bit fuzzy but on the workstation there was an ODBC ...
      (microsoft.public.fox.programmer.exchange)
    • Re: Trouble Installing ODBC 1.13 on Linux 64
      ... I've taken a quick look at some of the errors you are getting with the postgres ODBC driver - see below: ... ok 3 # skip SQLDescribeParam not supported using PostgreSQL ... ok 3 # skip Microsoft SQL Server tests not supported using PostgreSQL ...
      (perl.dbi.users)
    • Re: OmniBase and STS not available
      ... I'm not a big ODBC fan ... Concom public StORE repo (the only public PostgreSQL db I know of) using: ... Note the use of a non-default option in addition to the mandatory connection ... I find the easiest way to see what options are available for a given driver is ...
      (comp.lang.smalltalk.dolphin)
    • DBForms from MSAccess to PHP+PostgreSQL 1.0.0
      ... DBForms from MS Access to PHP + PostgreSQL is an application to ... several stages so the most complex issues of the conversion are broken ...
      (comp.software.shareware.announce)