Hello everyone,
I'm running my little web server as a hobby project: http://neo.dyn-o-saur.com. Almost all coding is done my myself and right now I'm working on an admin panel to streamline some tasks.
What I want is to:
1) upload a file,
2) run a shell script on the file,
3) and then import the data in the file into a mysql database.
If I ssh into my server and run the scripts from a command line everything works fine. With my own webinterface 1) and 3) work, but 2) not. The snippet in script reads as follows:
<?php
$wswin2mysql=system('./convertWSwin.sed upload/data.txt > upload/data2.txt');
$data2data=system('mv upload/data2.txt upload/data.txt');
echo "Data is converted";
?>
Nothing happens when I run this. I checked the permissions of the uploaded file and they are 644 with owner www-data. I also used exec() instead of system(), but to no avail. I also played around with different quotes, and other scripts, but still no dice. Simple things like system('ls') do work, but why not my own inventions? Uptill now I've solved all of my problems with web searches, but this one has kept me busy for 6 days already. Can an expert give some hints? Thank you.
Hans