0

I have a MySQL database with a user frontend built using PHP. The database and PHP are on Linux. Currently users can upload files via a web front end. The PHP then extracts the information from the file and inserts it into the MySQL database. I now want to purchase some software that will analyse the uploaded file contents. Ideally I would like the following to happen:

  1. Users upload file
  2. PHP creates input file
  3. PHP executes the analysis software and submits the prepared input file
  4. Analysis software runs and generates output file
  5. PHP takes the results of the output file and inserts it into database (this part will possibly be run as a daily cron job)

The problem is that the software will only run on Windows and not Linux. I also will not have access to the program's source code. I've been told by the vendors of the software that their program can be started programmatically by any script that can call an exe file on the Windows system. Is there anyway that I can automate my system so that the PHP script on Linux can trigger the analysis software?

4
  • You could try Wine under Linux. See winehq.org Commented Apr 2, 2014 at 9:38
  • The program runs on Windows. Your server runs Linux. It's obvious that your server cannot run the program itself directly. Commented Apr 2, 2014 at 9:38
  • If the program runs under wine, then you can issue a command that starts the program in a wine env, but that's a hacky fix... just try to find some linux software that does whatever it is you need to do (oh, and post this type of question on another site, like Unix&linux exchange or something) Commented Apr 2, 2014 at 9:39
  • Unfortunately it is very specialised software and they haven't yet developed it for Linux Commented Apr 2, 2014 at 10:02

1 Answer 1

1

In my opinion you could try to follow these steps:

  1. Do a cron job for uploading the user uploaded file to your Windows server where you can process the file.
  2. After the processing is done let your windows server upload it back to your Linux server where in a cron job you can insert data into your data.

Its an ugly hack still it might work!

Sign up to request clarification or add additional context in comments.

2 Comments

Since he already is using PHP, a better choice (compare to upload/download) will be setting up a web service at Windows server and passing data through XML. Of course this will only work IF he has a windows server in the first place.
We do have a Windows server. I will consider this along with the cron job fix idea. Or perhaps I could use a macro to run the software. And then use a cron job to copy the files to Linux. It's just a shame that I can't run the software in a Linux environment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.