Jump to content

Recommended Posts

Hi,

 

quick question: are exec() commands vulnerable to timeouts?

 

I'm going to use it to run a mysqldump with a $date command so that it doesn't overwrite (among other things). Then I'm going to make a cron to run it every 24 hours.

 

I tried to append a date to the file using cron jobs and cPanel but it wasn't working...lol.

 

So yeah, my question is if I use exec(), can the dump time out and leave me with a broken backup?

Link to comment
https://forums.phpfreaks.com/topic/149189-exec-question/
Share on other sites

Hope this help (background won't be affect by timeouts)

 

Note: If a program is started with this function' date=' in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends.[/quote']
Link to comment
https://forums.phpfreaks.com/topic/149189-exec-question/#findComment-783435
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.