Newbie to both Extend-a-story and WebMastering

General discussion about Extend-A-Story.

Moderator: Extend-A-Story Moderators

Wooster
Posts: 23
Joined: Sat Nov 08, 2003 1:30 am
Location: Connecticut
Contact:

Newbie to both Extend-a-story and WebMastering

Post by Wooster »

I was interested in starting a CYOA site for a long time but never really got serious about it until about a month ago. That was when I found this site and read about the features that Extend-a-story offered. I was really impressed by this program by what I read about it with all it's features. So I downloaded the program and then set out to find a server that supported both PHP and MySQL it took a while but I finnally found Tripod UK. Quite a good offer 50 megs and all that extra support most definently the best server I could find with those requirements set in mind.

The next thing I did was try to upload the program to the server while trying to comprehend the Read-me file. As the Read-me file was confusing, I tried to do my best to follow it's instructions but well I'll just show what I did.


"Set up a MySQL database to store the Extend-A-Story data."

I turned on the php/MySQL feature on.

"In the new database, run the database creation script 'ExtendAStory.sql'"

I uploaded the file to the MySQL data base. A bunch of what I think were files that were stored in that .sql file were displayed.

"Take the contents of the www directory and place them in a directory accessible to your web server."

I used Tripod's WebFTP to upload the files into a new folder which I named www and created a new folder with in the "www" folder called "images" to hold the 3 gif files.

"Modify db.inc to contain the relevant login information for the database you created."

I got totally lost there. There is no db.inc file that I can find but there is a db.sql file so I assumed that that it. Unfortuantly I didn't know what was in it exactly that needed to be changed. I tried searchin on Yahoo these past few days to see If there was any other way that it could be explained (I generally don't like to disturb people so I generally try to research things before I bother people as a last resort. This has become that last resort time)

From there to the end of the Read-me confused me, I have no real backround in web site running and this is my first attempt. I am sorry in advance for annoying you in what seems to me by reading around the forum here to be a very rudamentary problem.
User avatar
Sir Toby
Site Admin
Posts: 413
Joined: Sat Apr 26, 2003 3:42 pm
Location: Portland, Oregon, USA
Contact:

Re: Newbie to both Extend-a-story and WebMastering

Post by Sir Toby »

Wooster wrote:I was interested in starting a CYOA site for a long time but never really got serious about it until about a month ago. That was when I found this site and read about the features that Extend-a-story offered. I was really impressed by this program by what I read about it with all it's features. So I downloaded the program and then set out to find a server that supported both PHP and MySQL it took a while but I finnally found Tripod UK. Quite a good offer 50 megs and all that extra support most definently the best server I could find with those requirements set in mind.

The next thing I did was try to upload the program to the server while trying to comprehend the Read-me file. As the Read-me file was confusing, I tried to do my best to follow it's instructions but well I'll just show what I did.
Thank you for trying out Extend-A-Story, and especially for your comments regarding the installation instructions. I welcome the opportunity to try to improve them. I'll do my best to help you get up to speed and then will fix up the readme file so that others will have an easier time of it later on.
Wooster wrote:"Set up a MySQL database to store the Extend-A-Story data."

I turned on the php/MySQL feature on.
This step can be tricky depending upon the setup provided by your host. What's going on is that MySQL is a database server that can handle several individual databases. I imagine that many sites on your host have one or more MySQL databases set up for them. You will need a database created for your site to hold the Extend-A-Story data. A database may already have been setup for you, or you may need to request that a database be created for you. You'll need to check the documentation provided by your host. In any case, at the end you should have a database available for Extend-A-Story. In order to use the database, you will need the hostname of the MySQL server, a username for accessing the server, the password for the username, and the name of the database. All of this information should be available from your host.
Wooster wrote:"In the new database, run the database creation script 'ExtendAStory.sql'"

I uploaded the file to the MySQL data base. A bunch of what I think were files that were stored in that .sql file were displayed.
I'm not quite sure what you mean by this... The purpose of this step is to set up the table structure needed by Extend-A-Story within the database you setup in the previous step. The specifics of this step will vary depending on what sort of access your host gives you to your database. If you have access to the command line MySQL client, you can simply run the command line client on the SQL file with a command similiar to this:

Code: Select all

mysql -u [username] -p[password] [database] < Extend-A-Story.sql
If you don't have access to the command line client, you perhaps will have access to some web based client for setting up the tables you need. If all else fails, I could resort to creating a PHP script for setting up the database tables.
Wooster wrote:"Take the contents of the www directory and place them in a directory accessible to your web server."

I used Tripod's WebFTP to upload the files into a new folder which I named www and created a new folder with in the "www" folder called "images" to hold the 3 gif files.
That looks correct.
Wooster wrote:"Modify db.inc to contain the relevant login information for the database you created."

I got totally lost there. There is no db.inc file that I can find but there is a db.sql file so I assumed that that it. Unfortuantly I didn't know what was in it exactly that needed to be changed. I tried searchin on Yahoo these past few days to see If there was any other way that it could be explained (I generally don't like to disturb people so I generally try to research things before I bother people as a last resort. This has become that last resort time)
The readme file is a bit incorrect here. The file you need to edit is actually 'db.php'. It should be in the www directory you setup up above. You will need to take the hostname, username, password, and database name that you acquired in the first step and place them in this file at the appropriate places.
Wooster wrote:From there to the end of the Read-me confused me, I have no real backround in web site running and this is my first attempt. I am sorry in advance for annoying you in what seems to me by reading around the forum here to be a very rudamentary problem.
Yeah, the rest of the readme file won't make much sense until you've finished the above steps. I'll help you tackle the rest of it when you've figured out the above steps.

Don't worry about your confusion. Writing documentation is not my strong point, so I can understand that the readme file isn't perfectly clear.
Wooster
Posts: 23
Joined: Sat Nov 08, 2003 1:30 am
Location: Connecticut
Contact:

Re: Newbie to both Extend-a-story and WebMastering

Post by Wooster »

Wooster wrote:
"In the new database, run the database creation script 'ExtendAStory.sql'"

I uploaded the file to the MySQL data base. A bunch of what I think were files that were stored in that .sql file were displayed.

I'm not quite sure what you mean by this... The purpose of this step is to set up the table structure needed by Extend-A-Story within the database you setup in the previous step. The specifics of this step will vary depending on what sort of access your host gives you to your database. If you have access to the command line MySQL client, you can simply run the command line client on the SQL file with a command similiar to this:
Code:
mysql -u [username] -p[password] [database] < Extend-A-Story.sql

If you don't have access to the command line client, you perhaps will have access to some web based client for setting up the tables you need. If all else fails, I could resort to creating a PHP script for setting up the database tables.
I htink that may be part of my problem. I don't see anywhere to run the .sql file once I've got it on the MySQL data base. also do I need to load the other 2 .sql files?
User avatar
Sir Toby
Site Admin
Posts: 413
Joined: Sat Apr 26, 2003 3:42 pm
Location: Portland, Oregon, USA
Contact:

Re: Newbie to both Extend-a-story and WebMastering

Post by Sir Toby »

Wooster wrote:I htink that may be part of my problem. I don't see anywhere to run the .sql file once I've got it on the MySQL data base. also do I need to load the other 2 .sql files?
I see. Yeah, that is a problem. If you don't have access to the command line MySQL client, you won't be able to run the Extend-A-Story.sql script as described in the readme file.

You don't need to worry about the other 2 files in the sql directory. '2.0.1_to_2.1.0.sql' is an upgrade script for upgrading from an earlier version of Extend-A-Story. 'DBMaintenance.sql' contains some useful queries for determining the health of your Extend-A-Story database.

Since you don't have access to the command line MySQL client, we'll need to investigate other options for setting up your database. I'll look into what it will take to do it from a PHP script. Perhaps you can check to see if you have some sort of web based interface for interacting with your database.
User avatar
Sir Toby
Site Admin
Posts: 413
Joined: Sat Apr 26, 2003 3:42 pm
Location: Portland, Oregon, USA
Contact:

PHP Script for Creating the Database

Post by Sir Toby »

I've created a PHP script that will create the database tables for you. You can download it here:

http://www.sir-toby.com/eas-db.txt

To run it, follow these steps:

First, rename it from 'eas-db.txt' to 'eas-db.php'.

Next, you need to specify your database configuration. Near the top of the file, you will see something that looks like this:

Code: Select all

  $host     = "<host>";
  $user     = "<user>";
  $password = "<password>";
  $database = "<database>";
You need to replace <host>, <user>, <password>, and <database> with the hostname of your MySQL server, your username for the MySQL server, the password for the username, and the name of your database.

Now you need to take that file and place it in a publicly accessable web directory on your host.

Now you need to run the script by pointing your web browser to the location of the script on your host. If the script has any problems, it will tell you about them. Otherwise, it will say that everything worked.

Finally, be sure to delete the scipt from the publicly accessable web directory on your host. As long as it is there, anyone will be able to run it, blowing away your database.
Wooster
Posts: 23
Joined: Sat Nov 08, 2003 1:30 am
Location: Connecticut
Contact:

Post by Wooster »

Okay I'm VERY sorry for not posting sooner. I've been busy and the CYOA program kinda got forgotten for a while.

Thank you very much for that file I'm going to try it right now.

EDIT: Okay I tried it and got this message

Could not select database: Access denied for user: 'woostery_uk@wmphpf03.st2.lyceu.net' to database ''

But I'm going to assume that it's an error on my part. Thank you very much for your help. I'm going to try it some more tomarrow I hope.
User avatar
Sir Toby
Site Admin
Posts: 413
Joined: Sat Apr 26, 2003 3:42 pm
Location: Portland, Oregon, USA
Contact:

Post by Sir Toby »

