Jump to content

darcyf1.com

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by darcyf1.com

  1. What order do you have your functions in? Make sure you have: { //do update database here } { //retrieve 'word' from database here } That way you'll be putting the new word in, before getting that new word out.
  2. I spent another couple of hours looking around for a solution to this, but none of the suggested 'solutions' have any affect, really frustrating!
  3. But how would I go about doing that? I can run the command manually, but I can't sit there all day waiting for requests to come in, and then I assemble the zip file manually. I'm all out of ideas :S
  4. Hoping this doesn't disappear of the first page I would be really grateful if someone can solve this problem that I have spent way too long thinking about!
  5. I have searched everywhere and asked quite a few people and got no where. I have a script running that gets a certain set of files (info retrieved from mysql database) and then executes a shell command that zips them all into a zip file for easy download. THE PROBLEM! Sometimes the collection of files (videos in this case) can be quite large. Running the shell command to zip such large files can take up to 10mins for 2GB and runs successfully. [i am not looking at collections quite that big for my script] When I try to call this command during the php, it runs for a little more than 30 seconds, and if it hasn't finished by then, it fails and I am returned an 'Internal Error Page'. If the command does finish, then the script works perfectly well. I have tried things like playing around with; set_time_limit, max_execution_time, max_input_time etc. I do not have direct access to php.ini (as I am hosting with a company). Any suggestions would be greatly appreciated!! <?php set_time_limit(0); $files = ""; $count = 0; $nameofzip = "$race"; $nameofzip .= "$season"; $nameofzip .= ".darcyf1.zip"; $con = mysql_connect("$address","$user","$password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("$table_name", $con); $sql = "SELECT * FROM clips WHERE (Cat='$series') AND (Season='$season') AND (Race='$race') AND Full IS NULL"; $result = mysql_query($sql); if($row = mysql_fetch_array($result)){ do { $files .= "{$row["Link"]} "; $count = $count + 1; } while ($row = mysql_fetch_array($result)); } mysql_free_result($result); shell_exec("zip $nameofzip $files;"); echo "<br /><strong>$count files zipped - <a href='../go.php?c=$series&f=$nameofzip'>Download</a></strong>"; } ?> I repeat, the code works perfectly if the command doesn't take too long! Thanks, Darcy!
×
×
  • 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.