in reply to Re: dbmopen does not work
in thread dbmopen does not work

Thanks a lot for telling me about CGI::Carp. It really helped. But here is the error message:
No such file or directory at /blah/blah/blah/cgi-bin/configure_counter +.pl line 54.
I think that dbmopen is ougth to create the file... Is that wrong?
param is a hash, but I think that you do not need to put the % at the beginning. Anyway, I tried it, still the same message.

I need to finish this in a hurry, so I cannot user tie now, but next time I will.

Thanks a lot for your help, Sinan

Replies are listed 'Best First'.
Re: Re: Re: dbmopen does not work
by Fastolfe (Vicar) on Nov 19, 2000 at 23:02 UTC
    Does your script have permissions to write to that directory? Most web configurations set themselves up so that they are restricted in what they can do/write. I believe dbmopen gives you a "No such file or directory" error instead of "Permission denied" if it simply cannot create the file due to a problem of this nature.

    Check your ownerships and permissions of the directory you're attempting to write to. You may have to create a new directory for CGI data files in such a way that the user the web server is running as can write to it.

    That, or use /tmp.

      I am on my own server, the location for the file is:
      /data/

      I have created the directory myself and its permissions are 755. So it cannot be a problem of permissions.

      Thanks a lot,
      Sinan
        On the server who are you, and who does the webserver run as?

        The fact that you set the permissions to 755 means that anyone can read or execute in that directory, but only if they are running as you can they write. I suspect that the webserver is not running as you.

        Another basic sanity thing to check, put the name of the dbm file into a variable and include the contents of the variable in the debugging statement. I have spent too much time in the past trying to track down why X was not being created when in fact it was trying to create Y...