• 18-04-2010, 17:12:24
    #82
    orcun adlı üyeden alıntı: mesajı görüntüle
    Safe mod için çözüm yok mu?
    Maalesef kapattırmaktan başka çözüm yok.

    Alıntı
    The plugin does not work very well when PHP's safe mode is active. This must be disabled by your administrator
  • 18-04-2010, 17:13:15
    #83
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Kapanmasıda imkansız kötü oldu bu.Teşekkürler bilgi için
  • 18-04-2010, 17:13:33
    #84
    Kimlik doğrulama veya yönetimden onay bekliyor.
    orcun adlı üyeden alıntı: mesajı görüntüle
    Safe mod için çözüm yok mu?
    siteye özel safe mode kapatılabilir hocam
  • 18-04-2010, 17:14:42
    #85
    AndyCap adlı üyeden alıntı: mesajı görüntüle
    siteye özel safe mode kapatılabilir hocam
    Bunu bilmiyordum danışayım bir eminisiniz değil mi hocam mahçup olmayalım sonra.
  • 18-04-2010, 17:18:18
    #86
    Kimlik doğrulama veya yönetimden onay bekliyor.
    hostgator teknik ekibinin kullandığını gözlemlediğim wp-super cache otomatik kurulum scripti

    #!/usr/bin/perl
    #################################################################################################
    ## WP-Super-Cache installer
    ##
    ## Usage: $0 path/to/index.php
    #################################################################################################
    
    # TODO:
    #  - add .htaccess file so that it correctly works
    
    if ($#ARGV < 0) {
        print "Usage: $0 /home/user/path_to_installation/index.php\n";
        exit;
    }
    
    use File::Copy;
    use LWP;
    my $supercacheinstall = $0;
    my $ver="0.9.9";
    my $supercacheurl="http://hgfix.net/shaun/wp-super-cache.$ver.zip";
    
    # This is the PHP script that activates the plugin
    my $activatesupercache = <<END;
    <?php
    include_once( dirname(__FILE__) . '/wp-load.php' );
    include("wp-admin/includes/plugin.php");
    
    
    if (is_plugin_active("wp-cache.php")) {
            print "Already active\n";
    } else {
            if (activate_plugins("wp-super-cache/wp-cache.php")) {
                    print "Activated!\n";
            } else {
                    print "Error Activating!\n";
            }
    }
    
    require_once( dirname(__FILE__) . '/wp-content/plugins/wp-super-cache/wp-cache.php');
    
            wp_cache_restore();
    
        wp_cache_enable();
        wp_cache_create_advanced_cache();
    
    ?>
    END
    
    my $htaccess=<<'END';
    # WordPress SuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule> 
    END
    
    # Variables that you should not need to change
    my ($instdir,$wpconfig,$plugindir,$user,$pfft,$response,$add_cache);
    my ($login,$pass,$uid,$gid);
    my ($insturl,$dbname,$dbuser,$dbpass,$tableprefix,$wpoption,@wp_config);
    my ($ps,$mysql,$scoreboard,$command);
    my $ua = LWP::UserAgent->new;
    
    # Grab the script that is set
    my $index = shift; 
    my $add_cache = 1;
    
    # Figure out where wp-config.php is and the base of the installation
    $instdir = $index;
    $instdir =~ s#index.php##s;
    $wpconfig = $instdir."wp-config.php";
    
    
    if ( -f "$instdir/wp-config.php") {
        $wpconfig = $instdir."wp-config.php";
    }
    else {
        print "Can not find the wp-config.php file! You are on your own!\n";
        exit;
    }
    
    
    unless ( -f "$instdir/wp-load.php") {
    $activatesupercache = <<END;
    <?php
    include_once( .'/wp-blog-header.php' );
    include("wp-admin/includes/plugin.php");
    
    
    if (is_plugin_active("wp-cache.php")) {
            print "Already active\n";
    } else {
            if (activate_plugins("wp-super-cache/wp-cache.php")) {
                    print "Activated!\n";
            } else {
                    print "Error Activating!\n";
            }
    }
    
    require_once( dirname(__FILE__) . '/wp-content/plugins/wp-super-cache/wp-cache.php');
    
            wp_cache_restore();
    
            wp_cache_enable();
            wp_cache_create_advanced_cache();
    
    ?>
    END
    }
    
    $plugindir = $instdir."wp-content/plugins";
    ($pfft,$pfft,$user,$pfft) = split /\//, $instdir;
    
    # Read in the configuration from wp-config.php
    open WPCONFIG, "<", $wpconfig or die $1;
    while ( <WPCONFIG> ) {
        if (/DB_NAME/) {
            ($pfft,$pfft,$pfft,$dbname,$pfft)=split "'";
        }
        elsif (/DB_PASS/) {
            ($pfft,$pfft,$pfft,$dbpass,$pfft)=split "'";
        }
        elsif (/DB_USER/) {
            ($pfft,$pfft,$pfft,$dbuser,$pfft)=split "'";
        }
        elsif(/table_prefix/) {
            ($pfft,$tableprefix)=split "'";
        }
        elsif(/WP_CACHE/) {
            $add_cache = undef;
        }
        push(@wp_config,$_);
    }
    close WPCONFIG or die $1;
    
    $dbpass =~ s/([!&@|;~\)\(\>\<])/\\$1/g;
    
    $wpoption=$tableprefix."options";
    $insturl=`mysql -u $dbuser -p$dbpass $dbname --batch -e "SELECT option_value FROM $wpoption WHERE option_name like '%siteurl%'" | grep -v option_value`;
    chomp($insturl);
    
    $command = "ps aux | grep ^$user";
    $ps =`$command`;
    $command = "mysqladmin proc | grep $user"."_";
    $mysql = `$command`;
    $scorebaord = "";
    
    #print "DBNAME: $dbname\nDBPASS: $dbpass\nDBUSER: $dbuser\nTABLE PREFIX: $tableprefix\n";
    
    print "Wordpress installation at: $instdir\n";
    print "Config file at: $wpconfig\n";
    print "Plugin directory at: $plugindir\n";
    print "Table prefix: $wpoption\n";
    print "User: $user\n";
    print "Installation URL: $insturl\n\n";
    ($login,$pass,$uid,$gid) = getpwnam($user);
    
    # Unchattr chmod the index file
    system "chattr -ai $index";
    system "chmod 644 $index";
    
    chdir($plugindir);
    
    
    # Add a WP-Cache define line
    copy("$wpconfig","$wpconfig.bak");
    if ($add_cache) {
            #print "Modifying $wpconfig file...";
            open WPCONFIGW, ">","$wpconfig" or die $1;
        foreach $line (@wp_config) {
            if ($line =~ m/DB_NAME/) {
                print WPCONFIGW "define ('WP_CACHE','true');\n";
                
            } 
            print WPCONFIGW "$line";
        }
            close WPCONFIGW or die $1;
            #print "done!\n";
    }
    
    
    system("wget -q http://downloads.wordpress.org/plugin/wp-super-cache.$ver.zip");
    
    # Unzip the file
    system("unzip -qq wp-super-cache.$ver");
    
    # Remove the .zip file
    unlink("wp-super-cache.$ver.zip");
    
    # Open up and write the script to preform the installation
    chdir($instdir);
    open PHPFILE, ">", "$instdir/activatewpsupercache.php" or die $!;
    print PHPFILE $activatesupercache;
    close PHPFILE or die $!;
    
    copy("$plugindir/wp-super-cache/wp-cache-config-sample.php","$instdir/wp-content/wp-cache-config.php");
    #system("sed -i 's/$super_cache_enabled = false/$super_cache_enabled = true/g' wp-content/wp-cache-config.php");
    #system("sed -i 's/$cache_enabled = false/$cache_enabled = true/g' wp-content/wp-cache-config.php");
    
    # Chown the new folder
    system("chown -R $user. $instdir/wp-content");
    system("chown $user. -R $instdir");
    system("chmod go-w -R $instdir/wp-content");
    system("chown $user:nobody /home/$user/public_html");
    
    # Run the script to activate the plugin
    $response = $ua->get("$insturl/activatewpsupercache.php");
    
    $response = $ua->get("$insturl");
    if ($response->is_error) {
        print "Unable to reach their domain! Something is up!\n";
        exit;
    }
    print "Activating plugin... ";
    $response = $ua->get("$insturl/activatewpsupercache.php");
    
    if ($response->is_error) {
        print "Unable to activate plugin! Received error code connecting to $insturl/activatewpsupercache.php!\n";
        exit;
    }
    
    # Grab it again and check to see if the page is cached
    print "Checking $insturl... ";
    $response = $ua->get("$insturl");
    if ($response->content =~ m/Cached page generated by WP-Super-Cache/) {
        print "It works!\n";
        print "=" x 60 . "\n";
        print "PLEASE NOTE THAT THE .HTACCESS DIRECTIVES WHERE NOT YET PUT IN PLACE!\n";
        print "=" x 60 . "\n";
        print "If the installation worked you can add the following for the pages to be served from the cache\n";
        print $htaccess;
    
        print "\n\n";
        print "Hello,\n\n";
        print "A WordPress installation located at $insturl was causing some issues on the server that it was on.  Instead of suspending the site, the plugin WP-Super-Cache was installed to greatly reduce the load that is caused by this particular installation. We determined that this was not in place by checking the .htaccess directives, so though you may already have had this plug-in it was not fully configured.  Please let us know if you see any issues, or if you have any questions regarding this and we will be happy to assist!\n\n";
        print "Here is why we were forced to take this action:\n";
    
    }
    else {
        print "Did not work, check to see if there are any errors in the admin panel!";
        exit;
    }
    
    # Remove the script that activates the plugin
    unlink("$instdir/activatewpsupercache.php");
  • 18-04-2010, 17:32:45
    #87
    orcun adlı üyeden alıntı: mesajı görüntüle
    Bunu bilmiyordum danışayım bir eminisiniz değil mi hocam mahçup olmayalım sonra.
    eminim hocam siteye özel safe mode diye aratın googleden
  • 18-04-2010, 17:34:48
    #88
    Teşekkür ederim hocam danışalım bakalım hosta ne diyecek.
  • 11-05-2010, 14:16:17
    #89
    cache dosyasının içerisinde htaccess oluşturup o kodları ekleyin demişsiniz.onun yerine o kodları root daki htaccess dosyasına atsak olmaz mı?
  • 11-05-2010, 16:56:47
    #90
    Arkadaşlar cache sistemini sitelerine kurmak isteyen arkadaşlar forumda kuaza nickli selçuk bey le iletişime geçiniz derim benden tavsiye kuaza cache sistemini uyguladık sitemin birisine çok faydalı oldu hemde eklenti kurmadan siteye böylece bir tane eksik bi eklenti olmuş oldu sitede