diff --git a/das/start_das.php b/das/start_das.php index 9042ecb..d914b1d 100644 --- a/das/start_das.php +++ b/das/start_das.php @@ -11,7 +11,7 @@ $server->set([ 'log_file' => '/var/log/das/das.log', 'log_level' => SWOOLE_LOG_INFO, 'worker_num' => swoole_cpu_num() * 2, - 'pid_file' => '/var/log/das/das.pid', + 'pid_file' => '/var/run/das.pid', 'max_request' => 1000, 'dispatch_mode' => 2, 'open_tcp_nodelay' => true, diff --git a/epp/src/epp-check.php b/epp/src/epp-check.php index 33ba29a..af45841 100644 --- a/epp/src/epp-check.php +++ b/epp/src/epp-check.php @@ -129,8 +129,9 @@ function processDomainCheck($conn, $db, $xml, $trans) { $domainEntry[] = 'In use'; } else { // Check if the domain is reserved + $parts = explode('.', $domainName); $stmt = $db->prepare("SELECT type FROM reserved_domain_names WHERE name = :domainName LIMIT 1"); - $stmt->bindParam(':domainName', $domainName, PDO::PARAM_STR); + $stmt->bindParam(':domainName', $parts[0], PDO::PARAM_STR); $stmt->execute(); $reserved = $stmt->fetchColumn(); diff --git a/rdap/start_rdap.php b/rdap/start_rdap.php index a0afad3..70d3613 100644 --- a/rdap/start_rdap.php +++ b/rdap/start_rdap.php @@ -63,7 +63,7 @@ $http->set([ 'log_file' => '/var/log/rdap/rdap.log', 'log_level' => SWOOLE_LOG_INFO, 'worker_num' => swoole_cpu_num() * 2, - 'pid_file' => '/var/log/rdap/rdap.pid', + 'pid_file' => '/var/run/rdap.pid', 'max_request' => 1000, 'dispatch_mode' => 1, 'open_tcp_nodelay' => true, @@ -397,13 +397,13 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c) { [ mapContactToVCard($registrantDetails, 'registrant', $c) ], - array_map(function ($contact) { + array_map(function ($contact) use ($c) { return mapContactToVCard($contact, 'admin', $c); }, $adminDetails), - array_map(function ($contact) { + array_map(function ($contact) use ($c) { return mapContactToVCard($contact, 'tech', $c); }, $techDetails), - array_map(function ($contact) { + array_map(function ($contact) use ($c) { return mapContactToVCard($contact, 'billing', $c); }, $billingDetails) ), @@ -422,7 +422,7 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c) { 'type' => 'application/rdap+json', ] ], - 'nameservers' => array_map(function ($nameserverDetails) { + 'nameservers' => array_map(function ($nameserverDetails) use ($c) { return [ 'objectClassName' => 'nameserver', 'handle' => 'H' . $nameserverDetails['host_id'] . '-' . $c['roid'] . '', diff --git a/whois/port43/start_whois.php b/whois/port43/start_whois.php index 7adfff8..2397212 100644 --- a/whois/port43/start_whois.php +++ b/whois/port43/start_whois.php @@ -11,7 +11,7 @@ $server->set([ 'log_file' => '/var/log/whois/whois.log', 'log_level' => SWOOLE_LOG_INFO, 'worker_num' => swoole_cpu_num() * 2, - 'pid_file' => '/var/log/whois/whois.pid', + 'pid_file' => '/var/run/whois.pid', 'max_request' => 1000, 'dispatch_mode' => 2, 'open_tcp_nodelay' => true,