You are here: Re: [PHP] exec command fails in php, works in the command line « PHP « IT news, forums, messages
Re: [PHP] exec command fails in php, works in the command line

Posted by ernst on 09/21/05 20:56

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация