I installed mySQL on my computer. I downloaded phpWiki. Now what do I do?
1. For phpWiki do I need mySQL installed AND create a database or is just having mySQL installed enough?
2. If I need to create a database as well, then how do I create a database with mySQL? Do I need to give the database I create a particular name or password, do I have to put it in a particular place on my webserver (in a particular folder), do I have to put something particular in the database, if so how do I do this? What exactly do I do?
2. How do I get phpWiki to work once the database has been created? Which phpWiki files do I put on my webserver and where do I put them, do I have to create particular folders for particular files, where do I put index.php, what should be in this document (in the downloaded version it is empty, is this right?), which files do I need to modify and in what way should they be modified, how do I "attach" phpWiki to my database?
I really don't get what to do. I have read the documentation that came with phpWiki and I still am very confused. The only thing I understand at this moment is how to put an index.html or index.php file on my webserver and have that work. For the database and phpWiki part, I am lost.
Is there anyone who can explain this? I would really appreciate it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sounds like you need a tutorial on how to work MySQL, not PHPWiki. I was in this position not too long ago myself.
It wasn't quite clear in your post, but I'm going to assume that you're running a home server. First off you need to put the entire phpwiki directory on your webserver; also, you'll have to configure your server to recognize and use PHP if you haven't already.
Once that's done, you need to create a database, and then you have to run a bunch of commands on the database to get it ready for PHPWiki to use. You also need to edit the index.php file so that it knows you are using MySQL and so it knows the username and password to use to gain access to the database.
First off, MySQL has its own username(s) and password(s) that it requires for access. If you don't remember setting the username and password, then it is probably still the default - username "root" and password "" (null). You can work with it like this, but it's probably a bad idea because of security issues. Anyway, you'll need to know these so that you can put them in the index.php file.
Now you need to create a MySQL database. There is a way to do it from a console window (if you're a Windows user you know it as a DOS box) but I'm not familiar with it. I suggest getting PHPMyAdmin (also available on sf.net) if you haven't already. I'm not sure how hard it is to configure PHPMyAdmin, since I didn't configure my own, but I can assure you that using it is easy as pie. Read its documentation if you can't figure things out. Anyway, just create a new database. Call it whatever you want.
BUT WAIT! Before you close PHPMyAdmin, you need to run a bunch of stuff on the database to prepare it for being used by the wiki. To do this, go to the /schemas directory of your phpwiki folder and find the mysql.sql file. In PHPMyAdmin there's a section that says "Run command on database" when you click a database name on the left. You can run it from the file directly or you can copy the contents of the file and paste them into the little text box on that page. Either way, run the commands (this might take a minute) and Presto! Your database is configured.
If you have it set to the user "user1" with password "fubar" and database "wiki", then line 185 (line numbers might be a little different, depending on your version of phpWiki) should read:
'dsn' => 'mysql://user1:fubar@localhost/wiki'
Look around through the index.php file a bit and change around all the settings you want. Make sure that the line
'dbtype' => 'SQL',
is is there, and that there is a double slash ( // ) beginning any other 'dbtype' => statements, thereby commenting them out.
Leaving "db_handler" as gdbm works fine for me; it should probably work for you too.
There. Now, you're essentially done. Save the index.php file and put it in the correct place (on your server if you're not hosting it yourself) and then load up that page in your browser. If all went well, it should read "Loading Up Virgin Wiki." If not, double check all your work and try again.
Hope this helps!!! =D
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I installed mySQL on my computer. I downloaded phpWiki. Now what do I do?
1. For phpWiki do I need mySQL installed AND create a database or is just having mySQL installed enough?
2. If I need to create a database as well, then how do I create a database with mySQL? Do I need to give the database I create a particular name or password, do I have to put it in a particular place on my webserver (in a particular folder), do I have to put something particular in the database, if so how do I do this? What exactly do I do?
2. How do I get phpWiki to work once the database has been created? Which phpWiki files do I put on my webserver and where do I put them, do I have to create particular folders for particular files, where do I put index.php, what should be in this document (in the downloaded version it is empty, is this right?), which files do I need to modify and in what way should they be modified, how do I "attach" phpWiki to my database?
I really don't get what to do. I have read the documentation that came with phpWiki and I still am very confused. The only thing I understand at this moment is how to put an index.html or index.php file on my webserver and have that work. For the database and phpWiki part, I am lost.
Is there anyone who can explain this? I would really appreciate it.
Sounds like you need a tutorial on how to work MySQL, not PHPWiki. I was in this position not too long ago myself.
It wasn't quite clear in your post, but I'm going to assume that you're running a home server. First off you need to put the entire phpwiki directory on your webserver; also, you'll have to configure your server to recognize and use PHP if you haven't already.
Once that's done, you need to create a database, and then you have to run a bunch of commands on the database to get it ready for PHPWiki to use. You also need to edit the index.php file so that it knows you are using MySQL and so it knows the username and password to use to gain access to the database.
First off, MySQL has its own username(s) and password(s) that it requires for access. If you don't remember setting the username and password, then it is probably still the default - username "root" and password "" (null). You can work with it like this, but it's probably a bad idea because of security issues. Anyway, you'll need to know these so that you can put them in the index.php file.
Now you need to create a MySQL database. There is a way to do it from a console window (if you're a Windows user you know it as a DOS box) but I'm not familiar with it. I suggest getting PHPMyAdmin (also available on sf.net) if you haven't already. I'm not sure how hard it is to configure PHPMyAdmin, since I didn't configure my own, but I can assure you that using it is easy as pie. Read its documentation if you can't figure things out. Anyway, just create a new database. Call it whatever you want.
BUT WAIT! Before you close PHPMyAdmin, you need to run a bunch of stuff on the database to prepare it for being used by the wiki. To do this, go to the /schemas directory of your phpwiki folder and find the mysql.sql file. In PHPMyAdmin there's a section that says "Run command on database" when you click a database name on the left. You can run it from the file directly or you can copy the contents of the file and paste them into the little text box on that page. Either way, run the commands (this might take a minute) and Presto! Your database is configured.
If you have it set to the user "user1" with password "fubar" and database "wiki", then line 185 (line numbers might be a little different, depending on your version of phpWiki) should read:
'dsn' => 'mysql://user1:fubar@localhost/wiki'
Look around through the index.php file a bit and change around all the settings you want. Make sure that the line
'dbtype' => 'SQL',
is is there, and that there is a double slash ( // ) beginning any other 'dbtype' => statements, thereby commenting them out.
Leaving "db_handler" as gdbm works fine for me; it should probably work for you too.
There. Now, you're essentially done. Save the index.php file and put it in the correct place (on your server if you're not hosting it yourself) and then load up that page in your browser. If all went well, it should read "Loading Up Virgin Wiki." If not, double check all your work and try again.
Hope this helps!!! =D