Sponsored Content
Top Forums Shell Programming and Scripting remote sybase connection and php error. Post 54666 by lealyz on Friday 20th of August 2004 10:37:24 AM
Old 08-20-2004
remote sybase connection and php error.

Hi all,

I am trying to connect to a remote sybase database server (sitting on windows) from my freebsd apache webserver.
My Webserver has installed;

Apache2.0
PHP 4.3.8
Freetds with ODBC enables ( tsql works but isql doesnt )
unixODBC
syabse-ocsd

When i connect with tsql from command line, i am able to connect to my remote server. When i try to connect with isql i get this:

/usr/local/bin/isql -v my_remote_ip username password
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect

Then i also wrote a php script to connec to the sybase server, my script looks like this:

<?php
echo "hi";
$lnk=sybase_connect('ip_address:5000','username','password') or die
("no luck chuck!");
echo "connected<br>";
sybase_close($lnk);
?>

BUt whenever i try to connect with it, i get this error:

hi
Fatal error: Call to undefined function: sybase_connect() in /htdocs/test/sybase_conn.php on line 3


Now, i got the sybase_ct.so file after i set php --with-sybase-ct=shared, usr/local .
Now in php.ini, i have the following lines:

extension = sybase_ct.so
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20020429/"
sybase.interface_file = "/usr/local/sybase/interfaces"


I read it up somewhere that i need to log in as webserver user: nobody and get connected with isql before it works. I tried that but i got the same error message as i get when i am connected as root:

/usr/local/bin/isql -v my_remote_ip username password
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect

I am really short of ideas, i need help on a way to effect my php connection successfully.

Lealyz.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I need remote connection help

I am very new to all of this. I tcsh into a Unix box at work. I receive "hints" from a guy here at work that is helping me without doing everything for me. I need to use rx display to x connect to a remote host. I then need to tell the machine (unsure if he meant mine or the box I connected... (2 Replies)
Discussion started by: noobie_doo
2 Replies

2. UNIX for Advanced & Expert Users

remote connection

Hi: Can i access my Linux Box from a remote machine, Login and Run a program(eg: netscape) in a particular display number. Assuming i do not have XServer running in my machine Appreciate the help Thanks, Preetham. (5 Replies)
Discussion started by: preetham
5 Replies

3. Windows & DOS: Issues & Discussions

Connect to a Remote Sybase Server Through Script.

Hi all, I am trying to connect to Remote Sybase database Server through shell script. I am operating on WindowsXP, connect to Unix(version SunOS: 5.8) The thing is i dont know how to connect to Sybase Server through my script file? Are there any manual pages which can guide me through the... (2 Replies)
Discussion started by: Aparna_k82
2 Replies

4. Shell Programming and Scripting

Connect to a Remote Sybase Server Through Script

Hi all, I am trying to connect to Remote Sybase database Server through shell script. I am operating on WindowsXP, connect to Unix(version SunOS: 5.8) The thing is i dont know how to connect to Sybase Server through my script file? Are there any manual pages which can guide me through the... (3 Replies)
Discussion started by: Aparna_k82
3 Replies

5. UNIX for Dummies Questions & Answers

ssh_exchange_identification: Connection closed by remote host Connection closed

Hi Everyone, Good day. Scenario: 2 unix servers -- A (SunOS) and B (AIX) I have an ftp script to sftp 30 files from A to B which happen almost instantaneously i.e 30 sftp's happen at the same time. Some of these sftp's fail with the following error: ssh_exchange_identification: Connection... (1 Reply)
Discussion started by: jeevan_fimare
1 Replies

6. UNIX for Dummies Questions & Answers

sybase connection through shell-script

:mad: how do i connect to sybase through shell script written in linux (9 Replies)
Discussion started by: Amitabh
9 Replies

7. Shell Programming and Scripting

Sybase Connection Issue

I am trying this >$ /usr/sybase/bin/isql -UABC -Pdef -SXYZ -b Getting the following error. Help is appreciated (1 Reply)
Discussion started by: pinnacle
1 Replies

8. Solaris

rsync - remote connection error

Hi , We have installed rsync in two Solaris boxes, when we try to sync files from one machine to another.. it is giving the following error. ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory rsync: connection unexpectedly closed (0 bytes received so far) rsync... (1 Reply)
Discussion started by: MVEERA
1 Replies

9. Shell Programming and Scripting

Sybase connection failing through shell script

Hi All, I'm trying to connect to Sybase via shell script. i'm getting the following error. Please let me know where i'm going wrong. Note that i'm not having this issue when connecting via terminal. #!/usr/bin/bash SYBASE=/usr/sybase ISQL=$SYBASE/bin/isql export SYBASE ISQL ... (6 Replies)
Discussion started by: Irishboy24
6 Replies

10. Shell Programming and Scripting

Remote connection

How can we connect to remote computers with a bash script.? (1 Reply)
Discussion started by: diw10
1 Replies
isql(1) 							UnixODBC Reference							   isql(1)

NAME
isql - utility to submit SQL queries to a data source. iusql - Unicode version of isql. SYNOPSIS
isql DSN [UID [PWD]] [options] DESCRIPTION
isql can be used to submit SQL to a data source and to format/output results. It can be used in batch or interactive mode. OPTIONS
DSN Name of the data source you want to connect to. UID Your login to connect the DSN. PWD Your password needed to login to the DSN. -b Batch mode. It will not do any prompting. -dx Delimit columns with x. -x0xXX Delimit columns with XX, where XX is in hex. For example -x0x09 will use a tab. -w Wrap results in an HTML table -c Print column names on first row. This options only has effect in combination with the -d option. -mn Limit column display width to n -v Verbose output. --version This prints the version. EXAMPLES
cat My.sql | isql WebDB MyID MyPWD -w Each line in My.sql must contain exactly 1 SQL command except for the last line which must be blank. AUTHOR
This manual page was written by Kurt Roeckx <kurt@roeckx.be> for the Debian package of unixODBC. UnixODBC Dec 2004 isql(1)
All times are GMT -4. The time now is 05:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy