Support » Themes and Templates » problem editing themes in v2.7

problem editing themes in v2.7

  • problem editing theme directly from v2.7 back end:

    Warning: fopen(C:\Sites\Single39\ammarcarl\webroot\news/wp-content/themes/black-lucas/style.css) [function.fopen]: failed to open stream: Permission denied in C:\Sites\Single39\ammarcarl\webroot\news\wp-admin\theme-editor.php on line 55

    Warning: Cannot modify header information – headers already sent by (output started at C:\Sites\Single39\ammarcarl\webroot\news\wp-admin\theme-editor.php:55) in C:\Sites\Single39\ammarcarl\webroot\news\wp-admin\theme-editor.php on line 70

    here’s line 55:

    $f = fopen($real_file, ‘w+’);

    …which lies within this string:

    check_admin_referer(‘edit-theme_’ . $file . $theme);

    if ( !current_user_can(‘edit_themes’) )
    wp_die(‘<p>’.__(‘You do not have sufficient permissions to edit templates for this blog.’).'</p>’);

    $newcontent = stripslashes($_POST[‘newcontent’]);
    $theme = urlencode($theme);
    if (is_writeable($real_file)) {
    //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
    $f = fopen($real_file, ‘w+’);
    if ($f !== FALSE) {
    fwrite($f, $newcontent);
    $location = “theme-editor.php?file=$file&theme=$theme&a=te”;
    } else {
    $location = “theme-editor.php?file=$file&theme=$theme”;
    } else {
    $location = “theme-editor.php?file=$file&theme=$theme”;

    $location = wp_kses_no_null($location);
    $strip = array(‘%0d’, ‘%0a’);
    $location = str_replace($strip, ”, $location);
    header(“Location: $location”);

    any thoughts on how to fix this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘problem editing themes in v2.7’ is closed to new replies.
Skip to toolbar