I have a script that uses the exec() function to create a zipfile from a list of products when a customer orders. Trouble is under certain conditions it doesn't seem to work. It creates part of the zipfile, then it dumps the rest into another file named ziXXXXXX where XXXXXX is a random string. I can reproduce this, but when I echo out the exec() statement then copy the command and paste it into a command line it works. So anyone have any clue why something like:
zip -j /usr/www/path/20011214/Ro/afproducts.zip /usr/www/path/mp3/file1 /usr/www/path/mp3/file2 /usr/www/path/mp3/file3 /usr/www/path/mp3/file4 /usr/www/path/mp3/file5 /usr/www/path/mp3/file6
works from a command line but not within the exec() function. Also this works fine for most cases. When the file list is sufficiently large is when it chokes.