| | | Forum Newbie
       
Group: Forum Members Last Login: 10/4/2005 6:02:55 PM Posts: 6, Visits: 22 |
| Hi, Several years ago I developed a PHP/MYSQL telemarketing application for a customer that uses the PHP function 'exec' to invoke import.exe. For some reason this stopped working with the 5.1 update. I did enable the extended search for the data folders. As a band-aid I am using the 5.0 update.exe and rebuilding the index after I import a file but I really have to figure out how to get it to work with the new .net import file. I trusted every .net assembly in the winpoint directory with no luck. I don't know the differences between the older versions and the new one or how IIS, or Server 2003 handles the files differently. Here is the code I use: exec("C:\winpoint\import.exe $tmpfname cb.imp d:\point_files\PNTDATA\prospect /f:$lead_id"); This has worked for over 3 years. I can see the cmd processor run but the file is never created. Any ideas/thoughts/suggestions?Mike |
| | | | 
Sepal

Group: Moderators Last Login: Yesterday @ 9:52:28 AM Posts: 1,183, Visits: 9,258 |
| | I am not sure at what level did you set the .net trust? for internet/intranet or for all code? at machine or enterprise? the other thing you could try ( didn't see an error message in your post so this is pulling straws) take all of the dll's in the winpoint directory and put the in. windows/system32 It sucks but IIS is weird about running code and dependancies finding each other. (they are all in the same directory it should not matter) We had luck fixing an issue with this method.
Disclaimer: This post carries no explicit or implied warranty. Nor is there any guarantee that the information contained in this post is accurate. It is offered in the hopes of helping others, but you use it at your own risk. The author will not be liable for any damages that occur as a result of using this post. |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 10/4/2005 6:02:55 PM Posts: 6, Visits: 22 |
| | I had seen a post regarding the .net security so I followed the suggestion in the post. It imported the strong key from import.exe to: >Runtime Security Policy>Machine>Code Groups>local_intranet. I then used the .net wizard "Trust Assembly" to add the assemblies I could find in the winpoint folder, Import.exe, AesLib.dll, and PDD.dll. I just tried to add all the .dll files to system32 and am having the same results. It doesn't error, it just does nothing. I can see the process fly through the Task Manager but the point file is never created. |
| | | | 
Sepal

Group: Moderators Last Login: Yesterday @ 9:52:28 AM Posts: 1,183, Visits: 9,258 |
| I don't quite understand "$tmpfname cb.imp" why is there a space between them?
Disclaimer: This post carries no explicit or implied warranty. Nor is there any guarantee that the information contained in this post is accurate. It is offered in the hopes of helping others, but you use it at your own risk. The author will not be liable for any damages that occur as a result of using this post. |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 10/4/2005 6:02:55 PM Posts: 6, Visits: 22 |
| | $tmpfname is a variable created by my PHP script. cb.imp is the name of the import template I'm using. Please remember that this has worked without issue for over 3 years. The only change was the new import.exe file. When I substitute it for the old import.exe is still works, it just doesn't rebuild the index file. |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 10/4/2005 6:02:55 PM Posts: 6, Visits: 22 |
| | I should elaborate on the $tmpfname. It is a CSV file created by my script containing the field ID's and matching data to be imported. An example of what is in the file would be: "ID9900"|"ID6200"|"ID6201" "461734"|"08-16-05"|"04:30:48" |
| | | | 
Sepal

Group: Moderators Last Login: Yesterday @ 9:52:28 AM Posts: 1,183, Visits: 9,258 |
| Sorry, i don't work with imports parameters enough. I didn't get file source template source. I would try being specific with these paths, ie c:\winpoint\cb.imp . It is possible that the new version is losing the context of the import.exe working directory.
Disclaimer: This post carries no explicit or implied warranty. Nor is there any guarantee that the information contained in this post is accurate. It is offered in the hopes of helping others, but you use it at your own risk. The author will not be liable for any damages that occur as a result of using this post. |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 11/13/2006 5:31:37 PM Posts: 9, Visits: 49 |
| SYSGURU, If you have spaces in your command line (especially in the file name), you will need to have literal quotes wrapped around the arguments, otherwise the command line parser will think that after the space it's at the beginning of the next argument.  Good Luck |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 10/4/2005 6:02:55 PM Posts: 6, Visits: 22 |
| | Thank you both for your assistance on this. It has been frustrating to say the least. I have tried every combination thinkable as far as syntax goes. I also double checked the value of the data stored in the variable $tmpfname and confirmed that it is using a complete path as well. Single quotes, double quotes, with and without variables. It doesn't seem to matter, I cant get this new import to work. Interesting that If I run the same command as above from a Command Prompt it creates the point file but does not update the index. I don't know why the .net file acts differently when run from PHP than it does run from the Command Prompt either. Does the .Net file handle arguments differently? Perhaps knowing what the old import file was written with will help? |
| | | | |
|