php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4673 unable to access tables
Submitted: 2000-05-29 17:35 UTC Modified: 2000-06-05 19:38 UTC
From: wegmeyer at talknet dot de Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.0.0 Release OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wegmeyer at talknet dot de
New email:
PHP Version: OS:

 

 [2000-05-29 17:35 UTC] wegmeyer at talknet dot de
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-05 19:38 UTC] fmk at cvs dot php dot net
Sybase modules can not be used to access MS SQL server 7.0 databases. Microsoft has changed the protocol to be incompatible with SQL server 6.5 and Sybase.

I'm working on getting the mssql_*() functions to work with FreeTDS. It's currently available in php3.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC