[thelist] system background process php

Bob Meetin bobm at dottedi.biz
Tue Apr 27 22:50:25 CDT 2010


I have a script that use convert to resize a file into several various 
sizes, works fine, but I think of the number of resizes it is taking so 
long that it causes mysql to time out.  I see errors like: Warning: 
MySQL server has gone away

The relevant code looks like:

<?php
system("convert  $file -resize 400 '$newfile'");
...
...
?>

I know you can run PHP in the background, but how would I tell it to run 
a system command in a php script in the background. 

And as well fix the timeout.  Anything to do with may_packets_allowed?

-bob





More information about the thelist mailing list