07-29-2010 07:10 AM - edited 07-29-2010 07:12 AM
Thanks for posting your lead Matthew.
However, I just found another way some minutes ago, wich suits very well.
In fact, I wrote the necessary code (CreateHistory(...) and so on) in a C# Console Application Project. I made it so it can accept some string arguments, like ACT Database path/user/pass, attachment path, contact GUID...
After generating it and putting the command.exe file in the appropriate folder, I just called the PHP exec() function, which launches the command.exe file and passes all necessary arguments.
This executable file uses ACT Framework dll ressources.
- First, it creates a new ActFramework and log on, under an administrative account.
- Second, it seeks the concerned contact & opportunity in ACT with their GUID passed in parameter (calls the GetContactsByID method).
- Third, it calls the famous CreateHistory method and try to insert the history + a PDF attachment (inside a try/catch block).
- Finally, I made it append the result on a txt log, whatever it is, so I can quickly see if the insertion succeeded or failed.
So I think the problem effectively came from some server permissions things... In my case the server doesn't call the methods it-self, it delegates the job to a "local" executable, as if a local application called the methods. So no more problems with permission to access the right folder...
I'm not sure if it is the way it goes but anyway that solution worked for me.
Thanks again to the support guys, who took the time to help !