Example #1
0
function sig_handler($signo)
{
    switch ($signo) {
        case SIGTERM:
            // handle shutdown tasks
            my_error_log("got SIGTERM signal.exit...");
            exit;
            break;
        case SIGHUP:
            // handle restart tasks
            my_error_log("got SIGHUP signal.exit...");
            break;
        case SIGUSR1:
            echo "Caught SIGUSR1...\n";
            break;
        case SIGINT:
            my_error_log("got SIGINT signal.exit...");
            exit;
            break;
        default:
            // handle all other signals
    }
}
Example #2
0
<?php

my_error_log($message, $_POST);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Database Error</title>
<style type="text/css">

::selection{ background-color: #E13300; color: white; }
::moz-selection{ background-color: #E13300; color: white; }
::webkit-selection{ background-color: #E13300; color: white; }

body {
	background-color: #fff;
	margin: 40px;
	font: 13px/20px normal Helvetica, Arial, sans-serif;
	color: #4F5155;
}

a {
	color: #003399;
	background-color: transparent;
	font-weight: normal;
}

h1 {
	color: #444;
	background-color: transparent;
	border-bottom: 1px solid #D0D0D0;
Example #3
0
 function publish($chanel, $message)
 {
     try {
         return $this->kv->publish($chanel, $message);
     } catch (Exception $e) {
         my_error_log($e->getMessage());
         return false;
     }
 }
Example #4
0
function chat_profile_form_validation($chat_user_profile)
{
    if (!$chat_user_profile["location"]) {
        my_error_log(__METHOD__, "Location is missing!", $chat_user_profile);
        return false;
    }
    if (!$chat_user_profile["gender"]) {
        my_error_log(__METHOD__, "Gender is missing!", $chat_user_profile);
        return false;
    }
    if ($chat_user_profile["gender"] != GENDER_FEMALE && $chat_user_profile["gender"] != GENDER_MALE) {
        my_error_log(__METHOD__, "Gender is invalid!", $chat_user_profile);
        return false;
    }
    if (!$chat_user_profile["status"]) {
        my_error_log(__METHOD__, "Status is missing!", $chat_user_profile);
        return false;
    }
    if (!$chat_user_profile["wx_userid"] || strlen($chat_user_profile["wx_userid"]) < 5) {
        my_error_log(__METHOD__, "Chat_openid is missing!", $chat_user_profile);
        return false;
    }
    if (!$chat_user_profile["gz_id"] || strlen($chat_user_profile["gz_id"]) < 5) {
        my_error_log(__METHOD__, "Gz_id is missing!", $chat_user_profile);
        return false;
    }
    if (isset($chat_user_profile["dating_declaration"]) && strlen($chat_user_profile["dating_declaration"]) > 100) {
        my_error_log(__METHOD__, "Dating_declaration's length exceeded!", $chat_user_profile);
        return false;
    }
    return true;
}