HEX
Server: Apache
System: Linux dotw660 5.10.0-37-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User: web350 (1012)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/clients/client125/web350/web/wp-content/plugins/wp-automatic/inc/class.mysql-ping.php
<?php
/*
the code in this file was provided by: Nsp Code  http://www.nsp-code.com
and should not be used without his permissions
*/


if (!class_exists('wpdb2')) 
    {
 
        Class wpdb2 Extends wpdb 
            {

	            function _ping() 
                    {

		                $retry = 3;
		                $failed = 1;
                        
		                $ping = mysql_ping( $this->dbh ) ;
		                while( !$ping && $failed < $retry) 
                            {

			                    $this->dbh = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD, 1);
			                    $this->select(DB_NAME);

			                    if ( !DB_CHARSET && version_compare(mysql_get_server_info($this->dbh), '4.1.0', '>=')) 
                                    {
 				                        $this->query("SET NAMES '" . DB_CHARSET . "'");
 				                    }
                                    
			                    $ping = mysql_ping( $this->dbh ) ;
			                    if(!$ping ) 
                                    {
				                        sleep(2);
				                        $failed+=1;
				                    }
			                    }

		                if(!$ping ) 
                            {
			                    $this->print_error('Attempted to connect for ' . $retry	. ' but failed...');
			                }
		                }

	            function query($query) 
                    {
                        $this->_ping();
		                return parent::query($query);
		            }
	        }

	    $wpdb2 = new wpdb2(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
	    foreach(get_object_vars($wpdb) as $k=>$v) 
            {
		        if (is_scalar($v)) 
                    {
			            $wpdb2->$k = $v;
			        }
		    }
	    
        $wpdb =& $wpdb2;
        
 
                                                                                                  
    }

?>