• I just finished the setup for SEO and tried to export my settings. When I did, I got the following error message:

    Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/ceastin/public_html/www.IdahoNaturalDentist.com/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php on line 90

    Anyone ever run into something similar? BTW, I’m a dentist, not a wordpress expert:)

    Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Yes, I’ve just got the same error on my website.

    We ONLY get the word “Error:” and no more details – however – no dialogue box opens to download the settings. After the first one failed i found this post – then tried on two more sites on other servers and get same result. No error details – just blank – and no way to download settings.zip…

    PS – Two of the sites were WP3.20 and one 3.21

    Yes, I’m getting the same thing on several WP blogs. Weird. I’d love to be able to move my settings around once optimized on one blog.

    Exact error:

    Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/bcrhodes/public_html/blogboxster.com/foundation/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php on line 90

    Anyone know of a fix for this?

    Thanks.

    – Brett

    I just want to add my “vote” to this bug report. Sure hope it gets fixed, because I have a bunch of sites I’d like to use this with and no desire to have to go through the whole process for each.

    Lane

    Also experiencing the same issue. Exporting worked fine last month. Hoping for a very quick fix.

    I apologize for being a PHP hack, but the problem seems to be

    Notice: Use of undefined constant WPSEO_UPLOAD_DIR – assumed ‘WPSEO_UPLOAD_DIR’ in plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php on line 79

    Notice: Use of undefined constant WPSEO_UPLOAD_DIR – assumed ‘WPSEO_UPLOAD_DIR’ in plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php on line 88

    Warning: chdir() [function.chdir]: No such file or directory (errno 2) in plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php on line 88

    If someone has some input, I’d luv to have an answer

    Also experiencing the same issue.

    Hi Joost,

    Heh. I didn’t feel the impact of this feature being broken until today when I had to update ALL my sites.

    So essentially this is hit me 15x today ??

    No hurries as today was the first time it would have helped, and I do want to thank you for this suite because it give me just enough direct influence to make the sites play ball properly.

    Looking forward to seeing this out of beta!

    -Tony

    There is a subtitle difference in that the dir must be an OS path when creating the file and a url when returning the file for download.
    There should also be a leading / on settings.ini and settings.zip

    Here is my workaround. Try out at your own risk.
    NOTE: I have not tested the resulting import yet.

    Additions market with > starting from line 80. Mods marked with |

    > $upload_dir = wp_upload_dir();
    > $wpseo_upload_path = $upload_dir[‘path’];
    > $wpseo_upload_url = $upload_dir[‘url’];
    | if ( !$handle = fopen( $wpseo_upload_path.’/settings.ini’, ‘w’ ) )
    die();

    if ( !fwrite($handle, $content) )
    die();

    fclose($handle);

    require_once (ABSPATH . ‘wp-admin/includes/class-pclzip.php’);

    | chdir($wpseo_upload_path);
    $zip = new PclZip(‘./settings.zip’);
    if ($zip->create(‘./settings.ini’) == 0)
    return false;

    | return $wpseo_upload_url.’/settings.zip’;

    Thanks setuptips! It works and you rock!

    Yes! Both the export and the import now work. Thank you very much for that patch. It took me a little while to read back through the thread and pick up which file to edit, so I’ll repeat that here:

    The patch applies to wordpress-seo/inc/wpseo-non-ajax-functions.php

    Yes thank you so much setuptips
    Fantastic – works for me too – thanks

    Unfortunately, this didn’t work for me. I get the following error:

    Parse error: syntax error, unexpected T_EXIT in
    /plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php on line 84 (last line)

    $upload_dir = wp_upload_dir();
    $wpseo_upload_path = $upload_dir['path'];
    $wpseo_upload_url = $upload_dir['url'];
    if ( !$handle = fopen( $wpseo_upload_path.'/settings.ini', 'w' ) )
    die();

    So what did I miss?

    I found an even simpler solution that worked. Add the following lines to wp-seo.php:

    define( ‘WPSEO_UPLOAD_DIR’, plugin_dir_path(__FILE__) );
    define( ‘WPSEO_UPLOAD_URL’, plugin_dir_url(__FILE__) );

    Add them up top with the other ‘define’ declarations.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Error when trying to export settings’ is closed to new replies.