All Site Activity

  • Khushbu added a new discussion topic 403 Forbidden in the group Elgg Technical Support
    Hi guys, I am trying to install elgg on a virtual machine and I am stuck on the second part of the installation which is from a web browser. I am getting a 403 Forbidden Error with the next message:  "You don't have permission to...
    • Hello,

      I modified the httpd.conf file and left like this:

      DocumentRoot "/var/www/html/elgg"

      <Directory "var/www/html/elgg">

      AllowOverride All

       

      </Directory>

      Now I write on the browser localhost:8080/elgg and it shows the error code is httpd 500.

      ---------------------------------------------------------------------------------------------------------

      I tried to copy the php file outside the folder /elgg, so now I have a file in /var/www/html --> install.php and that also doesn´t work:

      Error I am getting --> Couldn't include '/var/www/html/vendor/autoload.php'. Did you run `composer install`?

      Can I please get some help on this?

      Thank you 

       

       

    • It shouldn't be necessary to change the permissions of the files and folders of the content of the Elgg zip file after extracting its content. The permissions should already be correct (and setting unnecessary write permissions is definitely a bad idea).

      I would suggest to leave DocumentRoot in httpd.conf unchanged. But setting AllowOverride All for the install folder of Elgg is definitely necessary. Another second config step you probably must do is manually creating the file .htaccess in the Elgg install folder (copy the file /var/www/html/elgg/vendor/elgg/elgg/install/config/htaccess_dist from the extracted zip file to /var/www/html/elgg/.htaccess). Within this file set the RewriteBase to /elgg/, i.e. the line

      RewriteBase /elgg/

      would have to be added (there's some explanation what to do included in the file already).

      Also, you must have the mod_rewrite Apache module installed and enabled on your server.

    • Hello,

      Thank you so much for your reply. The issue was solved with the most stupid mistake, I had to install elgg inside the /var/www/html folder and I was doing the installation in home. Thankfully I realised. But thanks anyways.

  • Khushbu joined the group Elgg Technical Support
  • seri_ng replied on the discussion topic How to get dbhost value in Elgg3.2?
    Thanks iionly and Jerome! I am glad to learn that any functions starting with _functionName are reserved for Elgg core codes. iionly, according to Jerome's answer, I do not think I should open the ticket regarding this issue (already... view reply
  • Jerome Bakker replied on the discussion topic How to get dbhost value in Elgg3.2?
    In Elgg 3.0 we protected some configuration values. This mainly included the database configuration. You can use: _elgg_services()->dbConfig->getConnectionConfig(\Elgg\Database\DbConfig::READ); to get all the information you want. Keep... view reply
  • Hermand Pessek replied on the discussion topic remove "commented on" river from activity Stream
    Thanks, But for almost all "rivers" tested,  the variable $action_type always contains "create" not "comment". Regards, view reply
  • iionly replied on the discussion topic remove "commented on" river from activity Stream
    Ah, I'm definitely not yet into Elgg 3... Try function no_river_comment_entries(\Elgg\Hook $hook) { $action_type = $hook->getParam('action_type'); if ($action_type == 'comment') { return... view reply
  • Hermand Pessek replied on the discussion topic remove "commented on" river from activity Stream
    Thanks a lot. I am using elgg 3.3.1 I did it that way. But $returnvalue['action_type'] always contains "create" so I cannot know if the action is a comment or not . Regards,   view reply
  • iionly replied on the discussion topic remove "commented on" river from activity Stream
    Untested code: function no_river_comment_entries_init() { elgg_register_plugin_hook_handler('creating', 'river', 'no_river_comment_entries'); } function no_river_comment_entries(\Elgg\Hook $hook) {... view reply
  • iionly replied on the discussion topic How to get dbhost value in Elgg3.2?
    The backup-restore.rst seems to refer to use hardcoded values when using the exaple Perl script. I think it's not necessarily true that elgg_get_config() might no longer be capable to return dbhost (and maybe other cofig values from... view reply
  • Hermand Pessek replied on the discussion topic remove "commented on" river from activity Stream
    Hi @RvR , I still don't know how to do with my issue. Every time a user add post comment, a river is created on the activity stream. I do not want to display such river on the activity stream. I don't know how to do. Need... view reply
  • seri_ng replied on the discussion topic How to get dbhost value in Elgg3.2?
    I tried your recommendation within a function in start.php of my plugin and it threw an 'undefined function elgg_services( )'. Then I used '_elgg_config( )' function because it calls elgg_services( )->config, but it does not... view reply
  • seri_ng replied on the discussion topic How to get dbhost value in Elgg3.2?
    Thanks RvR! I am going try that and let you know if it works or not. view reply
  • RvR replied on the discussion topic How to get dbhost value in Elgg3.2?
    elgg_services()->config->dbhost(); (never tried) view reply
  • Hermand Pessek replied on the discussion topic ELGG.ERROR: Plugin settings cannot store arrays
    Thanks a lot view reply
  • seri_ng added a new discussion topic How to get dbhost value in Elgg3.2? in the group Beginning Developers
    I have a custom plugin to daily backup my database using mysqldump. In Elgg2.3.7, elgg_get_config('dbhost') returns a dbhost value. But it does not work with Elgg3.2.  Advice and suggestion please.
    • The backup-restore.rst seems to refer to use hardcoded values when using the exaple Perl script. I think it's not necessarily true that elgg_get_config() might no longer be capable to return dbhost (and maybe other cofig values from settings.php) on Elgg 3.3 on purpose.

      May I suggest you try with opening an issue about the problem in the Elgg repository at github to report that elgg_get_config() does no longer work as expected breaking backward compatibility and to ask if this was changed intentionally (and if not to fix it).

      In case it was changed intentionally one possibility to set/retrieve dbhost and other database credentials without hardcoding them could be adding plugin settings for each database variable necessary. Maybe there are other solutions possible right now already. I guess when trying to use _elgg_config() you would have to make use of the PHP keyword "use" to set the namespace and load some classes defined in Elgg core. BUT! the functions starting with an _ are NOT meant to be used within plugins. They should only be used in Elgg core code because they do not belong to the API functions that are kept backward compatible throughout the lifetime of an Elgg major version but can change at any time. So, the question remains (hopefully asked if you open an issue at github) why the API function elgg_get_config does no longer work as it probably should.

    • In Elgg 3.0 we protected some configuration values. This mainly included the database configuration.

      You can use: _elgg_services()->dbConfig->getConnectionConfig(\Elgg\Database\DbConfig::READ); to get all the information you want.

      Keep in mind since you're using an _ function (_elgg_services()) this isn't part of public API and can be broken at any time (like iionly said)

    • Thanks iionly and Jerome!

      I am glad to learn that any functions starting with _functionName are reserved for Elgg core codes.

      iionly, according to Jerome's answer, I do not think I should open the ticket regarding this issue (already answered).

      Jerome, if _functionName is for core codes, _elgg_services( ) is not a permanent solution then. I might take iionly's advice on creating plugin settings for these protected database values.

      Really appreciate all your help! @RvR, @iionly, and @Jerome

  • RvR replied on the discussion topic ELGG.ERROR: Plugin settings cannot store arrays
    1. Create a custom action where serialize() these values. or 2. Create a custom input/categories (same as input/tags but w/o output's view) and use it. view reply
  • Hermand Pessek added a new discussion topic ELGG.ERROR: Plugin settings cannot store arrays in the group Beginning Developers
    Hi Everyone, I am developing a plugin for elgg 3.3.1.  In the setting page of the plugin, I have the following input field. echo elgg_view_field([ '#type' => 'fieldset', 'legend' =>...
  • Hermand Pessek replied on the discussion topic Some troubles with setProfileData
    Thanks a lot. view reply
  • corey replied on the discussion topic Installing composer
    Nevermind on this, I finally gave up on it. view reply
  • trgolden replied on the discussion topic Is there a way to make some users moderators?
    iionly!  Thank you!  Those two plugins did the trick.  It's a simple admin task to turn users into moderators who then have editing/deleting ability with published posts.  Exactly what I was looking for.  I wish there... view reply