If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Other PC Databases > connecting to sage using php on remote ip

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-08, 11:39
MercJones MercJones is offline
Registered User
 
Join Date: Nov 2007
Posts: 6
connecting to sage using php on remote ip

Hi there. I need to be able to connect to my server and access sage records via php.

Ive installed the odbc extension, added it to php.ini and done aptitude install php5-odbc which installed fine, and now phpinfo() shows it as working.

I know for instance you would use code similar to:

<?php

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

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

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

Now I think thats because the dns isnt on the server running the php, so I need for it to connect to sage on a remote IP.

What i read shows you need to edit odbc.ini in /etc yet this is empty!

Any ideas please?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On