Changes between Version 13 and Version 14 of GetStartedWithTheCode


Ignore:
Timestamp:
Sep 22, 2007 9:08:44 AM (10 years ago)
Author:
philipp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GetStartedWithTheCode

    v13 v14  
    44== Developers who need help with: == 
    55 
    6 == Step by step instruction (outdated - new version needs to be copied from BV wiki) == 
     6== Step by step instruction  == 
     7== Reading == 
     8Inforamtion that has yet to be copied from BV wiki (in progress) 
     9 * Software_Development - workplace#Short introduction to the framework|Short intro to the framework 
     10 * BW development environment 
     11 * Subversion info 
     12 * Programming guideline 
     13 * Travelbook 
     14 *[http://www.bevolunteer.org/forum/index.php?topic=819.0 getting started with the TB code] 
     15 
     16== New style == 
     17''Coordinated by guaka'' 
     18 
     19We want to make it a lot easier to get started. 
     20 
     21=== Windows === 
     22We're working on a one-file installer, that includes WAMP. You will be able to just unzip the file, launch a batch file, and off you go. It will come with read-only access to the repository, but you can send patches to developers with write access or request write access. 
     23 
     24 1. Download the file https://www.bewelcome.org/svn/develstuff/trunk/wamp/bw-rox_wamp.zip  
     25 1. put (unzip?) it in <tt>C:\wamp</tt> (It has to be exactly this path, unless you want to twiddle with the Apache configuration.) 
     26 
     27Maybe someone can add what exactly needs to be changed, if you want a different path? 
     28 
     29 1.run <tt>...bat</tt> 
     30 
     31There are four of them that look promising: 
     32 * C:\wamp\install_mysql_service.bat 
     33 * C:\wamp\install_services.bat 
     34 * C:\wamp\install_services_auto.bat 
     35 * C:\wamp\launch_wampserver.bat 
     36Anyways, I can get the wamp tray icon. Then, when I click "phpMyAdmin", I get 
     37 
     38--------------------------- 
     39Aestan Tray Menu 
     40 
     41Could not execute menu item (internal error) 
     42 
     43[Exception] Could not execute run action: 
     44 
     45Das System kann den angegebenen Pfad nicht finden 
     46OK    
     47--------------------------- 
     48Nice, ain't it? 
     49 
     50Lemon-head 01:43, 14 September 2007 (CEST) 
     51 
     52:Maybe it's because your directory names are in German, or set up in a non-standard way? [[User:guaka|guaka]]<small><sup>[[bwm:guaka|BW]], [[user talk:guaka|wikitalk]]</sup></small> 04:32, 14 September 2007 (CEST) 
     53:: Which "directory names" would that be? Maybe one problem is that I have WinXP on E:, not on C: ? 
     54}} 
     55 
     56 1. rename <tt>htdocs/config.inc.php.example</tt> to <tt>config.inc.php</tt> and modify the configuration settings  (FUTURE: ''This should be done for you in the .zip file.'') 
     57 
     58 
     59=== Mac OS X, GNU/Linux, other Unices === 
     60 * Get the latest from subversion. 
     61 * Please refer to INSTALL. 
     62 
     63---- 
     64 
     65== Current, old style: Steps to take == 
    766=== Install Apache, PHP, MySQL === 
    8  * Do NOT use XAMPP on Windows - you end up with strange problems and nobody can help. <small>(And on GNU/Linux you need root access to use XAMPP, in which case you better properly install the stuff.)</small> 
     67<small>Apache is webserver software, PHP is a programming languages used to create websites, and MySQL is a database server. You need all three to run BeWelcome on your own machine. Fortunately there are convenient ways to get all 3 at once.</small> 
     68 * <small>Do NOT use XAMPP on Windows - you end up with strange problems and nobody can help. (And on GNU/Linux you need root access to use XAMPP, in which case you better properly install the stuff.)</small> 
    969 * Try '''[http://www.wampserver.com WAMPSERVER]''' on Windows before digging deeper or asking questions. Additional steps needed for WAMP: 
    10 :*enable gd lib (remove ";") in <tt>php.ini</tt>: 
     70  *enable gd lib in <tt>php\php.ini</tt> in the directory where wamp was installed (just remove the ";" comment symbol): 
    1171 extension=php_gd2.dll 
    12  *  '''[http://www.easyphp.org easyPHP]''' is also a good option. You'll need to: 
    13    * download at least v2.0beta 
    14    * set <tt>DocumentRoot</tt> in <tt>easyPHP/conf_files/http.conf</tt> to the htdocs directory of your repository 
    15    * don't forget to update the Directory directive some lines below to the same path! 
    16    * alter <tt>conf_files/php.ini</tt> and set  
     72 * '''[http://www.easyphp.org easyPHP]''' is also a good option. You'll need to: 
     73 ** download at least v2.0beta 
     74 ** set <tt>DocumentRoot</tt> in <tt>easyPHP/conf_files/http.conf</tt> to the htdocs directory of your repository 
     75 ** don't forget to update the Directory directive some lines below to the same path! 
     76 ** alter <tt>conf_files/php.ini</tt> and set  
    1777 short_open_tag = on 
    18    * restart Apache afterwards 
    19    * create a DB and fill the tables with phpMyAdmin, accessible via <tt>http://localhost/home</tt> 
     78 ** restart Apache afterwards 
     79 ** create a DB and fill the tables with phpMyAdmin, accessible via <tt>http://localhost/home</tt> 
    2080 
    2181=== Install Subversion, Get the Code === 
    22  * Check out some information about [[Subversion]] (short name "svn"). 
    23  * Get username and password for svn access, probably from [[Hannu]]. 
     82 * Check out some information about Subversion (short name "svn"). 
     83 * Get username and password for svn access, probably from Hannu. 
    2484 * Get a subversion client (e.g. [http://tortoisesvn.tigris.org/ Tortoise], [http://rapidsvn.tigris.org/ RapidSVN] or use the original command line tool). 
    2585 * Get the source code at https://www.bewelcome.org/svn/hcvol/trunk/ 
     
    3191 
    3292=== Set up the Database === 
    33 # Download the test-database dump from https://www.bewelcome.org/svn/develstuff/trunk/testdb/  
    34 # Create a new database, e.g. <tt>mtb</tt> 
    35 # [http://dev.mysql.com/doc/refman/5.0/en/adding-users.html Create a new user], e.g. <tt>mtb</tt> 
    36 # Add geographical data to the database by importing the files <tt>geonames_admincodes.sql.bz2</tt> and <tt>geonames_cache.sql.bz2</tt> from the folder <tt>/maintenance/mysql/</tt> of your svn repository into the database. This step is necessary to be able to create new profiles and users with your local website. 
    37 #: <small>Note 1: This step might cause problems, if you use phpMyAdmin: Older versions of phpMyAdmin couldn't import large files; if you run a new version, check upload_max_filesize and post_max_size in your php.ini file; furthermore, if you want to import bz2 files with phpMyAdmin uncompressed, php modules [bzip2] might be missing to do so. With files large as these, it is always a much better idea to use the mysql command line utility instead of phpMyAdmin. (e.g. <tt>bzcat geonames_admincodes.sql.bz2 | mysql mtb -u mtb -p</tt>)</small> 
    38 #: <small>Note 2: If you haven't made the svn checkout, download the files from <tt>https://www.bewelcome.org/svn/hcvol/trunk/maintenance/mysql</tt>.</small> (attention, this directory doesn't exist in the repository anymore, following paragraph might be the correct one? [[User:Narnua|Anu]] 20:50, 23 August 2007 (CEST)) 
     93 
     94 1. Download the test-database dump from https://www.bewelcome.org/svn/develstuff/trunk/testdb/  
     95 1. Create a new database, e.g. <tt>mtb</tt> 
     96 
     97# Close Skype, if you have it running (Skype is known for taking over the ports Apache would use otherwise, Apache ports can can be set in apache config files but a quick workaround is to shut down Skype while you start up WAMP - you can restart Skype after that) 
     98# Go to [http://localhost/phpmyadmin/ http://localhost/phpmyadmin/] 
     99# On the right side of the screen, you should see "Create new database" 
     100 
     101| 
     102Please explain more!!! I'm using WAMP5 on WinXP, and it says "All services running - server offline". Kasper said I should launch phpMyAdmin from the leftclick menu on WAMP tray icon, which sends my browser to http://localhost/phpmyadmin/, an address that is not found!! 
     103 
     104What needs explanation: 
     105* How do I "create a new db" ? Is this a command in WAMP, or what? 
     106* What are the steps to do this (do I need some services to run before that can happen, etc). 
     107 
     108-- User:Lemon-head|lemon-head 02:10, 13 September 2007 (CEST) 
     109 
     110 1. [http://dev.mysql.com/doc/refman/5.0/en/adding-users.html Create a new user], e.g. <tt>mtb</tt> 
     111 1. Add geographical data to the database by importing the files <tt>geonames_admincodes.sql.bz2</tt> and <tt>geonames_cache.sql.bz2</tt> from the folder <tt>/maintenance/mysql/</tt> of your svn repository into the database. This step is necessary to be able to create new profiles and users with your local website. 
     112 <small>Note 1: This step might cause problems, if you use phpMyAdmin: Older versions of phpMyAdmin couldn't import large files; if you run a new version, check upload_max_filesize and post_max_size in your php.ini file; furthermore, if you want to import bz2 files with phpMyAdmin uncompressed, php modules [bzip2] might be missing to do so. With files large as these, it is always a much better idea to use the mysql command line utility instead of phpMyAdmin. (e.g. <tt>bzcat geonames_admincodes.sql.bz2 | mysql mtb -u mtb -p</tt>)</small> 
     113 <small>Note 2: If you haven't made the svn checkout, download the files from <tt>https://www.bewelcome.org/svn/hcvol/trunk/maintenance/mysql</tt>.</small> (attention, this directory doesn't exist in the repository anymore, following paragraph might be the correct one? [[User:Narnua|Anu]] 20:50, 23 August 2007 (CEST)) 
     114 
    39115 
    40116==== phpMyAdmin ==== 
     
    60136 * Copy [repository]/htdocs/bw/lib/config.php.dist to [repository]/htdocs/bw/lib/config.php. 
    61137 * Edit [repository]/htdocs/bw/lib/config.php. Modify the following variables. (These are relevant eg. when you experiment with the signup process.) 
    62     * $_SYSHCVOL['EmailDomainName'] should point to your prefered host, which is probably "localhost". 
    63     * $_SYSHCVOL['MailToNotifyWhenNewMemberSignup'] should point to your prefered e-mail address, which is something like "myusername@localhost". 
     138 ** $_SYSHCVOL['EmailDomainName'] should point to your prefered host, which is probably "localhost". 
     139 ** $_SYSHCVOL['MailToNotifyWhenNewMemberSignup'] should point to your prefered e-mail address, which is something like "myusername@localhost". 
    64140 * Copy [repository]/inc/config.inc.php.example to [repository]/inc/config.inc.php . 
    65141 * Edit [repository]/inc/config.inc.php. Modify at least the following variables: 
    66     * $db['dsn']  
    67     * $db['user']  
    68     * $db['password']  
    69 ** $env['baseuri']  
    70 : Example with wamp standard installation, using the root account: 
     142 ** $db['dsn']  
     143 ** $db['user']  
     144 ** $db['password']  
     145 ** $env['baseuri']  
     146 : Example with wamp standard installation, using the root account: 
    71147   
    72148  // database dsn 
     
    82158=== Run BeWelcome === 
    83159Now you should be able to make a request to the start page of BW and see the appropriate page in your browser. The login should be working. For login and testing purposes you can use one of the existing users (username/password): 
    84  * admin/password : full rights 
    85  * accepter/password : can accept your newly created member 
    86  * username/password : several usernames (such as hkroger, jeanyves) with different sets of rights. In case of problems please read the list of problems carefully (??). If this doesn't help, please contact one of the active programmers. 
    87  
    88 :<tt>password</tt> doesn't work as a password, for me. It should work, ideally. All users in the test database should have the same password, i.e. "password". [[User:guaka|guaka]]<small><sup>[[bwm:guaka|BW]], [[user talk:guaka|wikitalk]]</sup></small> 19:02, 20 August 2007 (CEST) 
     160 
     161It's probably easiest to make all passwords into "password", i.e. in MySQL you can do  
     162 UPDATE  members SET password = PASSWORD("password") 
     163 :::<small>''This should be done for the test database that is given to developers.''</small> 
     164 
     165 *admin/password : full rights 
     166 *accepter/password : can accept your newly created member 
     167 *username/password : several usernames (such as hkroger, jeanyves) with different sets of rights. In case of problems please read the list of problems carefully (??). If this doesn't help, please contact one of the active programmers. 
    89168 
    90169=== Problems === 
     170See [[#Troubleshooting]] 
     171 
     172== See also == 
     173 * [[BW development environment]] 
     174 * <tt>INSTALL</tt> in the subversion tree 
     175 * [[Short introduction to development based on platform PT]] 
     176 
     177== Communication == 
     178 * [http://www.bevolunteer.org/forum/index.php?board=22.0 The BV forum] 
     179 * Skype 
     180 * [irc://irc.freenode.net/#bewelcome-dev IRC] 
     181 
     182=== Mailinglists === 
     183 
     184 
     185==Troubleshooting== 
     186 
     187Some common issues and solutions... 
     188 
    91189 * In general, if you get errors regarding certain requirements, just try to modify your php and webserver setting files and turn on certain modules/libraries that are needed. Two important needed modules are GD for php (if you're using WAMP, check that php_gd2 is on under php extensions) and the rewrite module (this one is found under apache modules in WAMP). 
    92190 * If you get a "Data dir error!" message, change all permissions for the directory /data to 777 (= read, write and execute for everybody). 
     
    102200 * If you click on "Community" and get an HTTP error 404 ("Object not found" or something similiar), something is wrong with your file [repository]/htdocs/.htaccess . Are you sure it is read by your webserver? Include some smut in the first row of the file to check, that the webserver does indeed pay attention for it. 
    103201 
    104 == See also == 
    105  * [[BW development environment]] 
    106  * <tt>INSTALL</tt> in the subversion tree 
    107  * [[Short introduction to development based on platform PT]] 
    108  
    109 == Communication == 
    110  * [http://www.bevolunteer.org/forum/index.php?board=22.0 The BV forum] 
    111  * Skype 
    112  
    113 === Mailinglists === 
    114 {{sd-mailinglists}} 
     202=== Fatal error: Class 'DOMDocument' not found === 
     203 
     204Error 
     205 
     206'''Fatal error: Class 'DOMDocument' not found in /path/to/bw/trunk/inc/base.inc.php on line 12''' 
     207 
     208Solution 
     209 
     210Create a new php file with this code in it: 
     211 <?php phpinfo(); ?> 
     212 
     213Then load the page in your browser, and search for "--disable-dom". If it's present, then XML functions are not installed on your PHP version. On an RPM based system (Linux) this command should work: 
     214 # yum install php-xml 
     215 
     216This worked for me. Chmac|Callum</small></sup>