Connecting to remote server/sage using php?

This is a discussion on "Connecting to remote server/sage using php?" within the PHP Forum section. This forum, and the thread "Connecting to remote server/sage using php? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 19th, 2008, 09:35
New Member
Join Date: Mar 2008
Location: UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Connecting to remote server/sage using php?

Hi there.

Just wondering if any of you have any suggestions/experience on connecting to sage using php.

I know you need the odbc extension, which ive added to php.ini, and then ive done sudo aptitude install php5-odbc, which phpinfo() has picked up, but im trying to connect and get:

SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect

so I dont know if I need another driver or whatever?

Also, i read you may need to edit odbc.ini in /etc/ this exists but is empty.

The problem gets worse becuase you normally use code similar to:

<?php
$rConn = odbc_connect("SageLine50V10", "user", "pass");

$rRes = odbc_tables($rConn);

odbc_result_all($rRes);
odbc_close($rConn);
?>

but we want to connect to a remote IP, instead of one on the same server running php.

Any ideas please?

Cheers
Reply With Quote

  #2 (permalink)  
Old Mar 19th, 2008, 12:14
Reputable Member
Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Connecting to remote server/sage using php?

Did you add the data source using the instructions found at http://www.w3schools.com/php/php_db_odbc.asp ?
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
Reply With Quote
  #3 (permalink)  
Old Mar 19th, 2008, 12:44
New Member
Join Date: Mar 2008
Location: UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Connecting to remote server/sage using php?

Hi there. Yeah the datasource was already available and working.

Cheers
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble connecting to Sql Server 2005 Management Studio Express? annawilsonz Databases 0 Sep 14th, 2007 06:30
asp.net installation on remote server dave2006 ASP.NET Forum 1 Feb 16th, 2007 18:46
connecting to database franknu PHP Forum 4 Jul 23rd, 2006 08:39
connecting to CSV file madhuri.t Classic ASP 0 Jul 10th, 2006 13:50
connecting to web-email via pop using php... Billydakid PHP Forum 7 Feb 12th, 2004 08:42


All times are GMT. The time now is 20:44.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43