• When my wordpress install is in a subfolder the webhook shows a 500 error.
    the file wp-load.php is not found because the plugin tries to open it from the public_html folder, and not the subdirectory where the wordpress install is

    gitium-webhook.php line 21

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Presslabs

    (@presslabs)

    Hello @gbruynseels and thanks for reporting this issue.

    Can you please try to comment out the line 21 from gitium-webhook.php:

    https://github.com/presslabs/gitium/blob/master/gitium/gitium-webhook.php#L21

    and uncomment line 20 from the same file:

    https://github.com/presslabs/gitium/blob/master/gitium/gitium-webhook.php#L20

    And let us know if it works as expected in this way?

    If you still get an error, please get back to this thread and we’ll come up with another fix. I’ve also added a bug report for this in our GitHub repo here:

    https://github.com/presslabs/gitium/issues/178

    Thread Starter gbruynseels

    (@gbruynseels)

    Hi,

    Line 20 uses $_SERVER[‘DOCUMENT_ROOT’], causing the same problem as line 21.
    Line 21 would be better to get the public folder.

    A solution would be using a relative path starting from the __DIR__ or __FILE__ (dirname(__FILE__)) constant.

    For example:
    $wordpress_loader = __DIR__ . ‘/../../../wp-load.php’;
    or
    $wordpress_loader = dirname(__FILE__) . ‘/../../../wp-load.php’;

    Even better would be using a WordPress endpoint.

    Plugin Author Presslabs

    (@presslabs)

    We’ll run and add some tests in order to ensure we’ll find a proper way to handle all situations. Please subscribe to updates on the issue I’ve added on GitHub, as this thread will be closed at some point.

    From your message, I understand that you have managed to resolve your situation punctually.

    Thanks again for reporting this issue and please let us know if we can further assist you with regards to this plugin.

    Best regards,
    Pedro/Presslabs Support Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Webhook not working on site in subfolder’ is closed to new replies.