Jump to content

Recommended Posts

Hello all,

 

I would like to get some opinions on forking php.

 

I have a form that let users upload pictures.

after the upload the picture is resized

 

the resizing takes some time because the picture gets resized in a big version and a thumbnail version and then saved to the right folder.

 

the problem is that while the picture is resized / saved nothing else works.

 

would that be solved by forking the picture resizing routine ?

 

thanks

anatak

Link to comment
https://forums.phpfreaks.com/topic/177609-forking-php/
Share on other sites

do you mean a cron job that runs every minute ?

I don't think my hosting will be happy with that.

 

Or do you mean a cron job that I trigger from the php upload page ?

If you let php trigger a cron job that runs a php script wouldn't that be resource intensive ?

 

 

 

at this moment the upload works fine now I just want to resize the picture.

Link to comment
https://forums.phpfreaks.com/topic/177609-forking-php/#findComment-936564
Share on other sites

Cron uses very little resources, your host shouldn't care at all.

 

Or do you mean a cron job that I trigger from the php upload page ?

 

That doesn't make much sense.

 

As for forking a php script, you could try executing another php script in the cli background via exec.

 

Why not just use pcntl_fork() ?

Link to comment
https://forums.phpfreaks.com/topic/177609-forking-php/#findComment-936592
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.