Bluehost.com Web Hosting $6.95

running a very long process from php

This is a discussion on running a very long process from php within the PHP General forums, part of the PHP Programming Forums category; Hi. For my CMS, i need to do imports of photos and videos. For uploading large files i have a ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-09-2008
Rene Veerman
 
Posts: n/a
Default running a very long process from php

Hi.

For my CMS, i need to do imports of photos and videos.
For uploading large files i have a Java FTP applet with automated resume, so
no problems there.

But: unzipping them and importing them might take a long time if it's a
large batch (1000s of pictures/videos).

Currently i split this up by importing only 1 item per php call from the
browser, to get around the hoster's limitation of 30s php timeout.
But since my hoster wont support video-importing (ffmpeg) anyhow, i have
decided to do some tasks from my home server over which i have total
control.

I'd also like to get rid of the requirement to have a browser open during
the import process.
Not only is it cumbersome for the user, if the internet connection fails
then the import is interrupted too.

I'm considering to (after ftp has completed) call a php script on my
homeserver that calls scripts on the hoster.
Scripts on the hoster would write status-info to a file, which is then read
from the originating browser.
And if a video-file is encountered, my homeserver downloads it, then ffmpegs
the meta-info and thumbnails, uploads those results to the hoster, calls a
'receiver' script on the hoster to put the thumbnails and meta-info in the
database..

Good idea?
Or do you have a better one? :)

Reply With Quote
  #2 (permalink)  
Old 09-09-2008
Nathan Rixham
 
Posts: n/a
Default Re: running a very long process from php

Rene Veerman wrote:
> Hi.
>
> For my CMS, i need to do imports of photos and videos.
> For uploading large files i have a Java FTP applet with automated resume, so
> no problems there.
>
> But: unzipping them and importing them might take a long time if it's a
> large batch (1000s of pictures/videos).
>
> Currently i split this up by importing only 1 item per php call from the
> browser, to get around the hoster's limitation of 30s php timeout.
> But since my hoster wont support video-importing (ffmpeg) anyhow, i have
> decided to do some tasks from my home server over which i have total
> control.
>
> I'd also like to get rid of the requirement to have a browser open during
> the import process.
> Not only is it cumbersome for the user, if the internet connection fails
> then the import is interrupted too.
>
> I'm considering to (after ftp has completed) call a php script on my
> homeserver that calls scripts on the hoster.
> Scripts on the hoster would write status-info to a file, which is then read
> from the originating browser.
> And if a video-file is encountered, my homeserver downloads it, then ffmpegs
> the meta-info and thumbnails, uploads those results to the hoster, calls a
> 'receiver' script on the hoster to put the thumbnails and meta-info in the
> database..
>
> Good idea?
> Or do you have a better one? :)
>

sounds like it's time to get your own dedicated server to be honest; in
the time it takes you to do that semi-manual process I'm sure you could
easily do a couple of jobs to fund the server if needs be;

Many Regards

Nathan
Reply With Quote
  #3 (permalink)  
Old 09-09-2008
Per Jessen
 
Posts: n/a
Default Re: [PHP] Re: running a very long process from php

Nathan Rixham wrote:

> sounds like it's time to get your own dedicated server to be honest;


Yeah, that was my first thought too.

> in the time it takes you to do that semi-manual process I'm sure you
> could easily do a couple of jobs to fund the server if needs be;


They're not even very expensive - how about EUR50/month for a dual-core
AMD with 2Gb RAM, dual 400GB SATA disks and unlimited bandwidth.


/Per Jessen, Zürich

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:19 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0