Jump to content

Connecting to remote server/sage using php?


MercJones

Recommended Posts

Hi there.

 

Unsure this is the correct place, but it was this or another database one and I wasnt sure. anyway..

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.