Jump to content

regent

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

regent's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Script termination releases the lock.
  2. Thanks for all the help. I was finally able to make it work with flock(). So no need to mess around with temporary files and tracking timestamps.
  3. ps? do you mean from command line? I'm on IIS. ps is not supported
  4. I think the timestamp approach is fine, but I've got to believe there should be some way to determine if a script is currently running without having to resort to creating temporary files and checking timestamps and such. Under Unix and using Perl, it was a simple command to see if a particular script is running or not. Is there something similar in PHP? Even with a perfectly coded script, early termination is possible. It's not always an issue with the code that can stop a script from running.
  5. I tried the singleton approach, and I can't see how it can be used to prevent multiple instances of a script from running. Any other ideas?
  6. For the temp file solution, what if the script terminates prematurely? Then the temp file wouldn't be deleted, so the script is now blocked from ever running again. I'll try out the singleton approach. thanks.
  7. Under Windows IIS, I have a php script which is setup as a scheduled task to run every 5 minutes. The problem is that it is possible for the script to take longer than 5 minutes to complete, so I need a way to check within the script if an instance of the script is already running and exit if so. How would I do this? I've tried using flock() so that the next instance can exit if the lock fails, but all this does is hang the instance until the lock is obtained. Since the script hangs, it never makes it to the exit statement. Thanks for any help.
  8. I'm working on a project where I need to change the name of a file that's being uploaded. For example, original filename test.doc will become something like new-test-12345.doc when it gets saved on the server. Also, a db entry is made that records the original filename and the new filename. My problem is that these files should also be downloadable, and when a user downloads the file, my client wants the filename to be the original filename NOT the new filename that is saved on the server. Is there any way to do this? Thanks for any help.
  9. Is there any way to track the date/time when a file was downloaded from your server? I have made a file management interface for a client, with Download buttons next to each file that was uploaded. The client wants to track when each file is downloaded. Is this possible? Thanks.
  10. How do I save the image generated by baachart?
  11. Sorry, I meant to say that we are at version 5.0, so we do not meet the required 5.1 version. The JpGraph 1.x version states it will not work on PHP 5.
  12. I need an alternative to JpGraph. I can't use JpGraph because it requires at least PHP version 5.2, and we are at 5.1 and unwilling to upgrade. I found baachart, and it looks nice. Anybody have any other alternatives that are free? By the way, the charting needs to create images (no Flash), and these images will be embedded in pdfs. Does anyone know what PHP version is required to run baachart? Thanks for any help.
  13. Hello, I use PDFLib to create pdfs. Is there any way to embed flash into the pdf? I want to be able to embed some charts built with PHP/SWF Charts into my pdfs. Thanks.
  14. Hello all. I've been using PEAR's Spreadsheet_Excel_Writer for generating spreadsheets, and everything works fine, but there is the limitation that the only images you can insert have to be bitmaps. This tends to make the filesizes of my spreadsheets enormous! So is there another excel writer that will allow the insertion of jpgs? Thanks for any help.
  15. I have a problem with one of my scripts. Depending on the amount of input, the script can take up to 3 minutes to run, but by then the browser has already timed out. I've tried: set_time_limit(0); ini_set("memory_limit","120M"); at the beginning of the script, and they didn't help at all. Also tried echoing something in my foreach loop, but that didn't help either. Any foolproof way to prevent browser timeout? Thanks.
×
×
  • 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.