Click to See Complete Forum and Search --> : File path


wpahiker
08-27-2006, 04:58 PM
I have a file located in the /kta/files directory and a script in the /kta/cgi-bin directory. On my form I refer to the script as /kta/cgi-bin/AlertShow.cgi, and in the script I refer to the file as:

dbmopen (%ALERTS, "/kta/files/AlertDB", 0644)

My script can't seem to find the file (no alerts are displayed). When I had the file in the cgi-bin directory and referred to the file as "AlertDB" everything worked fine. All I did was move the file and change the path on the dbmopen, any idea what the problem is?

Thanks,

Mike

CyCo
08-27-2006, 06:51 PM
AlertDB.pag and AlertDB.dir must reside in the same folder. Did you move one and not the other?

wpahiker
08-27-2006, 08:19 PM
Nope, both are in the same directory, both have the same permissions (644).

CyCo
08-27-2006, 08:55 PM
OK, how about this:

"../kta/files/AlertDB"

wpahiker
08-27-2006, 09:09 PM
Bingo! I didn't try it because starting with a / should start me at the top of the directory pool. Odd. Thanks.

CyCo
08-27-2006, 09:19 PM
You're welcome.