How might one detect the first run of a program?
<p>In my web application, users can download a .tar.gz archive containing the app files. However, because the MySQL database won't have been configured then, the user needs to run the install script located in <code>./install</code>.</p>

<p>I "catch" the user upon first run of the app by checking to see if the <code>./install</code> directory exists. If so, the index.php page redirects the user to the install script.</p>

<p>However, I was wondering if there were a more elegant way to "catch" a user upon first-run of a program.</p>

<p>Someone on IRC suggested the web-server create a file <code>.installed</code> upon completion, but because the web server might not have write privileges to the web root directory, I can't rely on that.</p>

<p>How would you go about solving this problem, or is my solution workable?</p>
