Is there a solution to the open_basedir restriction error when using Snapshot

I am trying to use Snapshot to save my backups to Dropbox. So far I have been using the free 'WordPress Backup to Dropbox' plugin without any issues.

'Include common files', 'Archive' and 'Include all blog databases tables in this archive' is selected as options and the backup interval is set to once a day.

Selecting 'Add more destinations' for the backup destination I get the option of entering a destination name but no authentication information.

Then I get the open_basedir restriction error.

  • Decura

    The full error message for is:

    Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/usr/local/lib/php/PEAR/Exception.php) is not within the allowed path(s): (/var/www/ in /var/www/ on line 47

    Warning: require_once(/usr/local/lib/php/PEAR/Exception.php) [function.require-once]: failed to open stream: Operation not permitted in /var/www/ on line 47

    Fatal error: require_once() [function.require]: Failed opening required 'PEAR/Exception.php' (include_path='.:disappointed:usr/local/lib/php:disappointed:var/www/') in /var/www/ on line 47


  • Paul


    No, your not doing anything wrong. Just the Dropbox library we are using for Snapshot assumes PEAR is installed and available as part of the PHP setup on your hosting. Strange that your hosting is blocking that. PEAR is just a set of PHP extensions. A library.

    I'll need to look into the Dropbox library code and see if we can figure out a way to get around this. Might take a few days. I'll post back here when I have a solution. Thanks.

  • Paul


    Sorry to say no there is no solution or progress on our end. The open_basedir issue is hosting configuration and not something Snapshot can even begin to control.

    I'll look into the Dropbox code and see if I can help figure out what it is looking for. I do know it expects PEAR to be in the PHP path. So might want to start figuring our that. Best option is to create a file on your site to output the phpinfo(); function. The surf to that file.

    Basically via your control panel or FTP or however you have the ability to create/upload files on your site create a file in the root of your website names '_phpinfo.php'. Inside the file add the one line:

    <?php phpinfo(); ?>

    Then save the file. Next, open your browser and go to your site root and include that file as part of the URL like

    On the output you will see the path info. Make sure it is including the path to the PEAR root.

    Next issue is open_base itself. What open_basedir does actually is prevent hackers from coming into your site and access files outside of your site root. So depending on where you installed PEAR you need to setup an exclusion to allow access to the PEAR tree.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.