missing start.php

I'm about 2 for 6 on plugins. One 2.3, I follow the fairly simple process of downloading and extracting the zip file, moving it to ../mod, setting permissions and ownership to the httpd user. Everything makes sense, but when I try to enable the plugin, I see "This plugin is invalid: The required file "start.php" is missing." with the path to the start.php file. The file is there! I go to the path listed, see the file, look at the name, permissions, ownership. Everything is right and the file is in the path where the error message says it's missing.

I can't be the first one here, but I haven't found it discussed anywhere. What am I missing?

  • Do the bundled plugins of Elgg work? If yes, you can take them as example how to set permissions and ownership correctly.

    Have you copied the plugin folder to the server that you end with start.php at mod/<plugin_name>/start.php or is it mod/<plugin_name>/<plugin_name>/start.php? The latter would be wrong and would explain why start.php (and consequently all other plugin files) are not wrong. If that's not the reason, the only reason why it fails I can think of is permissions and ownership.

    If you change permissions and ownership are you sure that the owner and group are correctly set to the http user? Is user and group the same of the plugin files and folders the same for the Elgg core files and folders that seem to work? Have you also set the correct ownership for the plugin folder (and not only for its content)?

  • Yes, the bundled plugins work. I have start.php in mod/<plugin_name>/start.php. I used -R on my chmod and my chown, with apache.apache ownership. The only difference I can imagine is that I used "chmod 775" instead of "777", but I'll check that next. I'm sure it's something stupid, like my first marriage. Thanks for the sanity check. I could have used it in 1982.

  • Since Elgg core doesn't need write permissions in htdocs only read rights (for the apache user/group) should be enough.

    PS: never set permissions to 777, save should be 755 for folders and 644 for files.

  • Are you sure apache:apache is correct for owner and group?  You can try with (as root on the server)

    apachectl -S
    

    to find out the user and group the Apache process is configured to run as.

    As @Jerome already said, 777 within the install folder / plugin folder is not a good idea. You can change folder permissions recursively with

    find . -type d -print0 | xargs -0 chmod 755

    and file permissons with

    find . -type f -print0 | xargs -0 chmod 644

    while inside the plugin folder you want to change the permissions of. Then don't forget a

    chmod 755 <plugin_name>

    while in the mod directory.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking