Support » Plugin: Photo Gallery by 10Web - Mobile-Friendly Image Gallery » ABSPATH and Plugin Compatibility

  • Resolved Andrew dela Serna

    (@druesome)


    Hi! Some of our users on WordPress.com are having some trouble using your plugin, and we’ve narrowed the problem down to the use of ABSPATH in these files:

    /photo-gallery/admin/controllers/Options.php
    /photo-gallery/filemanager/controller.php

    In our servers, ABSPATH is where the core WordPress installation resides, thus is not writable and results in errors when uploading images into a Gallery. Replacing ABSPATH with $_SERVER['DOCUMENT_ROOT'] makes it work. Would you be able to make an adjustment to make your plugin work with $_SERVER['DOCUMENT_ROOT'] too?

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Photo Gallery Support

    (@photogallerysupport)

    Hi,

    We would like to kindly inform you that this change has already been made. It will be available in our upcoming updates.

    Thank you! Have a nice day!

    Thread Starter Andrew dela Serna

    (@druesome)

    Thank you! I’m wondering if this change is already implemented in version 1.4.7? I’ve just tested it and the same problem remains.

    Plugin Contributor Photo Gallery Support

    (@photogallerysupport)

    Hi,

    We have released a new version of Photo Gallery plugin, which we believe will resolve this problem. Please install the update, and in case you notice any issue, please let us know.

    Thank you! Have a nice day!

    Thread Starter Andrew dela Serna

    (@druesome)

    Thanks again. I’ve tested version 1.4.9, but I’m still getting the same errors.

    When I go to Photo Gallery > Options, I’m unable to save the Images directory path. I get this error:

    Uploads directory doesn't exist. Old value is restored.

    Screenshot: http://cld.wthms.co/FZjHj9

    When I try to create a gallery, I’m not able to upload images. There’s a popup with an error saying

    File loading failed :: abort

    Screenshot: http://cld.wthms.co/odIrUo

    Any thoughts? Is there an email address where I can contact you? We can set you up with a trial account on our platform to help you figure things out. Let me know!

    Plugin Contributor Photo Gallery Support

    (@photogallerysupport)

    Hi,

    This problem can be caused by the following two configurations on your website:

    Permissions. The folder where the photos are uploaded to should have their permissions set to 755 or 775. Please use FTP connection to check this.

    PHP GD2 Library. Please check if PHP GD2 library is enabled on your website. To check this, please follow the steps below.

    1. Create a plain text file and add the following code to it.

    <?php
    if (extension_loaded(‘gd’) && function_exists(‘gd_info’)) {
    echo “PHP GD library is installed on your web server”;
    }
    else {
    echo “PHP GD library is NOT installed on your web server”;
    }
    ?>

    Save the file, with testgd.php as its title.

    2. Upload it to the main directory of your website and access it via browser using its URL, e.g.:

    http://www.yoursite.com/testgd.php

    If the PHP GD2 library is not enabled on your web server, the output of the file will note so. In this case, please contact your hosting provider and ask them to activate it for your website.

    Thank you! Have a nice day!

    Thread Starter Andrew dela Serna

    (@druesome)

    Hi, as I’ve stated in my original message, I was able to get your plugin to work by replacing ABSPATH with $_SERVER['DOCUMENT_ROOT'] in the following files:

    /photo-gallery/admin/controllers/Options.php
    /photo-gallery/filemanager/controller.php

    ABSPATH just won’t work on our hosting on WordPress.com, because this is an unwritable folder where the WordPress installation resides.

    The writable folders (themes, plugins, uploads) are found in $_SERVER['DOCUMENT_ROOT'] . "/wp-content/".

    However, updating the plugin files all the time is not ideal, and that is why I’m making a request to make your plugin also work with $_SERVER['DOCUMENT_ROOT']. Is this possible?

    Plugin Contributor Photo Gallery Support

    (@photogallerysupport)

    Hi,

    We need to have a closer look at the described issue.
    Please contact our support team using the following email address:support@web-dorado.com
    Also, mention the URL of this forum topic in your message. We will provide a solution as soon as possible and share it here as well.

    Thanks, have a nice day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘ABSPATH and Plugin Compatibility’ is closed to new replies.