This plugin generates test users for your Elgg installation. Depending on options provided by the
administrator, generated users will have custom profile icons, friend relationships, messages sent
to each others, blogs, uploaded contents, and comments on blog entries and uploaded content.
This plugin should never, under any circumstances, be used on a live site already
having real users and an active community. If anything goes wrong during user generation,
there can – and probably will – be inconsistencies in the Elgg database (not to mention that you
probably don’t want fake users mixed with your real ones in a single installation). Worst case
scenario, you might have to drop the whole database and install a new, empty Elgg
database from scratch. You’ve been warned.
New feature: As of version 0.91 beta, the plugin comes with JMeter integration. JMeter, in a
nutshell, is a great open source application, that will allow you to test your site under pressure.
This means you can unleash any number of your generated users onto your website
simultaneously and have them perform different kind of activities. They will log in, read their
messages, upload new files, post comments on blog entries, and do a lot more, just like real
users would do. While your fake users do their activities, you can check your server’s load,
average response times, deviations and other indicators. All that will help you to scale your
server(s) properly for a real-life environment.
Before enabling and using this plugin on your site, please please please read the enclosed manual (docs/manual.pdf). Especially the "Warnings" and the "Direct database manipulation" sections.
You can check out the results of running this plugin with the default parameters at http://elgg.skawa.hu
Any questions that have not been answered in the manual are welcome.
Please note that there is a newer version (0.96beta) of this plugin available here.
View Andras Szepeshazi's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Thank you!
I tested your plugin but when i start after moment i have white page and in log.txt i have:
It is normal ?
Hi Maximus,
what is your max_execution_time value in your php.ini config file? Could you send the whole log file to my email address? You'll find it in the manual.
Thanks.
max_execution_time is 30s, but i have white page after 2s.
I use last svn version elgg ( revision 2734 )
Now i erasing database and files and try again. If it not help i can send my log.txt
This can also be a php memory limit issue. Try to increase the memory limit to 64M in your php.ini file. Also, please try to turn on error reporting, here is a discussion on how to do that:
http://community.elgg.org/mod/groups/topicposts.php?topic=11345&group_guid=7
I can't find time to install new elgg but if i enable
error_reporting(E_ALL); i see:
Fatal error: Call to undefined function InvalidParameterException() in /home/WWW/elgg/elgg/trunk/engine/lib/filestore.php on line 244
In code i found BUG (filestore.php on line 244)
but should be
I try install new elgg and try againe as soon as
I tested again
All files must have an owner!
All files must have an owner!
InvalidParameterException Object
(
[message:protected] => All files must have an owner!
[string:private] => exception 'InvalidParameterException' with message 'All files must have an owner!' in /home/WWW/elgg/elgg/trunk/engine/lib/filestore.php:244
Stack trace:
#0 /home/WWW/elgg/elgg/trunk/engine/lib/filestore.php(163): ElggDiskFilestore->getFilenameOnFilestore(Object(ElggFile))
#1 /home/WWW/elgg/elgg/trunk/engine/lib/filestore.php(459): ElggDiskFilestore->open(Object(ElggFile), 'write')
#2 /home/WWW/elgg/elgg/trunk/mod/hu_skawa_genusers/actions/generate.php(228): ElggFile->open('write')
#3 /home/WWW/elgg/elgg/trunk/engine/lib/actions.php(65): include('/home/WWW/elgg/...')
#4 /home/WWW/elgg/elgg/trunk/engine/handlers/action_handler.php(18): action('hu_skawa_genuse...')
#5 {main}
[code:protected] => 0
[file:protected] => /home/WWW/elgg/elgg/trunk/engine/lib/filestore.php
[line:protected] => 244
[trace:private] => Array
(
[0] => Array
(
[file] => /home/WWW/elgg/elgg/trunk/engine/lib/filestore.php
[line] => 163
[function] => getFilenameOnFilestore
[class] => ElggDiskFilestore
[type] => ->
[args] => Array
(
[0] => ElggFile Object
(
[filestore:private] => ElggDiskFilestore Object
(
[dir_root:private] => /tmp/elgg/
[matrix_depth:private] => 5
)
[handle:private] =>
[attributes:protected] => Array
(
[guid] =>
[type] => object
[subtype] => file
[owner_guid] => 3
[container_guid] => 2
[site_guid] => 0
[access_id] => 0
[time_created] =>
[time_updated] =>
[enabled] => yes
[tables_split] => 2
[tables_loaded] => 0
[title] =>
[description] =>
)
[url_override:protected] =>
[icon_override:protected] =>
[temp_metadata:protected] => Array
(
[filename] => profile/user1large.jpg
)
[temp_annotations:protected] => Array
(
)
[valid:private] =>
)
)
)
[1] => Array
(
[file] => /home/WWW/elgg/elgg/trunk/engine/lib/filestore.php
[line] => 459
[function] => open
[class] => ElggDiskFilestore
[type] => ->
[args] => Array
(
[0] => ElggFile Object
(
[filestore:private] => ElggDiskFilestore Object
(
[dir_root:private] => /tmp/elgg/
[matrix_depth:private] => 5
)
[handle:private] =>
[attributes:protected] => Array
(
[guid] =>
[type] => object
[subtype] => file
[owner_guid] => 3
[container_guid] => 2
[site_guid] => 0
[access_id] => 0
[time_created] =>
[time_updated] =>
[enabled] => yes
[tables_split] => 2
[tables_loaded] => 0
[title] =>
[description] =>
)
[url_override:protected] =>
[icon_override:protected] =>
[temp_metadata:protected] => Array
(
[filename] => profile/user1large.jpg
)
[temp_annotations:protected] => Array
(
)
[valid:private] =>
)
[1] => write
)
)
[2] => Array
(
[file] => /home/WWW/elgg/elgg/trunk/mod/hu_skawa_genusers/actions/generate.php
[line] => 228
[function] => open
[class] => ElggFile
[type] => ->
[args] => Array
(
[0] => write
)
)
[3] => Array
(
[file] => /home/WWW/elgg/elgg/trunk/engine/lib/actions.php
[line] => 65
[args] => Array
(
[0] => /home/WWW/elgg/elgg/trunk/mod/hu_skawa_genusers/actions/generate.php
)
[function] => include
)
[4] => Array
(
[file] => /home/WWW/elgg/elgg/trunk/engine/handlers/action_handler.php
[line] => 18
[function] => action
[args] => Array
(
[0] => hu_skawa_genusers/generate
)
)
)
)
Very useful !
If we have comtrolled & dedicated test server, we should therefore be able test performance issues regarding "scalability" ;-)
it not work for me : generate.php
$filehandler = new ElggFile();
$filehandler->owner_guid = $lastEntityId+$i;
$filehandler->setFilename("profile/" . $user_prefix.$i . "large.jpg");
$filehandler->open("write"); //in this line i have exception "All files must have an owner"
I finish and i found what is wrong :)
in 2009010901.sql is updates table users_entity
ALTER TABLE `prefix_users_entity` ADD COLUMN `banned` enum ('yes', 'no') NOT NULL default 'no' AFTER `code`;
Before 2009-01-09 table users_entity did not have banned field :)
You use INSERT INTO prefix_users_entity VALUES (blah blah blah);
but you shoud use
INSERT INTO prefix_users_entity (k1,k2,k3,etc..) VALUES (blah blah blah...);
My small patch
http://elgg.seo4you.pl/generate.php.txt
Thanks for the fix, Maximus. However I have to say, that I haven't (and will not) test my plugin against the latest Elgg builds, I only use released, stable versions (as it is written in the docs). As soon as 1.5 is released, I will add compatibility for it, and upload a new version.
Meanwhile all of those who like to live on the "bleeding edge", please use Maximus's fix for the plugin.
Great plugin Andras, Thank you.
Phil
Andreas! In my opinion You/We/Everybody should always use field names in SQL if someone add new field then application stop work. I think elgg is very good but still is evolution and some changes in database are probable.
If we can make better code we shoud write better code :D
Maximus,
I respectfully and totally disagree. The point here that this plugin _should_ stop working if the underlying database structure changes. I rather have my plugin abort with an error message than silently ignore some unknown an unexpected change, and make the user believe that everything is fine.
We all should write better code, yes. Or rather, we should create better software - that says a lot more.
Unfortunatley I can't seem to get this work on 1.5, I'm getting the error:
hu_skawa_genusers is a misconfigured plugin.
PluginException Object
(
[message:protected] => hu_skawa_genusers is a misconfigured plugin.
[string:private] => exception 'PluginException' with message 'hu_skawa_genusers is a misconfigured plugin.' in /Users/james/Sites/5oup/engine/lib/plugins.php:237
Stack trace:
#0 /Users/james/Sites/5oup/engine/start.php(175): load_plugins()
#1 /Users/james/Sites/5oup/engine/handlers/pagehandler.php(16): require_once('/Users/james/Si...')
#2 {main}
[code:protected] => 0
[file:protected] => /Users/james/Sites/5oup/engine/lib/plugins.php
[line:protected] => 237
[trace:private] => Array
(
[0] => Array
(
[file] => /Users/james/Sites/5oup/engine/start.php
[line] => 175
[function] => load_plugins
[args] => Array
(
)
)
[1] => Array
(
[file] => /Users/james/Sites/5oup/engine/handlers/pagehandler.php
[line] => 16
[args] => Array
(
[0] => /Users/james/Sites/5oup/engine/start.php
)
[function] => require_once
)
)
)
Any help greatly appreciated
James
Sorry! Like a donut I didn't read the FAQ properly, have sorted it out now. Thanks for a great plugin!
James
This plugin is very useful and highly recommended for everyone who wants to use elgg for communty that can handle more than a few dozen users.
I have modified the plugin to work with elgg 1.5. I had to make a few changes to the register_action calls in start.php, to the SQL INSERT statements because of db structure changes and a few more minor changes. If anyone is interested i will share my version. I asked Andras if he wants to integrate my changes into his code.
Gumi. Please share. I'm new to Elgg and wanting to give it a thourough testing before I take my site live.
I'd be interested in a 1.5 compatible version as well! Cheers.
Thanks for all the comments and downloads, everyone. Rather unfortunately, I haven't been able to finish the updated version for Elgg v1.5. I'm still planning on it, as I incorporated a lot of new features, however based on my current workload I can't even tell an estimated deadline for that.
Luckily enough, there is a very active and contributing community here. If you read a little upwards in the comments, first Maximum publised a fix for version 1.5, then Gumi also provided a solution (plus a warning about unwanted e-mails sent by the plugin). Please contact them directly for the fix.
Thank you.
can somebody send me a working plugin? thanks very much
Hi Everyone,
for those of you who are interested in making this plugin work with Elgg 1.5, here is a quick fix:
1. Go to the plugin's directory (hu_skawa_genusers)
2. Open the actions/generate.php file
3. Go to line 164, which goes like:
$createUserStatement.='(' . ($lastEntityId+$i) . ',"' . $user_name . '","' . ($user_prefix.$i) . '","' . $password. '","' . $salt . '","' . $email_address. '","","",' . $action_time. ',' . $prev_last_action. ',' . $last_login. ',' . $prev_last_login . '),';
4. Replace this line with the following statement:
$createUserStatement.='(' . ($lastEntityId+$i) . ',"' . $user_name . '","' . ($user_prefix.$i) . '","' . $password. '","' . $salt . '","' . $email_address. '","","","no",' . $action_time. ',' . $prev_last_action. ',' . $last_login. ',' . $prev_last_login . '),';
That should do it.
I do apologize to everyone for not being able to update this plugin recently. Due to my current obligations I'm not sure when I'll be able to continue my Elgg contribution. If anyone is willing to take over the ongoing development of this plugin (for future Elgg releases), I'll be happy to send the latest source, and give online support for the takeover period - provided that the new owner will be willing to upgrade this plugin continuosly.
Thanks,
András
Hello! I applaud Andras and everyone else who has contributed to this plugin. I am in need of a stripped down version. I have a site whose users are to be assigned a random, initial user name and password. So, all I need is the ability to generate usernames and passwords. I am currently running ELGG v. 1.5. I hope someone can help me.
Thanks!
Hi all! I'm trying this on a brand new clean elgg 1.5 install just download from elgg.org
I get the 404 error in Firefox 3.0.11 and IE8
The requested URL /elgg15/actions/hu_skawa_genusers/generate was not found on this server.
Any assistance is greatly appreciated.
Hi,
I'm planning to upload an Elgg 1.5 compatible version of this plugin later today. Please check back later.
Right, forgot... on windows XP sp3 - running wamp 2.0 modrewrite is enabled for apache config.
I've followed the rest of the advice here, modifying the generate.php file and enabling only the required plugins with no additional users.
apache access log
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "POST /elgg15/action/login HTTP/1.1" 302 -
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/pg/dashboard/ HTTP/1.1" 200 3316
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_css/css.css?lastcache=1246427485&viewtype=default HTTP/1.1" 200 64230
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_css/js.php?lastcache=1246427485&js=initialise_elgg&viewtype=default HTTP/1.1" 200 9316
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_graphics/elgg_toolbar_logo.gif HTTP/1.1" 200 1547
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_graphics/icons/default/topbar.png HTTP/1.1" 404 202
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_graphics/toptoolbar_background.gif HTTP/1.1" 200 2028
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_graphics/spacer.gif HTTP/1.1" 200 43
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_graphics/toolbar_messages_icon.gif HTTP/1.1" 200 502
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_graphics/elgg_toolbar_logout.gif HTTP/1.1" 200 893
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_graphics/icon_customise_info.gif HTTP/1.1" 200 352
127.0.0.1 - - [01/Jul/2009:00:54:17 -0500] "GET /elgg15/_graphics/icon_customise_drag.gif HTTP/1.1" 200 338
127.0.0.1 - - [01/Jul/2009:00:54:19 -0500] "GET /elgg15/pg/admin/ HTTP/1.1" 302 20
127.0.0.1 - - [01/Jul/2009:00:54:19 -0500] "GET /elgg15/pg/admin/statistics/ HTTP/1.1" 200 2564
127.0.0.1 - - [01/Jul/2009:00:54:19 -0500] "GET /elgg15/_css/js.php?lastcache=1246427485&js=initialise_elgg&viewtype=default HTTP/1.1" 200 9316
127.0.0.1 - - [01/Jul/2009:00:54:20 -0500] "GET /elgg15/_graphics/icons/default/topbar.png HTTP/1.1" 404 202
127.0.0.1 - - [01/Jul/2009:00:54:19 -0500] "GET /elgg15/_css/css.css?lastcache=1246427485&viewtype=default HTTP/1.1" 200 64230
127.0.0.1 - - [01/Jul/2009:00:54:20 -0500] "GET /elgg15/_graphics/icon_rss.gif HTTP/1.1" 200 583
127.0.0.1 - - [01/Jul/2009:00:54:23 -0500] "GET /elgg15/pg/genusers/ HTTP/1.1" 200 3599
127.0.0.1 - - [01/Jul/2009:00:54:23 -0500] "GET /elgg15/mod/hu_skawa_genusers/js/Spry_1_6_1_022408/widgets/tabbedpanels/SpryTabbedPanelsMod.css HTTP/1.1" 200 8188
127.0.0.1 - - [01/Jul/2009:00:54:23 -0500] "GET /elgg15/mod/hu_skawa_genusers/js/Spry_1_6_1_022408/widgets/tabbedpanels/SpryTabbedPanels.js HTTP/1.1" 200 11189
127.0.0.1 - - [01/Jul/2009:00:54:23 -0500] "GET /elgg15/_css/js.php?lastcache=1246427485&js=initialise_elgg&viewtype=default HTTP/1.1" 200 9316
127.0.0.1 - - [01/Jul/2009:00:54:23 -0500] "GET /elgg15/_css/css.css?lastcache=1246427485&viewtype=default HTTP/1.1" 200 64230
127.0.0.1 - - [01/Jul/2009:00:54:23 -0500] "GET /elgg15/_graphics/icons/default/topbar.png HTTP/1.1" 404 202
127.0.0.1 - - [01/Jul/2009:00:54:25 -0500] "POST /elgg15/actions/hu_skawa_genusers/generate HTTP/1.1" 404 239
Apache error log
[Wed Jul 01 00:50:24 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/admin/plugins/
[Wed Jul 01 00:50:40 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/admin/plugins/
[Wed Jul 01 00:50:47 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/admin/plugins/
[Wed Jul 01 00:50:48 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/admin/plugins/
[Wed Jul 01 00:50:58 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/admin/plugins/
[Wed Jul 01 00:51:07 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/admin/plugins/
[Wed Jul 01 00:51:25 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/admin/plugins/
[Wed Jul 01 00:51:28 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/genusers/
[Wed Jul 01 00:52:00 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/actions/hu_skawa_genusers, referer: http://localhost/elgg15/pg/genusers/
[Wed Jul 01 00:54:17 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/dashboard/
[Wed Jul 01 00:54:20 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/admin/statistics/
[Wed Jul 01 00:54:23 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/_graphics/icons/default/topbar.png, referer: http://localhost/elgg15/pg/genusers/
[Wed Jul 01 00:54:25 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/elgg15/actions/hu_skawa_genusers, referer: http://localhost/elgg15/pg/genusers/
htaccess file
# Elgg htaccess directives
# Copyright Curverider Ltd 2008-2009
# License http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
# Link http://elgg.org/
<IfModule !mod_rewrite.c>
# ugly ugly hack to detect missing mod_rewrite
# RedirectMatch must be to an absolute destination, so forces 500 error...
ErrorDocument 500 "Elgg error: Apache does not have mod_rewrite loaded. Please check your Apache setup."
RedirectMatch 302 .* index.php
</IfModule>
<Files "htaccess_dist">
order allow,deny
deny from all
</Files>
# Don't listing directory
Options -Indexes
# Follow symbolic links
Options +FollowSymLinks
# Default handler
DirectoryIndex index.php
# Turn on expiry
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 10 years"
</IfModule>
# php 4, apache 1.x
<IfModule mod_php4.c>
ErrorDocument 500 "Elgg error: Elgg does not support PHP 4."
RedirectMatch 302 .* index.php
</IfModule>
# php 4, apache 2
<IfModule sapi_apache2.c>
ErrorDocument 500 "Elgg error: Elgg does not support PHP 4."
RedirectMatch 302 .* index.php
</IfModule>
# php 5, apache 1 and 2
<IfModule mod_php5.c>
# default memory limit to 64Mb
php_value memory_limit 64M
# to make sure register global is off
php_value register_globals 0
# max post size to 8Mb
php_value post_max_size 8388608
# upload size limit to 5Mb
php_value upload_max_filesize 5242880
# hide errors, enable only if debug enabled
php_value display_errors 0
</IfModule>
# Turn on mod_gzip if available
<IfModule mod_gzip.c>
mod_gzip_on yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 1000
mod_gzip_maximum_file_size 1000000
mod_gzip_maximum_inmem_size 1000000
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/javascript$
mod_gzip_item_include mime ^application/x-javascript$
# Exclude old browsers and images since IE has trouble with this
mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
mod_gzip_item_exclude mime ^image/.*
</IfModule>
## Apache2 deflate support if available
##
## Important note: mod_headers is required for correct functioning across proxies.
##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.[0678] no-gzip
BrowserMatch \bMSIE !no-gzip
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
Thanks again everyone.
Looking forward to the response.