Skip to content
Snippets Groups Projects
README 4.81 KiB
Newer Older
Eric Rasmussen's avatar
Eric Rasmussen committed
********
** How to set up UNL_Elgg:
********
Run the setup.sh script to symlink all the necessary plugins
	./setup.sh
Eric Rasmussen's avatar
Eric Rasmussen committed
Create a mysql database named unl_social
	mysql -u root unl_social < full_dump.sql
Eric Rasmussen's avatar
Eric Rasmussen committed
Browse to the elgg directory in your web browser and do elgg's installation:
	Create the local elgg/.htaccess file using the sample on the install page
		Be sure to set the correct RewriteBase /workspace/UNL_Elgg/elgg/ for example.
Eric Rasmussen's avatar
Eric Rasmussen committed
	Create the local elgg/engine/settings.php file.
		Be sure to specify unl_social as the database name
		Add this settings file to your svn:ignore list
Create a local directory named elgg_data for elgg to write to outside of the web root.
	Change the permissions so Apache has write access to it.
	sudo chown _www elgg_data
Eric Rasmussen's avatar
Eric Rasmussen committed
Install pear http://pear.php.net/manual/en/installation.getting.php
	Install the UNL_Templates pear packages
		pear channel-discover pear.unl.edu && pear install unl/UNL_Templates-beta unl/UNL_Services_Peoplefinder-beta DB
Set the correct site url within the unl_social database:
	UPDATE elggsites_entity SET url='http://ucommbieber.unl.edu/workspace/UNL_Elgg/elgg/' WHERE guid=1;
	UPDATE elggdatalists SET value = '/Users/bbieber/Documents/workspace/UNL_Elgg/elgg/' WHERE name = 'path';
	UPDATE elggdatalists SET value = '/Users/bbieber/Documents/workspace/UNL_Elgg/elgg_data/' WHERE name = 'dataroot';
Eric Rasmussen's avatar
Eric Rasmussen committed
Make sure the local site has an updated copy of the unl templatedependents

******
** Troubleshooting
******
After navigating to the elgg dir in your browser and filling in the correct database info - 
if you get the error that elgg can't connect to your database do this:
1. find your php.ini file, probably located at /etc/php.ini.default and rename it to php.ini
2. edit the mysql.default_socket line to include the path to your mysql.sock file, e.g.
   mysql.default_socket = /private/tmp/mysql.sock
Eric Rasmussen's avatar
Eric Rasmussen committed
If the mobile site or the regular site starts pulling in the Absolute template rather than the specified template
you may need to set up a symbolic link for the wdn directory.  The UNL_Templates package will 
    >> cd elgg/
    >> ln -s /var/www/html/wdn wdn 
Eric Rasmussen's avatar
Eric Rasmussen committed
*******
** Notes on importing data:
*******
Matthew Juhl's avatar
Matthew Juhl committed

****From here on out we will be dumping data from the live server to import on testing instances only. Changes on test
instances that modify database fields must be documented and repeated on the live server after testing.

full_dump.sql is is full copy of the mysql database that must be modified upon import.
safe_dump.sql can be imported without the need for modification

when importing full_dump.sql, you must modify certain rows in the tables elggdatalists and elggsites_entity so
that they pertain to the local elgg site instance. 	(so if you see something like 
Eric Rasmussen's avatar
Eric Rasmussen committed
http://ucommjuhl.unl.edu/UNL_Elgg/elgg, change it!)

*******
** Notes on importing data for dev to local machine:
*******
-On 'live' machine: ftp a copy of the database to your machine
    scp /backups/mysql/daily/unl_social/unl_social_2010-04-22_00h10m.Thursday.sql.gz usernameonlocalmachine@yourmachine.com:/Path/To/Transer/To
-On 'dev' machine: unzip it
    gunzip unl_social_2010-04-22_00h10m.Thursday.sql.gz
-import it
    mysql -u username -p < /Path/To/unl_social_2010-04-22_00h10m.Thursday.sql
-Set the correct site url within the unl_social database:
    mysql -u username -p
    use unl_social;
Seth Meranda's avatar
Seth Meranda committed
    UPDATE elggsites_entity SET url='http://ucommmeranda.unl.edu/workspace/UNL_Elgg/elgg/' WHERE guid=1;
    UPDATE elggdatalists SET value = '/Users/smeranda/Documents/workspace/UNL_Elgg/elgg/' WHERE name = 'path';
    UPDATE elggdatalists SET value = '/Users/smeranda/Documents/workspace/UNL_Elgg/elgg_data/' WHERE name = 'dataroot';
-zip up elgg_data and ftp that
    zip -r newfilename elgg_data
-replace your local copy of elgg_data with this one and make sure apache (could be _www or apache or ?) has write access to it
    cd path/to/elgg_data
    sudo chown -R _www *
    
Eric Rasmussen's avatar
Eric Rasmussen committed


Just run the setup.sh script. If any plugins are added, add this to the setup.sh script.
Eric Rasmussen's avatar
Eric Rasmussen committed

Seth Meranda's avatar
Seth Meranda committed

*******
** Patches
*******
All patches are located in the /pathces directory. These include:
Eric Rasmussen's avatar
Eric Rasmussen committed
patches/check_page_owner_exists.diff    * check that $page_owner is set or a non-existant profile returns 500 error (FIXED IN 1.7.4)
patches/relationship_get_set_public.diff  *__get __set not declared correctly
patches/lowercase_post.diff           *Forms use POST which doesn't validate 
patches/strip_tags_name_field.diff	  *Display Name field allowed html that often was not escaped upon output
patches/add_closing_labels.diff       
Seth Meranda's avatar
Seth Meranda committed


*******
** Things to look out for when new versions of Elgg are released
*******
-- Look at elgg's upgrade readme and look for changes to .htaccess
-- Are there changes to /elgg/actions/login.php and /elgg/actions/logout.php ?????
	We have overridden those actions with our own in the cas_auth_unl plugin