Community
Showing results for 
Search instead for 
Do you mean 
Reply

ACT Remote PHP Connection

Copper Contributor
Posts: 61
Country: United_Kingdom

ACT Remote PHP Connection

Hi Everyone,

 

I have a very strange question to ask. My company's web site is based on Linux Server which is hosted in a shared domain and it has its own MySQL database and etc. Now my manager has requested me to connect ACT database to this site ( ACT itself is working on a different Windows Server). Is there any short cut for this without changing the domain or switching to a VPS?

 

Thanks

Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: ACT Remote PHP Connection

There are a number of ways to achieve this ... what sort of connection are you looking for?

Can you give some scenarios for the flow of data?
Copper Contributor
Posts: 61
Country: United_Kingdom

Re: ACT Remote PHP Connection

Hi Mike,

 

Thanks for quick reply, I need simple things read/write data on ACT Database I already achieved this on my local machine, I connected my PHP to local ACT MSSQL server but right now what I need is to have Remote Access to our Server Machine. Could you give me the most secure and most simple answer. If I can connect to server and make my codes run I will use the secure way since ACT stores important data for my company.

 

PS. Currently I'm trying this code

 

$serverm="ip,port";
$user="user";
$password="pswd";
$serverName = "Server\ACT7";
$usr="user";
$pwd="pswd";
$db="ACT";
$uid="uid";


$con = mssql_connect($serverm,$user,$password);
if (!$con)
{
die('Could not connect:' . mssql_get_last_message() );
}
else{ echo 'connected';
}

$connectionInfo = array("UID" => $usr, "PWD" => $pwd, "Database" => $db, "APP"=>$uid);
$conn = sqlsrv_connect($serverName, $connectionInfo);
if( $conn )
{

}
else
{
echo "Connection could not be established.\n";
die( print_r( sqlsrv_errors(), true));
}

Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: ACT Remote PHP Connection

DO NOT write directly to the ACT! SQL database, not only is it a breach of the EULA, but will cause issues ...

What data is flowing ... if I understand the goals, I can probably recommend the best way.

You might also have a look at:
http://blog.glcomputing.com.au/2009/07/connecting-to-act-by-sage-data.html
Copper Contributor
Posts: 61
Country: United_Kingdom

Re: ACT Remote PHP Connection

Hi Mike,

 

My goals are to give informtion to our customers such as some information about their bookings also by mean writing data, I mean changing some variables on bookings like when they change their attendees number they don't need to contact with our BDM's I want to create a simple interface on our website so we want to give them a direct but limited access to their booking information. Also this connection will also help me to create some reports for our staff. 

Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: ACT Remote PHP Connection

Well, you can read the SQL database - OLEDB or ODBC
But, to write back, you're best off having a table in your MySQL database and using something like itImport to suck it into ACT!
Copper Contributor
Posts: 61
Country: United_Kingdom

Re: ACT Remote PHP Connection

OK let's say is there anyway for me to connect to our ACT MSSQL server remotley from my machine through PHP codes? You said there are many ways for this, could you recommend one for me ?

 

Thanks

Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: ACT Remote PHP Connection

To read is easy ... to write, you MUST use .Net and the ACT! SDK

You might be able to do it with: http://phalanger.codeplex.com/

But, it much easier to do it the other way ... ie have the .Net code as an ACT! plugin reading and writing to the MySQL
Copper Contributor
Posts: 61
Country: United_Kingdom

Re: ACT Remote PHP Connection

Thanks Mike, I will try this but my real problem is I want a simple connection from my PHP page to our ACT MSSQL any other extra tool will create problems for me since our company's domain is shared and I cannot install programs on that server. Do you think can I use this mssql_connect code on PHP to connect my ACT Database ?

 

Thanks

Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: ACT Remote PHP Connection

Only for read-only ... you can NOT write directly to the ACT! MSSQL database without using .Net and the ACT! SDK

That's why it's much easier to do it from the ACT! side rather than from the web server