Wooster wrote:Could not select database: Access denied for user: 'woostery_uk@wmphpf03.st2.lyceu.net' to database ''
That error means that you are logging in with a good username and password, but that the user you have selected doesn't have access to the specified database. You need to double check the database name, and verify that the user you are using does indeed have access to it.
Wooster
Posts: 23
Joined: Sat Nov 08, 2003 1:30 am
Location: Connecticut
Contact:

Post by Wooster »

I am very sorry for bothering you like this but, um, is it the CYOA program MySQL data base, my TriPod account one or is it in one of the PHP files that the access needs to be changed or whatever?

(Again I appologise for being incompotent when it comes to this sort o thing)
User avatar
Sir Toby
Site Admin
Posts: 413
Joined: Sat Apr 26, 2003 3:42 pm
Location: Portland, Oregon, USA
Contact:

Post by Sir Toby »

You need to set the database name in the PHP that I gave you for creating the tables. There is a line that looks like this:

Code: Select all

$database = "<database>";
You need to take the bit that reads <database> and change it to whatever the name of your database is. From the error you showed me, it appears that you either haven't modified that line, or you have placed the database name within angle brackets like the example has. You need to get rid of the angle brackets and put in the real database name. If you don't know the database name, you'll need to get the name from your host.
Wooster
Posts: 23
Joined: Sat Nov 08, 2003 1:30 am
Location: Connecticut
Contact:

Post by Wooster »

Thank-you, I did leave the <> characters in that made all the difference. And it gave me this message.

Installation Complete
Installtion of your Extend-A-Story database is complete. You should now delete this file from your Extend-A-Story web site directory to prevent others from running it.

And the file is now deleted as requested.

But, um, where is the "Configure Story Settings" link?

(And I continue to appologise about my inepticy with this program)
User avatar
Sir Toby
Site Admin
Posts: 413
Joined: Sat Apr 26, 2003 3:42 pm
Location: Portland, Oregon, USA
Contact:

Next Steps

Post by Sir Toby »

Okay, now we are getting somewhere. You remember those PHP files you copied to a publicly accessible directory on your host's web server? Now we get to work with those. There is one called 'db.php'. You need to modify it in the same way you modified the install script that I sent you. Basically, enter in the hostname, username, password, and database name in the appropriate places.

Once that is complete, you then need to open up admin.php in your web browser. It will prompt you for a login name and password. The login name is 'admin'. The password is 'admin'. Once logged in, you will see a 'Change Password' link near the bottom. Click on that and change your password. Once that is done, look for the 'Configure Story Settings' link near the middle of the page. That is the link that the readme file is talking about.
Wooster
Posts: 23
Joined: Sat Nov 08, 2003 1:30 am
Location: Connecticut
Contact:

Post by Wooster »

Okay, I did all that up top to the point where it asks for the username and password. When I tried admin for both slots I got an invalid user name and or password message, when I tried it as 'admin' for both I got this message,

Errors Detected
The following fatal errors have occurred. Please contact the site administrator.
------------------------------------------------------------------------
Unable to query user table in database.

Does that mean I put the stuff in correctly and something else is wrong or what?
User avatar
Sir Toby
Site Admin
Posts: 413
Joined: Sat Apr 26, 2003 3:42 pm
Location: Portland, Oregon, USA
Contact:

Post by Sir Toby »

Oops, sorry. I'm wrong. The login name is 'admin', but the password is 'change-me'. I should have double checked my own readme file in this case since it has it correct.

Don't use the single quotes when entering the login name and password. I don't know why you are getting that error when you are using the single quotes, but it obviously is a bug that I need to look into.
Wooster
Posts: 23
Joined: Sat Nov 08, 2003 1:30 am
Location: Connecticut
Contact:

Post by Wooster »

Hey I looks like it's finnaly going to work,

I'm heading off to bed and will do more with it tomarrow, but for when I log back on,

In every box there is a "-" do I leave it in or delete it?

For the story URL do I make one up at random or does it need to chave particular characters?

Same for Read Episode URL

And I think that's it.
User avatar
Sir Toby
Site Admin
Posts: 413
Joined: Sat Apr 26, 2003 3:42 pm
Location: Portland, Oregon, USA
Contact:

Post by Sir Toby »

Wooster wrote:In every box there is a "-" do I leave it in or delete it?
Take those out. I only put the dashes in there as a place holder.
Wooster wrote:For the story URL do I make one up at random or does it need to chave particular characters?

Same for Read Episode URL
For the story URL, you should make a web page that will act as the front page for your story. You'll need to take the URL you use to reach that page in your browser and put that in for the story URL. If you want an example of what that page can look like, here is the one I made for The Never Ending Quest:

http://www.sir-toby.com/extend-a-story/story-1/

For the Read Episode URL, you need to load up the read.php script in your web browser and copy that URL in for the Read Episode URL. This is the Read Episode URL for The Never Ending Quest:

http://www.sir-toby.com/extend-a-story/ ... e/read.php
Post Reply