Re: exec command fails in php, works in the command line

From: Date: Wed, 21 Sep 2005 17:56:47 +0000
Subject: Re: exec command fails in php, works in the command line
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-222894@lists.php.net to get a copy of this message
php places uploaded files in the /tmp directory with a unique name, and when I copy them to my directory, I also guarantee a unique name for them. I have verified that this is all working. I've patched this with a cron job that runs every minute, but it really should happen in php, so that the user can get immediate feedback on how the thumbnail looks or how the mp3 file sounds. On Wed, 21 Sep 2005, rouvas wrote:
I am assuming that you get hold of the file through uploading it, correct? So, when it fails maybe another upload (i.e. script invocation) is happening and the previous file gets lost/corrupted/whatever. Try to move the file to another dir (maybe /tmp) with a random name and see what happens. Anyway, I think that this kind of thing should really be delegated to a cronjob. -Stathis On Wednesday 21 September 2005 20:45, ernst@newdisorder.com wrote:
Yes, but that's been done. Since these are shared servers, on one I am logged in as the user the web server is running as, on the other I can't su to nobody, but were there permissions errors, I would have been able to capture them. If permissions caused this, it would fail every time, since I'm always writing to the same directory. Instead it only fails some of the time. On Wed, 21 Sep 2005, Rasmus Lerdorf wrote:
ernst@newdisorder.com wrote:
You're telling me. That's why I think php or apache kills it.
I didn't really follow this, but typically you can debug exec problems from the command line by switching to the web server user id and running the exact same command. -Rasmus
New Disorder Records - ten years of something: Coming soon, new Power Struggle CD. * Free Email with 5 megs, no ads * Internet Radio Station - upload your music, we'll put it in rotation * 100's of CDs for sale * videos, message board, byofl http://www.newdisorder.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
New Disorder Records - ten years of something: Coming soon, new Power Struggle CD. * Free Email with 5 megs, no ads * Internet Radio Station - upload your music, we'll put it in rotation * 100's of CDs for sale * videos, message board, byofl http://www.newdisorder.com

« previous php.general (#222894) next »