in reply to I can't connect to DBM Databases

tie(%mail, "SDBM_File", "maillist", O_CREAT|O_RDWR, 0666) or die "Error opening maillist. $!, stopped";
Do you know where in the file system you are letting the web-server user open/create the file 'maillist'? Make sure that the location is writable, and the path to it is executable for this user.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: I can't connect to DBM Databases
by fromjp (Initiate) on Oct 17, 2007 at 00:24 UTC
    >Do you know where in the file system you are letting the web-server user open/create the file 'maillist'? Make sure that the location is writable, and the path to it is executable for this user. --shmem


    This is the input form of the starting html page(I changed the server name and my folder name here). I think all the created files should be stored into cgi-bin/chap09. I tested and tested, but I could not create files into cgi-bin/chap09.
    <!band.html> <HTML> <HEAD><TITLE>Jeffrey Sikes Band</TITLE></HEAD> <BODY BGCOLOR=silver> <H1><IMG SRC="band.gif" ALIGN=middle HSPACE=5>The Jeffrey Sikes Band</ +H1> <FORM ACTION="https://(servername)/(myfolder)/cgi-bin/chap09/band.cgi" + METHOD=POST> <FONT SIZE=4> We play the blues like you have never heard before. Sign up on our mailing list to receive a free monthly newsletter that tells you when and where we will be playing during the month. <P>Name: <INPUT TYPE=text NAME=Name>&nbsp;&nbsp; E-mail address: <INPUT TYPE=text NAME=Email></P> <INPUT TYPE=submit Name=Button VALUE="Put Me On Your Mailing List"> <INPUT TYPE=submit Name=Button VALUE="Remove Me From Your Mailing List +"> </FONT></FORM></BODY></HTML>
      Don't store data underneath cgi-bin. Use an absolute path outside cgi-bin (e.g. /var/www/data) and change the ownership of that directory to the apache user.

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re^2: I can't connect to DBM Databases
by Anonymous Monk on Oct 21, 2007 at 23:23 UTC
    >Do you know where in the file system you are letting the web-server user open/create the file 'maillist'? Make sure that the location is writable, and the path to it is executable for this user.

    I know the path and the folder the databases are saved. I tested a similar program (c09ex5.cgi).
    * I gave permission 755 for perl -c c09ex5.cgi.
    * This time, I successfully created two database files, c09ex5.dir and c09ex5.pag.
    * The permissions for them were default 644. I didn't change the permissions for the created DB files.
    * This program still does not run on the Web.
    * I also tried to give 777 permission to the folder chap09. This folder contains c09ex5.cgi, c09ex5.pag, and c09ex5.dir.

    What else I should do... Should I give 755 for cgi-bin folder?