ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 4 QNX machines on my shop floor that are used to run a machine. This machine collects the data to one file. The Employees use windows xp sp2 to access the machine via FTP script. There a about 10 users and the same amount of PC in this solution.
I have be asked to removed the QNX machines from the corporate network. So I created a Vlan that only has access to a few machines on the corporate network and moved the QNX machines to that new location.
On the corporate network I have a Slackware Linux server running apache that communicates to the 17 other QNX machines and then relays that information back to the Windows machines. This has worked great for me so far.
I would like to use php or pearl to execute a script on the web server that would connect to the QNX server via FTP get a file and then automatically run a script on the xp machine that would ftp the file to the windows machine.
The problem that I have is I am not a programmer I would like to know if there is anyone that could help me accomplish this task. Any help or direction would be greatly appreciated.
Well, to avoid the issue of synchronizing scripts on eg webserver & XP, use one Perl prog on webserver to get file from QNX, then send to XP box(es).
Obviously you'll need ftp server for incoming on XP boxes.
Might be easier to have the XP machine request the information from the web server. The web server then accesses the QNX machine to get the information, and forwards it to the XP machine like any other web download.
Eliminates the requirement to deploy an FTP server on the XP machine. In fact, eliminates any requirement to do anything to the XP machine, other than write the VBA script to have IE access the web server.
Guys these are great ways of getting this accomplished. And two great tools to add to my toolbox. I like the pearl script because it looks clean and easy to use. However I like the VBA solution because it does not require me to open FTP services on the XP machines which would not go over well with our network security people.
So if I can I would like to use the pearl script to get the file via FTP from qnx. I would then want to use vba to allow the user to download the file from the web server like a normal download. Is this possible?
Do you have any examples of the code that I would need to write or a location to find the code?
Jim
I am not looking for a complete solution. I want to do this myself I am just not a programmer and I need to make sure that my expectations are set correctly before I start working on this project. With that said I am enjoying reading about the information that has been posted and learning new things.
I am having a few problems with the perl script that gets the file from the QNX server. I will continue to work on it and when I feel like I have hit a wall I will come back and post again.
Thank you for all the help
Mike
As i said, if you go that route, you have the issue of syncing the 2 scripts ie ideally you'd want the VBA script to only run if the file is avail from the server. What is it going to do to warn the user if it finds nothing?
Don't get me wrong you can still do that.
In fact if the middle box is a webserver you could write a VBA script to call a cgi script on the webserver, which is the ftp get from the QNX box.
Come back if you have probs with the Perl. As you said, its clean/short. Probs with ftp usually resolve to permissions/firewalls.
It's really interesting that someones using QNX - I almost forgot about it, I used a looooong time ago. How is it doing these days?
(btw can you check whether wget or curl will help you? whyd you have to use perl?)
Well we are still using QNX 4.2 so I am not sure about the new stuff. I installed and was running like 6.2 for a bit and it seemed to be better, howeve there is still not a lot of driver support. I decided to use NFS to mount the directory and just make the web page do a regular download thank you all for all the help I am still going to work through a few of the solutions that where suggested in the lab so that I can build my skills.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.