Ask the Expert

Securing a database application

I would like to write a database application for a customer. The interface is using PHP to access the database. Is it possible to secure the application so that it cannot be copied and used on another machine? Can you give me an example of how a program can check the registry to check for a key value?

    Requires Free Membership to View

The usual way to do this is to put your PHP or other CGI programs in a directory that is protected from access from the Web server directly and will only be accessed by the CGI itself. The specifics of how you do this depend on which operating system and Web server you have.

Microsoft has a number of articles on how to do this. Take a look at:
for reading and
for writing.

Several of these have source code. Admittedly, it's in Visual FoxPro, but I found them intelligible, and I've never used FoxPro, myself.

This was first published in October 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: