473,573 Members | 2,503 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sybase & PHP


I had trouble using FreeTDS with Sybase ASE 12.5.2 DE. I kept getting errors when trying to run a stored
procedure, using the PHP program found at the end of this post.
php: dblib.c:303: buffer_add_row: Assertion `row_size <=
buf->element_size ' failed.
But now having uninstalled FreeTDS, and trying to connect to my databases, I can no longer connect.
PHP Warning: sybase_select_d b(): Sybase: A link to the server could not be established in ...
What do I have to do to connect PHP to Sybase?

I also have downloaded iAnyWhere and installed it, but I don't know if I needed it or not, or if
it can even help.

Very confused. Do I need to re-install FreeTDS or is there a lib already in Sybase?
( Using Sybase ASE 12.5.2 DE )

Thanks in advance!

My last configure command:

../configure \
--with-apache2=../httpd-2.0.53 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-openssl \
--with-mysql \
--with-dbase \
--with-ttf \
--with-curl \
--with-gd \
--with-gnu-ld \
--with-module=so \
--with-zlib \
--with-sqlanywhere=/opt/sybase/SYBSsa9/ \
--with-sybase=/opt/sybase/OCS-12_5 \
Test Program: ( worked fine with SQL but not stored procedures when FreeTDS was installed )


$servername = "my-server-here" ;
$portnumber = "5000" ;
$username = "sa" ;
$password = "" ;
$database = "master" ;

$db = sybase_connect( "$servername:$p ortnumber","$us ername", "$password" );
sybase_select_d b ( "$database" );
$q = sybase_query("s p_server_info", $db);

# $q = sybase_query("$ {database}..sp_ help", $db);
# $q = sybase_query("s elect * from sysobjects", $db);

$syb_num_fields = sybase_num_fiel ds( $q ) ;
$syb_num_rows = sybase_num_rows ( $q ) ;

$row_cnt = 0 ;
$field_cnt = 0 ;

while($row = sybase_fetch_ro w($q))
if ( $row_cnt == 0 )
for ( $f=1; $f<=$syb_num_fi elds;$f++)
$info = sybase_fetch_fi eld($q);
print "[$info->name]";
if ( $field_cnt == $syb_num_fields )
print "\n" ;
$field_cnt = 0 ;
print "\n" ;

++$row_cnt ;
$field_cnt = 0 ;
while(list($k, $v) = each($row))
$datum = NULL ;
$datum = rtrim ( $v ) ;
print "[$datum]" ;
if ( $field_cnt == $syb_num_fields )
print "\n" ;
$field_cnt = 0 ;
sybase_close ( $db ) ;


Jul 17 '05 #1
0 1656

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Josh Close | last post by:
I'm getting these errors almost every time I use sybase. I'm using it with mssql. I build it like so: python setup.py build_ext -D WANT_THREADS -D HAVE_FREETDS -U WANT_BULKCOPY python setup.py install and I'm getting these errors: Traceback (most recent call last): File "./check_mx.py", line 69, in ?
by: Dave Cole | last post by:
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. NOTES: This release contains a number of small bugfixes and patches received from users.
by: Jim Douglas | last post by:
Do they play well together? Anyone using the Sybase .NET provider. Any problems or should I stick with the Sybase OLEDB? Or worse check with the DataDirect folks for their .NET provider for Sybase? If you are using Sybase what are you using? We have issues with the Sybase 12.5 OleDBProvider and Sybase says is "not certified" for .NET. The...
by: Jim Douglas | last post by:
Anyone using the 12.5 .NET provider from Sybase? We are using the 12.5 OleDB and have issues and Sybase is recommending that we move up to the .NET provider. If you are using the .NET provider from Sybase what do you think about it? Thanks! --
by: eight02645999 | last post by:
hi i am writing a CGI to process some database transactions using the Sybase module. so in my CGI script, i have: .... import Sybase import cgitb; cgitb.enable(display=1 , logdir="/tmp/weblog.txt") .... ....
by: db2sysc | last post by:
All, We have listed out the INBUILT Function differences between Sybase and DB2. Kindly provide your feedback or corrections and for CHANGES - DO WE NEED TO CODE our own UDFs?
by: Alex Murphy | last post by:
As title, Thanks
by: =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post by:
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. The module is available here: http://downloads.sourceforge.net/python-sybase/python-sybase-0.38pre2.tar.gz
by: =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post by:
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. The module is available here: http://downloads.sourceforge.net/python-sybase/python-sybase-0.39.tar.gz
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.