Fenn Posted August 16, 2005 Posted August 16, 2005 (edited) Up front, let's me be clear, I'm a nimnul when it comes to scripting. It took me 3 days to make this simple program function to the point I've now got it. This is just a caveat so you know how much of a technical low-brow you're responding to. The script starts out well enough here: http://www.dustyskye.com/scgi-bin/story/story.pl When I submit an entry to the program I get the following return to my browser: couldn't open the file 'http://www.dustyskye.com/rpg/loh/storytext/1.txt' to save your section. (Error: No such file or directory)The file being referenced in the script is:$story_dir = "http://www.dustyskye.com/rpg/loh/storytext";'>http://www.dustyskye.com/rpg/loh/storytext"; Permissions on the file are set to 755 (as it appears from other things I've read through TCH that we don't have to set at 777). However, I also tried 777 just in case. I have changed permissions via Cpanel on the "storytext" file. I have changed permissions via WS_FTP on the "storytext" file. The script is running from my scgi-bin. In my non-technicalness I am now at a loss. Can someone either point me to keywords I can look up in the forum where this issue is addressed, or, jot a reply to this post? Thank you everso! Fenn Below are more specifics -- I don't know what you might need to assess this, so I just included everything I could think of. The author's general FAQ on line has this instruction in direct response to the return I am getting: Q: I'm getting an error that says the program cannot write to the file 1.txtA: This means that one of two things is wrong. Either the $story_dir in your storyconfig file is set wrong, or the $story_dir is set correctly but the permissions for that directory are wrong. Sometimes in the storyconfig file it is helpful to use the full pathname for the story directory instead of using a relative path name. That is, instead of setting it to story, set it to /usr/home/this/that/whatever/story — whatever the actual full path for your story directory is. If your $story_dir directory is set correctly, then check the permissions on the story directory. The web server needs to be able to write to that directory. Generally this means setting the permissions on the $story_dir directory to be "world-writeable", also known as 777. The Unix command to do this is chmod 777 plus the name of your story directory. The config file I'm running is this: #!/usr/local/bin/perl # This file contains configurable settings for story.cgi program. # Change these values as needed for your particular site. # Any customization for a particular site can be made here in the # storyconfig file. No changes to the story.pl program should # be required. # # Interactive Story program written by Valerie Mates, valerie@cyberspace.org # 1/15/98. # # This program is freeware, but, if you use it, you are required # to leave my URL in the page footer and send me an email message # (valerie@cyberspace.org) to let me know that you are using it. # # If you translate the program to another language, I would appreciate a # copy to add to the collection of translated versions. This is not # required, but it is appreciated. # # The program is not permitted for use on pornographic sites. # # This is the name of the directory where the story data is stored. # You'll need to make sure it exists -- that the web server can write to it. # By default, this program uses a directory called "story" under the # cgi-bin directory. $story_dir = "http://www.dustyskye.com/rpg/loh/storytext"; # URL of image directory, or "." if they are in the same directory # as this script: $image_url = "."; # Your own web page URL # Example: $host_url = "http://www.yourhost.com/~yourlogin"; $host_url = "http://www.rpg.dustyskye.com/loh"; # Email address to send mail to when each new page is posted. Or leave # blank to not send e-mail. IMPORTANT: Put a \ before any @ characters! # Example: $announce_to = "you\@somewhere.com"; $announce_to = "fenn\@dustyskye.com"; # Location of your sendmail program, if you want the program to send # you mail about each new response. (Unix only.) $sendmail = "/usr/sbin/sendmail"; # URL of header image, and the image's width and height and alt text. $header_image = "$image_url/nq_top.jpg"; $image_width = 498; $image_height = 131; $image_alt = "A Lands of Hope Interactive Story"; Edited August 16, 2005 by Fenn Quote
TCH-Bruce Posted August 16, 2005 Posted August 16, 2005 Welcome to the forums Fenn First of all your $story_dir varible is set wrong. >$story_dir = "http://www.dustyskye.com/rpg/loh/storytext"; Depending on where you actually want to store these story files it needs to be something like this. >$story_dir = "/home/your-cpanel-name/public_html/storytext/"; In the above example you would require a folder called "storytext" in your public_html folder and change the permissions to 777. If you want to use the path that you think you have defined it would look like this. >$story_dir = "/home/your-cpanel-name/public_html/rpg/loh/storytext/"; Quote
Fenn Posted August 16, 2005 Author Posted August 16, 2005 (edited) Bruce! Goddess thank you! I knew it must be something I just haven't got the experience for. I managed to make it work thanks to your more than timely response. I'm so thrilled. Mwhaaaaa! Thank you also for the welcome to the forums, Bruce and Thomas. Fenn Welcome to the forums Fenn First of all your $story_dir varible is set wrong. >$story_dir = "http://www.dustyskye.com/rpg/loh/storytext"; Depending on where you actually want to store these story files it needs to be something like this. >$story_dir = "/home/your-cpanel-name/public_html/storytext/"; In the above example you would require a folder called "storytext" in your public_html folder and change the permissions to 777. If you want to use the path that you think you have defined it would look like this. >$story_dir = "/home/your-cpanel-name/public_html/rpg/loh/storytext/"; <{POST_SNAPBACK}> Edited August 16, 2005 by Fenn Quote
stevevan Posted August 17, 2005 Posted August 17, 2005 Welcome to the forums! Glad to see you got things working again! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.