SynApp2 Installation - MySQL Short Instructions - local/private web server Recursively copy (untar or unzip) the SynApp2 distribution files onto your web server. Create a MySQL user, with all available privileges, named: 'synapp2' having a password value of 'password'. mysql>source or phpMyAdmin-Import the file: '_config_/synapp2.users.MySQL.txt' Point your browser to: http:///synapp2/ Login [username:admin, password:admin] The SynApp2 welcome page appears. Detailed Instructions Verify that your web server, PHP and MySQL are up and running. Verify that PHP safe mode is: off Verify that your database admin tool is up and running. If you don't have phpMyAdmin - get it: http://www.phpmyadmin.net Create a SynApp2 applications directory on your development server. The result should be: /synapp2/ Verify that your web server process has write access to: /synapp2/ Recursively copy (untar or unzip) 'index.html' and the directories: '_config_', '_shared_' and 'synapp2' (to the SynApp2 applications directory). You should then have: /synapp2/index.html /synapp2/_config_ /synapp2/_shared_ /synapp2/synapp2 Create a MySQL user, with all available privileges, named: 'synapp2' having a password value of 'password'. To keep things simple, create the synapp2 user having a password value of: 'password' (literally) (you can change it later) If (and/or when) you opt to change the synapp2 MySQL user password: In the file: '_config_/access.inc.php', update the value assigned to $this->m_config[ONE_FOR_ALL_PASSWORD] to be the new password [you can create the file _config_/access.inc.php' by copying or renaming the file: _config_/template.access.inc.php'] For shared servers consider pre-pending (and you may have to) a site-prefix to the user: synapp2 - e.g. 'myaccount_synapp2' This works very well on shared servers that have a control panel interface such as: Plesk In the file: '_config_/access.inc.php', look for, and then add a line similar to: $this->m_config[MAP_HTTP_HOST]['www.yoursite.com'][MAP_SITE_PREFIX] = 'myaccount_' [you can create the file _config_/access.inc.php' by copying or renaming the file: _config_/template.access.inc.php'] Create a 'synapp2' database, 'users' table, and populate the initial set of SynApp2 usernames: On a local server, you can just mysql>source or phpMyAdmin-Import the setup file: '_config_/synapp2.users.MySQL.txt' The code in this file will create the synapp2 database, create the users table, and populate the users table {username:admin, password:admin}, {username:guest, password:guest} On a shared server, you can (and will probably have to) modify the setup file: '_config_/synapp2.users.MySQL.txt' Comment out or delete the lines of code that CREATE and USE the synapp2 database - create it manually If you created the MySQL synapp2 user with a site-prefix, the name of synapp2 database you create should match exactly - e.g. 'myaccount_synapp2' If you have to create the synapp2.users manually, use the following table definition as a guide: -- -- Table structure for synapp2.users -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) unsigned NOT NULL auto_increment, `username` varchar(48) NOT NULL, `password` varchar(48) NOT NULL, PRIMARY KEY (`id`) ); -- One way or another, the values for synapp2.users.password must be encrypted with the MySQL function: PASSWORD() From phpMyAdmin, you can apply the PASSWORD() function as you insert or update records in synapp2.users MySQL code to do it (note the backtics vs single quote marks) looks like: INSERT INTO users SET username='yourname', `password`=PASSWORD('yourpass'); Add additional username/password record(s) to synapp2.users for yourself and for client(s), as needed. You can do this later - you'll be able to test your installation, login to SynApp2 with: [username:admin, password:admin] Use this/these username(s) and password(s) to login to SynApp2. Again, the value of the synapp2.users.password field must be encrypted with the MySQL PASSWORD() function. Point your browser to: http:///synapp2/ The SynApp2 login invitation appears. Login [username:admin, password:admin] The SynApp2 welcome page appears. Clarifications The MySQL user 'synapp2' is used to access the database 'synapp2', which has the table 'users', containing records of SynApp2 usernames and passwords. If a site-prefix is defined, it will be automatically prefixed to the 'synapp2' user and database names. SynApp2 Login occurs with 2 distinct phases. phase 1 - auth_connect - a MySQL database connect to synapp2.users (using the synapp2 username and password) phase 2 - user validation - if phase 1 is successful, the SynApp2 login username and password values are compared against the records in synapp2.users Troubleshooting If you cannot login: Do you have a MySQL user established for 'synapp2'? If you're using a site prefix - is the prefixed username identical to the prefixed database name? - e.g. both 'myaccount_synapp2' Are you trying to login with a username and password that matches a record with the same username, and properly encrypted password, in the synapp2.users table? Use the SynApp2 Setup/Test page. http:///synapp2/synapp2/setup.htm In the Test form, leave the AppID field blank (or enter the name of a database you're trying to work with) Supply the username and password value: admin, admin Click Test Review the Diagnostic Messages about auth_connect and user_validation for clues Make corrections - add the synapp2 user and/or database - confirm that the MySQL synapp2.users.password values are hashed correctly for your version of MySQL: http://dev.mysql.com/doc/refman/4.1/en/password-hashing.html If you're still having difficulty: Stop. Browse or search the SynApp2 Support Forums: http://www.synapp2.org/forum If you can't find an answer, register and post a question, or use the form on the Contact page: http://www.synapp2.org/main/?page_id=145 If you can, supply the Setup/Test Diagnostic Messages with your post. Copyright (c) 2007 - 2011 Richard Howell. All rights reserved. http://www.synapp2.org $Id: synapp2.install.MySQL.txt,v 1.3 2011/02/04 21:45:33 richard Exp $