
In short, I need a solution which will do two things:ġ. With that in mind, I am interested in finding a way to automatically watch the PHP binary that is located at the above path, and to automatically relaunch the PHP binary in fcgi mode by using the above two Terminal commands, without having to keep “Activity Monitor” and the Terminal open all the time. “” is an old PERL script released by Zeus Technology to startup remote FastCGI processes with their Zeus Web Server.Īs you can imagine, it is a hassle to have to keep an eye on PHP, and reboot it manually every time that it crashes, and I do have to sleep. Whenever I see PHP disappear from “Activity Monitor”, I follow the instructions provided by 4D - the makers of WebSTAR - and type the following in the Terminal to restart PHP: I don’t know if it is a result of so many search bots hitting the site, or people who are maliciously attacking the site, or what, but the constant PHP crashing is annoying, and makes the site unreliable.Ĭurrently, the way I have dealt with the PHP crashing problem is by keeping “Activity Monitor” open on my desktop, as well as the Terminal. The problem is that PHP crashes several times throughout the day. This is a self-contained PHP package that I downloaded from the Zend website. Applications/PHP5/bin/this is where the actual php binary is located While Tiger has PHP 4.4.9, I am using a self-contained version of PHP 5.2.0 which is installed in: One of the websites that I operate requires using PHP and a mySQL database. I am running a WebSTAR server on an old Macintosh G4 500 MHz DP mini-tower running Tiger 10.4.11. That will create an OSX application that can be double-clicked to launch, can be put into your Dock, etc, and can be generally used just the same as any other OSX application.

Just save it out of the AppleScript Editor, being sure to select the “Application” choice for the “Format” on the drop-down menu in the “Save” dialog box. I have found that wrapping an Unix command or Unix shell script invocation command (the name of the script) in an AppleScript is a great–and quick–way to turn any shell script or Unix command into an OSX application. Over time, the above link might fail because of “link rot.” If that happens, I suggest searching Apple’s Developer website on “tn2065” (without the quotes). It should be REQUIRED SKIMMING for anyone who uses the Do Shell Script command:

in Do Shell Script.įailing the above, I hope that this “application note” for the Do Shell Script command in AppleScript will get you pointed in the right direction. O Using different I/O redirection in Terminal vs. O Using a different starting directory in Terminal vs. O Using a different shell in Terminal vs. Just off the top of my head, here are three possibilities for why your AppleScript script that uses the “Do Shell Script” AppleScript command isn’t working:
