[PHP-DEV] PHP 4.0 Bug #4673: unable to access tables From: wegmeyer <email protected>
Date: 05/29/00

From: wegmeyer <email protected>
Operating system: Linux
PHP version: 4.0.0 Release
PHP Bug Type: MSSQL related
Bug description: unable to access tables

PHP 4.0.0 used as simple cgi-Version:
  ./configure --with-sybase=/opt/sybase
  ( Version 11.0.3.3 of ASE )
  nothing else, to reduce config-problems

using sybase dblibs to access MS SQL 7.0 on an
Win NT 4.0 Small Business Server,
interface-file is configured and correct.

sybase_connect and select_db do well, but when
submitting a query like " select one, two, three from
TABLE_X WHERE..." i get a strange behavior of the Result Set. When using arrays:

$array=sybase_fetch_row($result)
while ($array) {
 print "$array[0],$array[1]";
 $array=sybase_fetch_row($result)
}

or doing the same with sybase_fetch_object I'll get
a emalloc(): unable to access xxxxxxxxxxxxxxx bytes
(looks like some Terabyte ), but i just requested
89 Lines of the table ( 2KB per line )

Using the same script with PHP 3.0.15 or 16 i recieve:

in case of arrays:
  Everything goes well ( When i convert float and datetime into char-Fields and ignore timestamps which never worked)

in case of objects:
  All DB-Fields containing char or varchar are there, all
  other object-members i.E. $person->BirthDate do not exist
  ( doesn't work with datetime, and float ).

We never had a problem accessing MS-SQL that way with PHP 3,
but now it seems that neither objects nor arrays do work.
Do you have any i idea who in this chain MS-SQL Sybase-Libs PHP 4.0 produces (a) the emalloc Problem
                 (b) the missing Class-Variables in PHP 3 ?

P.S.: The Documentation does not say anything to wether it
      is allowed to define Classes within classes:

Class Foo1 {
  var $one;
...
}

class Main {
  var $two
  var $three
  var $test=new Foo1
...
}

in fact it worked, but is it allowed explicitely ?

Thanx

K. Wegmeyer

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>