Snapshot isent working -> basedir problem

Hi,

when i trye to test the connection to Amazon S3 i get the following error:

Connecting to AWS
Using SSL: Yes
Setting Region: EU (Ireland) Region (s3-eu-west-1.amazonaws.com)Unknown: errno:2 tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/zpanel/hostdata/zadmin/public_html/flexystore_com:disappointed:var/zpanel/temp/) /var/zpanel/hostdata/zadmin/public_html/flexystore_com/wp-content/plugins/snapshot/lib/destinations/aws/index.php on line 193

Couldnt fix it so far. (I have full server access)

besides of that i get the following error on the settings page:
_SESSION
Session save path is not a valid directory.
Session save path is not writeable.

I would need a little hint how to start here. Google was not very friendly with me on this toppic :smiley:

  • Vaughan

    hiya

    thanks for the post.

    if you have full control of the server, why not just disable open_basedir restrictions?

    install something like suhosin.

    but for now.

    The solution or workaround to open_basedir restriction problem is to disable the PHP open_basedir protection altogether, or to exclude the protection for certain privileged user accounts, or to allow access to the additional directory for PHP scripts.

    If you’re using cPanel WebHost Manager (WHM), you can easily disable PHP open_basedir protection or exclude certain users from the protection with WHM. Simply go to “Tweak Security” under the “Security” section, then select “Configure” link for “Php open_basedir Tweak”. Inside it, you can enable or disable php open_basedir Protection, or exclude and include hosts from the protection.

    If you’re using Plesk hosting control panel, you may need to manually edit Apache configuration file of vhost.conf and vhost_ssl.conf, and add in or edit the following php_admin_value open_basedir lines to the following:

    php_admin_value open_basedir none

    php_admin_value open_basedir /full/path/to/dir:disappointed:full/path/to/directory/httpdocs:disappointed:tmp

    The paths (above is example only and to be replaced with real path) that behind open_basedir are the directories that specifically allowed for the PHP scripts in the vhost domain account to access, so you can add in more directories that files are been stored and needed to be opened by PHP, each seperated by color “:”. But be careful as it might expose your system to security fraud.

    Once done, run the command below to make the changes effective, and then restart Apache httpd web server (apache2ctl restart or httpd restart)

    If you have to manually edit the Apache configuration file to disable PHP open_basedir protection, simply open up the httpd.conf file, and search for the lines that starts with the following characters:

    php_admin_value open_basedir …..

    Replace the whole line under the virtual host for the domain user account that you want to disable protection with the following line to disable it:

    php_admin_value open_basedir none

    You can also opt to allow your PHP scripts to access additional directory instead without disabling the protection. Additional directory can be added to the line, separated with color “:”. For example, to add /new_directory to the allow list:

    php_admin_value open_basedir “/home/user_account/:disappointed:usr/lib/php:disappointed:usr/local/lib/php:disappointed:tmp”

    php_admin_value open_basedir “/home/user_account/:disappointed:usr/lib/php:disappointed:usr/local/lib/php:disappointed:tmp:disappointed:new_directory”

    Restart the Apache after finished editing. Note that the directory allowed list restriction above is actually a prefix, not a directory name. This means that “open_basedir = /dir/incl” also allows access to “/dir/include” and “/dir/incls” if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: “open_basedir = /dir/incl/”.

    hope this helps.

    thanks.

  • phofmann

    after disabling open base dir:

    Connecting to AWS
    Using SSL: Yes
    Setting Region: EU (Ireland) Region (s3-eu-west-1.amazonaws.com)
    Using Storage: Standard
    Using ACL: private
    Sending file to: Bucket: flexystore: Directory:
    Send file success: Snapshot_XgJHtX

    this looks fine now.
    but it seems like it wont run... can i trigger the cron manually?

    when i select run emidiantly ive get the following output:
    http://gyazo.com/b8e3e1598456aba1da537200c6463a48

    it seem to start, then it lags then those strange output happen... it doesnt matter if i backup this local or to s3...

    regards

  • phofmann

    The immediate snapshot works quit good now!

    but the automatic ones till not work (see snapshot)

    here is what i found in the errorlog (i`ve replaced the domain name):

    [Sat Jun 29 14:54:39 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'wp_12_user_roles' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, switch_to_blog, WP_Roles->reinit, get_option
    
    [Sat Jun 29 14:54:39 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'siteurl' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
    
    [Sat Jun 29 14:54:39 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'upload_path' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
    
    [Sat Jun 29 14:54:39 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'upload_url_path' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
    
    [Sat Jun 29 14:54:39 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'uploads_use_yearmonth_folders' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
    
    [Sat Jun 29 18:04:21 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'wp_12_user_roles' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, switch_to_blog, WP_Roles->reinit, get_option
    
    [Sat Jun 29 18:04:21 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'siteurl' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
    
    [Sat Jun 29 18:04:21 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'upload_path' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
    
    [Sat Jun 29 18:04:21 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'upload_url_path' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
    
    [Sat Jun 29 18:04:21 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_domainname.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'uploads_use_yearmonth_folders' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option

    and another question: is it possible to restore a snapshot directly from amazon s3 without saving it locally on the server? :slight_smile: that would just be nice but its not so important right now.

    regards

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.