Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bjw4253

Pages: [1]
1
CentOS-WebPanel Bugs / Re: MySQL issue
« on: July 27, 2019, 11:03:48 AM »
make sure your root directory is not full

2
CentOS 7 Problems / Re: High MySQL Cpu Usage
« on: July 25, 2019, 06:00:14 PM »
you may want to make some edits in your mycnf file in the etc directory

This is just an example one and may need to be edited for your server.

example:  google it for changes

# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
[mysqld]
default-storage-engine=MyISAM
innodb_file_per_table=1
max_allowed_packet=268435456
open_files_limit=10000
innodb_buffer_pool_size=134217728
query_cache_size = 268435456
query_cache_type=1
query_cache_limit=1048576
max_connections=250
join_buffer_size=8388608
thread_cache_size=16
local-infile=1

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d


3
Other / CWP support worth every penney
« on: July 24, 2019, 05:39:53 PM »
I have been using cwp premium support for some years now and I will tell you that they are fantastic.I do code my site but not great at Linux and have issues sometimes.The cwp support folks have saved me so many headaches and have actually saved my server at least five times.I highly recommend there premium support it worth ever penney

centos 7 CWP user

4
Information / A grateful user
« on: March 07, 2017, 10:53:46 PM »
Just want to leave a comment about the CWP paid support.
I decided when I installed the cwp panel to give them a shot at giving me support.I paid the 35 usd and have not regretted it in the past year.
I will let you know they help me in everything from dns to server security.If I have an issue with my server at all they immediately address it.They monitor the server also.
I have had support in the past but nothing like the support they provide.I was initially going to only use there service for a little while but I would never stop using there support.They have kept my server running extremely fast and well tuned.
One of the things I like about there support is they do not make me feel stupid even when I ask them a stupid question.
I thought I was pretty good at running a server as I used cpanel and direct admin but using CWP with there support has been the best experience I have ever had.
Thank you CWP for being there.
I highly recommend putting out 35 USD for there service it is worth every penney.
Bjw

5
PHP / memcahe
« on: July 12, 2016, 11:38:05 PM »
I have been running memcache for years on all my sites.I have a server and have your service on a monitor system with your support.I have found out that cwp does not support memcahe.The issue I am having is how to possibly change my class_cache.php to make it work with another cach system or how to edit this to not use the cache?

this is the code
Code: [Select]
<?php

if (!extension_loaded('memcache')) {
    die(
'Memcache Extension not loaded.');
}

class 
CACHE extends Memcache {
    public 
$CacheHits = array();
    public 
$MemcacheDBArray = array();
    public 
$MemcacheDBKey '';
    protected 
$InTransaction false;
    public 
$Time 0;
    protected 
$Page = array();
    protected 
$Row 1;
    protected 
$Part 0;
    
    function 
__construct() {
        
$this->connect('127.0.0.1'11211);
    }
    
//---------- Caching functions ----------//
    // Wrapper for Memcache::set, with the zlib option removed and default duration of 1 hour
    
public function cache_value($Key$Value$Duration=2592000) {
        
$StartTime=microtime(true);
        if (empty(
$Key)) {
            
trigger_error("Cache insert failed for empty key");
        }
        if (!
$this->set($Key$Value0$Duration)) {
            
trigger_error("Cache insert failed for key $Key"E_USER_ERROR);
        }
        
$this->Time+=(microtime(true)-$StartTime)*1000;
    }
    public function 
add_value($Key$Value$Duration=2592000) {
        
$StartTime=microtime(true);
        if (empty(
$Key)) {
            
trigger_error("Cache insert failed for empty key");
        }
       
$add $this->add($Key$Value0$Duration);
       
$this->Time+=(microtime(true)-$StartTime)*1000;
       return 
$add;
    }
    public function 
get_value($Key$NoCache=false) {
        
$StartTime=microtime(true);
        if (empty(
$Key)) {
            
trigger_error("Cache retrieval failed for empty key");
        }
        
$Return $this->get($Key);
        
$this->Time+=(microtime(true)-$StartTime)*1000;
        return 
$Return;
    }
    public function 
replace_value($Key$Value$Duration=2592000) {
        
$StartTime=microtime(true);
        
$this->replace($Key$Valuefalse$Duration);
        
$this->Time+=(microtime(true)-$StartTime)*1000;
    }
    
// Wrapper for Memcache::delete. For a reason, see above.
    
public function delete_value($Key) {
        
$StartTime=microtime(true);
        if (empty(
$Key)) {
            
trigger_error("Cache retrieval failed for empty key");
        }
        if (!
$this->delete($Key,0)) {
        }
        
$this->Time+=(microtime(true)-$StartTime)*1000;
    }
    
//---------- memcachedb functions ----------//
    
public function begin_transaction($Key) {
        
$Value $this->get($Key);
        if (!
is_array($Value)) {
            
$this->InTransaction false;
            
$this->MemcacheDBKey = array();
            
$this->MemcacheDBKey '';
            return 
false;
        }
        
$this->MemcacheDBArray $Value;
        
$this->MemcacheDBKey $Key;
        
$this->InTransaction true;
        return 
true;
    }

    public function 
cancel_transaction() {
        
$this->InTransaction false;
        
$this->MemcacheDBKey = array();
        
$this->MemcacheDBKey '';
    }

    public function 
commit_transaction($Time=2592000) {
        if (!
$this->InTransaction) {
            return 
false;
        }
        
$this->cache_value($this->MemcacheDBKey$this->MemcacheDBArray$Time);
        
$this->InTransaction false;
    }
    
// Updates multiple rows in an array
    
public function update_transaction($Rows$Values) {
        if (!
$this->InTransaction) {
            return 
false;
        }
        
$Array $this->MemcacheDBArray;
        if (
is_array($Rows)) {
            
$i 0;
            
$Keys $Rows[0];
            
$Property $Rows[1];
            foreach (
$Keys as $Row) {
                
$Array[$Row][$Property] = $Values[$i];
                
$i++;
            }
        } else {
            
$Array[$Rows] = $Values;
        }
        
$this->MemcacheDBArray $Array;
    }
    
// Updates multiple values in a single row in an array
    // $Values must be an associative array with key:value pairs like in the array we're updating
    
public function update_row($Row$Values) {
        if (!
$this->InTransaction) {
            return 
false;
        }
        if (
$Row === false) {
            
$UpdateArray $this->MemcacheDBArray;
        } else {
            
$UpdateArray $this->MemcacheDBArray[$Row];
        }
        foreach (
$Values as $Key => $Value) {
            if (!
array_key_exists($Key$UpdateArray)) {
                
trigger_error('Bad transaction key ('.$Key.') for cache '.$this->MemcacheDBKey);
            }
            if (
$Value === '+1') {
                if (!
is_number($UpdateArray[$Key])) {
                    
trigger_error('Tried to increment non-number ('.$Key.') for cache '.$this->MemcacheDBKey);
                }
                ++
$UpdateArray[$Key]; // Increment value
            
} elseif ($Value === '-1') {
                if (!
is_number($UpdateArray[$Key])) {
                    
trigger_error('Tried to decrement non-number ('.$Key.') for cache '.$this->MemcacheDBKey);
                }
                --
$UpdateArray[$Key]; // Decrement value
            
} else {
                
$UpdateArray[$Key] = $Value// Otherwise, just alter value
            
}
        }
        if (
$Row === false) {
            
$this->MemcacheDBArray $UpdateArray;
        } else {
            
$this->MemcacheDBArray[$Row] = $UpdateArray;
        }
    }
}
//end class
?>


Any help would be appreciated

Pages: [1]