The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  вход/выход  слежка  RSS
"Помогите настроить Apache+nginx"
Вариант для распечатки  
Пред. тема | След. тема 
Форум WEB технологии (nginx)
Изначальное сообщение [ Отслеживать ]

"Помогите настроить Apache+nginx"  +/
Сообщение от evgeniy123 (ok) on 13-Мрт-13, 01:54 
Здравствуйте. Нужна помощь сообщества Затеял я как уже поняли создать связку. Но никак не получается (Error 500). Если кто в теме то откликнетесь пожалуйста.Сижу уже второй день,поиски в интернете приносят свои плоды но тут загвоздка.Есть чат, расположении в папке сайте(/var/www/arrowchat).
Nginx Config (site-available):

<VirtualHost *:88>

DocumentRoot /var/www/
ServerName 21.31.21.148

<Directory "/var/www">
allow from all
</Directory>

<Directory "/usr/share/phpmyadmin">
allow from all
Options -Indexes
</Directory>

<Directory "/usr/share/phpmyadmin/js">
allow from all
</Directory>

<Directory "/var/www/arrowchat">
  Allow from all

</Directory>


</VirtualHost>

Nginx config  (site-available):
server {
   listen *:80;
   server_name 21.31.21.148;
   charset utf-8;


location = /stat {
    stub_status on;
    access_log  off;
    allow 109.18.26.6;
    deny all;
  }

location  /arrowchat/external.php {
proxy_pass http://127.0.0.1:88/arrowchat/external.php;
  }


location  = /phpmyadmin/js {
proxy_pass http://127.0.0.1:88/phpmyadmin/js;
       }


location = /phpmyadmin {
proxy_pass http://127.0.0.1:88/phpmyadmin;
  }

location = /robots.txt {
proxy_pass http://127.0.0.1:88/robots.txt;


        location ~* \.(jpg|jpeg|gif|png|ico|css|js|txt|doc|docx|xls|xlsx|ppt|pptx)$ {
        root /var/www/;


gzip on;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_comp_level 3;
gzip_types text/plain application/xml application/x-javascript text/css;


        }


location ~ ^/(protected|framework|themes/\w+/views) {
        deny  all;
    }

location ~ /\.ht {
        deny  all;
    }

}


Ответить | Правка | Cообщить модератору

Оглавление

Сообщения по теме [Сортировка по времени | RSS]


1. "Помогите настроить Apache+nginx"  +/
Сообщение от PavelR (??) on 13-Мрт-13, 11:06 
Вы знаете, что такое логи ? Попробуйте в них посмотреть.
Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

2. "Помогите настроить Apache+nginx"  +/
Сообщение от Дядя_Федор on 13-Мрт-13, 11:25 
> Вы знаете, что такое логи ? Попробуйте в них посмотреть.

На хрена? Там все равно только всякие глупости написаны. :))))
Автору - http://www.google.ru/search?hl=ru&newwindow=1&noj=1&biw=1672...


Ответить | Правка | ^ к родителю #1 | Наверх | Cообщить модератору

3. "Помогите настроить Apache+nginx"  +/
Сообщение от evgeniy123 (ok) on 13-Мрт-13, 13:46 
если бы было что нибудь конкретное - я бы исправил.
Вот логи nginx i Apache2:

Apache2(other_host):
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:02:40 +0100] "GET /arrowchat/external.php?type=djs HTTP/1.0" 500 274 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:02:40 +0100] "GET /arrowchat/external.php?type=js HTTP/1.0" 500 274 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:02:41 +0100] "POST /ts/ajax?page=1 HTTP/1.0" 200 3502 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:02:41 +0100] "POST /ts/filters HTTP/1.0" 200 6601 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:02:41 +0100] "GET /bubbles/ajax?page=1&YII_CSRF_TOKEN=2bcb4bfdae5370c5044e346111cf57155af0b58f HTTP/1.0" 200 866 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:03:59 +0100] "GET /ts/photo?id=admin HTTP/1.0" 200 538 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:03:59 +0100] "GET /ts/photo?id=demo HTTP/1.0" 200 538 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:29:50 +0100] "GET /ru HTTP/1.0" 200 10177 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:29:56 +0100] "GET /arrowchat/external.php?type=js HTTP/1.0" 500 274 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:29:56 +0100] "GET /arrowchat/external.php?type=djs HTTP/1.0" 500 274 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:29:56 +0100] "GET /arrowchat/external.php?type=css HTTP/1.0" 500 274 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:29:57 +0100] "POST /ts/ajax?page=1 HTTP/1.0" 200 3418 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:29:57 +0100] "POST /ts/filters HTTP/1.0" 200 6589 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:29:57 +0100] "GET /bubbles/ajax?page=1&YII_CSRF_TOKEN=a1eaf2c740559b9ace7f2b12885c6199262bd376 HTTP/1.0" 200 866 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:30:07 +0100] "GET /ts/photo?id=user_3 HTTP/1.0" 200 538 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:30:39 +0100] "GET /ts/photo?id=user_2 HTTP/1.0" 200 538 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:30:39 +0100] "GET /ts/photo?id=user_3 HTTP/1.0" 200 538 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
21.31.21.148:80 109.18.26.6 - - [13/Mar/2013:09:31:31 +0100] "GET /ts/photo?id=user_3 HTTP/1.0" 200 538 "http://21.31.21.148/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"

В error.log (apache2) и error.log(nginx.log)ничего не пишет

Nginx(access.log)

109.18.26.6 - - [13/Mar/2013:09:02:35 +0100] "GET /images/ts_profile_back_hover.png HTTP/1.1" 200 5409 "http://21.31.21.148/user/user/view/id/2/language/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:39 +0100] "GET / HTTP/1.1" 200 9596 "http://21.31.21.148/user/user/view/id/2/language/ru" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:39 +0100] "GET /arrowchat/external.php?type=css HTTP/1.1" 500 20 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:40 +0100] "GET /assets/261ba8ca/jquery.min.js HTTP/1.1" 304 0 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:40 +0100] "GET /arrowchat/external.php?type=djs HTTP/1.1" 500 20 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:40 +0100] "GET /arrowchat/external.php?type=js HTTP/1.1" 500 20 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:40 +0100] "GET /arrowchat/external.php?type=djs HTTP/1.1" 500 20 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:40 +0100] "GET /arrowchat/external.php?type=js HTTP/1.1" 500 20 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:42 +0100] "POST /ts/ajax?page=1 HTTP/1.1" 200 3128 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:42 +0100] "POST /ts/filters HTTP/1.1" 200 6227 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:02:43 +0100] "GET /bubbles/ajax?page=1&YII_CSRF_TOKEN=2bcb4bfdae5370c5044e346111cf57155af0b58f HTTP/1.1" 200 493 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
109.18.26.6 - - [13/Mar/2013:09:03:59 +0100] "GET /ts/photo?id=admin HTTP/1.1" 200 165 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"
109.18.26.6 - - [13/Mar/2013:09:03:59 +0100] "GET /ts/photo?id=demo HTTP/1.1" 200 165 "http://21.31.21.148/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 AlexaToolbar/alxg-3.1"

Поменял содержимое файла external.php и ошибка исчезла. По моему проблема в php

Ответить | Правка | ^ к родителю #2 | Наверх | Cообщить модератору

4. "Помогите настроить Apache+nginx"  +/
Сообщение от Дядя_Федор on 13-Мрт-13, 14:55 
> Поменял содержимое файла external.php и ошибка исчезла. По моему проблема в php

Ну правильно. :) Как раз из приведенного Вами лога и следует, что 500 ошибка вылазит как раз при обращении именно к этому скрипту (с параметрами). Ошибка ли это вообще PHP или конкретного файла - я, конечно же, не в курсе.


Ответить | Правка | ^ к родителю #3 | Наверх | Cообщить модератору

5. "Помогите настроить Apache+nginx"  +/
Сообщение от evgeniy123 (ok) on 13-Мрт-13, 14:57 
Файла скорее всего. Скажу что поменял и выложу тут для других . Может поможет кому-нибудь кто хочет arrowchat установить
Ответить | Правка | ^ к родителю #4 | Наверх | Cообщить модератору

6. "Помогите настроить Apache+nginx"  +/
Сообщение от Дядя_Федор on 14-Мрт-13, 08:32 
> Файла скорее всего. Скажу что поменял и выложу тут для других .
> Может поможет кому-нибудь кто хочет arrowchat установить

А не открывал ли этот скрипт кучу файлов при обращении к нему с указанными выше параметрами? Потому что, судя по ссылкам, которые я приводил выше - подобная ошибка (в том числе) вылазит при открытии количества файлов, бОльших, чем задано в конфиге нгинкса. Хотя... тогда бы он, наверное, писал бы это в логах.


Ответить | Правка | ^ к родителю #5 | Наверх | Cообщить модератору

7. "Помогите настроить Apache+nginx"  +/
Сообщение от evgeniy123 (ok) on 14-Мрт-13, 11:41 
буду сегодня пробивать. На обычном хостинге все сразу заработало.Сегодня буду разбираться. Спасибо за наводку. PS. Подскажите какая директива за это отвечает ?

<?php

/*
|| #################################################################### ||
|| #                             ArrowChat                            # ||
|| # ---------------------------------------------------------------- # ||
|| #    Copyright �2010-2012 ArrowSuites LLC. All Rights Reserved.    # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||
|| #   http://www.arrowchat.com | http://www.arrowchat.com/license/   # ||
|| #################################################################### ||
*/

// ########################## INCLUDE BACK-END ###########################
require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bootstrap.php');
require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'init.php');
require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'functions/functions_mobile.php');

$type = get_var('type');

// ############################ OPTIMIZATION #############################
if (!ob_start("ob_gzhandler"))
{
    ob_start();
}

// ########################### EXIT CONDITIONS ###########################
// Exit if the type is not supported
if ($type != "css" AND $type != "js" AND $type != "djs" AND $type != "pjs" AND $type != "mjs")
{
    close_session();
    exit;
}

// Exit if not logged in
if (!logged_in($userid) AND empty($guests_can_view))
{
    $not_logged_in = 1;
}
else
{
    $not_logged_in = 0;
}

// Exit if banned
if (in_array($_SERVER['REMOTE_ADDR'], $banlist) || in_array($userid, $banlist))
{
    if (!empty($_SERVER['REMOTE_ADDR']))
    {
        close_session();
        exit;
    }
}

// Exit if IE6
if (isset($_SERVER['HTTP_USER_AGENT']))
{
    if (preg_match('/^Mozilla\/4\.0 \(compatible; MSIE 6/', $_SERVER['HTTP_USER_AGENT']) != 0)
    {
        close_session();
        exit;
    }
}

// Exit if mobile browser
$mobile_device = 0;
if (mobile_device_detect())
{
    $mobile_device = 1;

    if ($enable_mobile != "1")
    {
        close_session();
        exit;
    }
}

// ############################ PROCESS THEME ############################
if (is_numeric($theme))
{
    $result = $db->execute("
            SELECT folder
            FROM arrowchat_themes
            WHERE id = '" . $db->escape_string($theme) . "'
        ");

    if ($result AND $db->count_select() > 0)
    {
        $row = $db->fetch_array($result);
        $theme = $row['folder'];
    }
    else
    {
        $theme = "new_facebook_full";
    }
}

// ############################## START CSS ##############################
// This is the primary CSS file for ArrowChat
if ($type == "css")
{
    header ("Content-type: text/css; charset: UTF-8");
    header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 3600*24*7) . ' GMT');

    require_once (dirname(__FILE__) . '/themes/' . $theme . '/css/style.css');

    close_session();
    exit;
}

// ############################## START DJS ##############################
// These are all the dynamic variables that change on each load. This does not cache
if ($type == "djs")
{
    header('Content-type: text/javascript; charset: UTF-8');
    header("Cache-Control: no-cache, must-revalidate");
    header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");

    $double_check = array();
    $i = 1;

    // Mark user as no longer idle on load
    if ($status == "away")
    {
        $db->execute("
                UPDATE arrowchat_status
                SET status = 'available'
                WHERE userid = '" . $db->escape_string($userid) . "'
            ");

        $status = "available";
    }

    // Show bar if hide bar is disabled
    if ($hide_bar_on != 1)
    {
        $hide_bar = 0;
    }

    // Show chat bar regardless of maintenance if user is admin
    if ($is_admin == 1 AND $admin_view_maintenance == 1)
    {
        $chat_maintenance = 0;
    }

    // Load another language if lang GET value is set and exists
    if (var_check('lang'))
    {
        $lang = get_var('lang');

        if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . $lang . ".php"))
        {
            include (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . $lang . ".php");
        }
    }

    // Get the language
    for ($i = 0; $i < count($language); $i++)
    {
        $settings .= 'lang[' . $i . '] = "' . $language[$i] . '";';
    }

    // Get the bar links
    for ($i=0; $i < count($trayicon); $i++)
    {
        $settings .= "barLinks[" . $i . "] = ['" . implode("', '", $trayicon[$i]) . "'];";
    }

    // Get the application bookmarks
    if (empty($apps_bookmarks) OR ($apps_bookmarks == "-1" AND empty($apps_other)))
    {
        foreach ($apps as $val)
        {
            if ($val[8] == "1")
            {
                $settings .= "apps[" . $val[0] . "] = ['" . implode("', '", $val) . "','','" . $i . "'];";
                $i++;
            }
            else
            {
                $settings .= "apps[" . $val[0] . "] = ['" . implode("', '", $val) . "','1','" . $i . "'];";
                $i++;
            }
        }
    }
    else
    {
        $bookmark_apps = explode(":", $apps_bookmarks);

        if ($apps_bookmarks != "-1")
        {
            foreach ($bookmark_apps as $val2)
            {
                if (!empty($val2))
                {
                    if (!empty($apps[$val2]))
                    {
                        $settings .= "apps[" . $val2 . "] = ['" . implode("', '", $apps[$val2]) . "','','" . $i . "'];";
                        $i++;
                    }
                }
            }
        }
    }

    // Get the applications marked as other
    if (!empty($apps_other))
    {
        $other_apps = explode(":", $apps_other);

        if ($apps_other != "-1")
        {
            foreach ($other_apps as $val2)
            {
                if (!empty($val2))
                {
                    if (!empty($apps[$val2]))
                    {
                        $settings .= "apps[" . $val2 . "] = ['" . implode("', '", $apps[$val2]) . "','1','" . $i . "'];";
                        $i++;
                    }
                }
            }
        }

        foreach ($apps as $val)
        {
            if (!in_array($val[0], $bookmark_apps) AND !in_array($val[0], $other_apps))
            {
                $settings .= "apps[" . $val[0] . "] = ['" . implode("', '", $val) . "','','" . $i . "'];";
                $i++;
            }
        }
    }

    // Get all the themes
    for ($i = 0; $i < count($themes); $i++)
    {
        $settings .= "Themes[" . $i . "] = ['" . implode("', '", $themes[$i]) . "'];";
    }

    $i=0;

    // Get all the smilies
    foreach ($smileys as $pattern => $result)
    {
        $settings .= "Smiley[" . $i . "] = ['" . $result . "','" . $pattern . "'];";
        $i++;
    }

    // Put all the blocked users into an array
    $block_chats_unserialized = unserialize($block_chats);
    if (!is_array($block_chats_unserialized)) $block_chats_unserialized = array();
    $i=0;
    foreach ($block_chats_unserialized as $id)
    {
        $settings .= "blockList['" . $id . "'] = ['" . $id . "'];";
        $i++;
    }

    // Get all the chat windows and user details that are not in focus
    for ($i = 0; $i < count($unfocus_chat) - 1; $i++)
    {
        if (!in_array($unfocus_chat[$i], $double_check) AND !empty($unfocus_chat[$i]))
        {
            // Start Receive User Details
            if (check_if_guest($unfocus_chat[$i]))
            {
                $sql = get_guest_details($unfocus_chat[$i]);
                $result = $db->execute($sql);
            }
            else
            {
                $sql = get_user_details($unfocus_chat[$i]);
                $result = $db->execute($sql);
            }

            if ($result AND $db->count_select() > 0)
            {
                $chat = $db->fetch_array($result);

                if (((time()-$chat['lastactivity']) < $online_timeout) AND $chat['status'] != 'invisible' AND $chat['status'] != 'offline')
                {
                    if ($chat['status'] != 'busy' AND $chat['status'] != 'away')
                    {
                        $chat['status'] = 'available';
                    }
                }
                else
                {
                    $chat['status'] = 'offline';
                }

                if (check_if_guest($unfocus_chat[$i]))
                {

                    $avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif";
                    $chat['username'] = $language[83] . " " . substr($unfocus_chat[$i], 1);
                }
                else
                {
                    $link = get_link($chat['link'], $chat['userid']);

                    $avatar = get_avatar($chat['avatar'], $chat['userid']);
                }
            }
            // End Receive User Details

            $settings .= 'unfocus_chat[' . $i . '] = "' . $unfocus_chat[$i] . '";';
            $settings .= 'uc_name["' . $unfocus_chat[$i] . '"] = "' . $db->escape_string(strip_tags($chat['username'])) . '";';
            $settings .= 'uc_status["' . $unfocus_chat[$i] . '"] = "' . $chat['status'] . '";';
            $settings .= 'uc_avatar["' . $unfocus_chat[$i] . '"] = "' . $avatar . '";';
            $settings .= 'uc_link["' . $unfocus_chat[$i] . '"] = "' . $link . '";';
            $double_check[] = $unfocus_chat[$i];
        }
    }

    // Get the logged in user's avatar
    if (check_if_guest($userid))
    {
        $user_username = $language[83] . " " . substr($userid, 1);
        $user_avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif";
        $user_is_guest = 1;
    }
    else
    {
        $user_is_guest = 0;
        $user_username = get_username($userid);

        $sql = get_user_details($userid);
        $result = $db->execute($sql);

        if ($result AND $db->count_select() > 0)
        {
            $row = $db->fetch_array($result);
            $user_avatar = $row['avatar'];
            $user_avatar = get_avatar($user_avatar, $userid);
        }
    }

    // Get all the rest of the general settings
    $settings .= 'var T=0,';
    $settings .= 'u_theme="' . $theme . '",';
    $settings .= 'u_name="' . $db->escape_string(strip_tags($user_username)) . '",';
    $settings .= 'u_id="' . $userid . '",';
    $settings .= 'u_hide_bar="' . $hide_bar . '",';
    $settings .= 'u_blist_open="' . $window_open . '",';
    $settings .= 'u_sounds="' . $play_sound . '",';
    $settings .= 'u_chatroom_open="' . $chatroom_window . '",';
    $settings .= 'u_chatroom_stay="' . $chatroom_stay . '",';
    $settings .= 'u_chatroom_block_chats="' . $chatroom_block_chats . '",';
    $settings .= 'u_status="' . $status . '",';
    $settings .= 'u_no_avatars="' . $only_names . '",';
    $settings .= 'u_hash_id="' . $hash_id . '",';
    $settings .= 'u_chat_open="' . $focus_chat . '",';
    $settings .= 'u_chatroom_sound="' . $chatroom_sound . '",';
    $settings .= 'u_apps_open="' . $apps_open . '",';
    $settings .= 'u_logged_in="' . $not_logged_in . '",';
    $settings .= 'u_popout_time="' . $popout . '",';
    $settings .= 'u_avatar="' . $user_avatar . '",';
    $settings .= 'u_is_guest="' . $user_is_guest . '",';
    $settings .= 'c_chatrooms="' . $chatrooms_on . '",';
    $settings .= 'c_chatroom_auto_join="' . $chatroom_auto_join . '",';
    $settings .= 'c_guests_apps="' . $applications_guests . '",';
    $settings .= 'c_video_chat="' . $video_chat . '",';
    $settings .= 'c_theme_change="' . $theme_change_on . '",';
    $settings .= 'c_notifications="' . $notifications_on . '",';
    $settings .= 'c_chat_maintenance="' . $chat_maintenance . '",';
    $settings .= 'c_guests_login_msg="' . $guests_can_view . '",';
    $settings .= 'c_search_min="' . $search_number . '",';
    $settings .= 'c_us_time="' . $us_time . '",';
    $settings .= 'c_file_transfer="' . $file_transfer_on . '",';
    $settings .= 'c_width_blist="' . $width_buddy_list . '",';
    $settings .= 'c_width_chatroom="' . $width_chatrooms . '",';
    $settings .= 'c_width_apps="' . $width_applications . '",';
    $settings .= 'c_hide_bar_on="' . $hide_bar_on . '",';
    $settings .= 'c_heart_beat="' . $heart_beat . '",';
    $settings .= 'c_list_heart_beat="' . $buddy_list_heart_beat . '",';
    $settings .= 'c_user_chatrooms="' . $user_chatrooms . '",';
    $settings .= 'c_disable_avatars="' . $disable_avatars . '",';
    $settings .= 'c_disable_arrowchat="' . $disable_arrowchat . '",';
    $settings .= 'c_show_full_name="' . $show_full_username . '",';
    $settings .= 'c_bar_fixed="' . $bar_fixed . '",';
    $settings .= 'c_bar_fixed_alignment="' . $bar_fixed_alignment . '",';
    $settings .= 'c_bar_fixed_width="' . $bar_fixed_width . '",';
    $settings .= 'c_bar_padding="' . $bar_padding . '",';
    $settings .= 'c_applications_on="' . $applications_on . '",';
    $settings .= 'c_no_apps_menu="' . $hide_applications_menu . '",';
    $settings .= 'c_popout_on="' . $popout_chat_on . '",';
    $settings .= 'c_push_engine="' . $push_on . '",';
    $settings .= 'c_push_publish="' . $push_publish . '",';
    $settings .= 'c_push_subscribe="' . $push_subscribe . '",';
    $settings .= 'c_mobile_device="' . $mobile_device . '",';
    $settings .= 'c_links_right="' . $show_bar_links_right . '",';
    $settings .= 'c_chat_animations="' . $enable_chat_animations . '",';
    $settings .= 'k="' . $base_url . '";';

    require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'js/arrowchat_dynamic.js');

    close_session();
    exit;
}

// ############################## START JS ###############################
// These are the core JavaScript files that will cache
if ($type == "js")
{
    header('Content-type: text/javascript; charset: UTF-8');
    header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 3600*24*7) . ' GMT');

    // Inclue Template Files
    $file_bar_hide_tab                     = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/bar_hide_tab.php"));
    $file_bar_show_tab                     = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/bar_show_tab.php"));
    $file_applications_bookmarks_tab    = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/applications_bookmarks_tab.php"));
    $file_applications_bookmarks_window    = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/applications_bookmarks_window.php"));
    $file_applications_bookmarks_list    = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/applications_bookmarks_list.php"));
    $file_applications_tab                = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/applications_tab.php"));
    $file_applications_window            = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/applications_window.php"));
    $file_notifications_tab                = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/notifications_tab.php"));
    $file_notifications_window            = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/notifications_window.php"));
    $file_chat_tab                        = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chat_tab.php"));
    $file_chat_window                    = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chat_window.php"));
    $file_buddylist_tab                    = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/buddylist_tab.php"));
    $file_buddylist_window                = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/buddylist_window.php"));
    $file_maintenance_tab                = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/maintenance_tab.php"));
    $file_announcements_display            = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/announcements_display.php"));
    $file_chatrooms_tab                    = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chatrooms_tab.php"));
    $file_chatrooms_window                = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chatrooms_window.php"));
    $file_chatrooms_room                = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chatrooms_room.php"));

    require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'js/arrowchat_libraries.js');

    echo "\n\n//**********Templates**********\n";
    require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'js/arrowchat_templates.js');

    echo "\n\n// **********Main Script Start**********\n// \n";
    require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'js/arrowchat_core.js');

    echo "\n\n// **********Applications Pre-loading Start**********\n";
    foreach ($apps as $val)
    {
        if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_APPLICATIONS . DIRECTORY_SEPARATOR . $val[2] . DIRECTORY_SEPARATOR . "preload.php"))
        {
            include_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_APPLICATIONS . DIRECTORY_SEPARATOR . $val[2] . DIRECTORY_SEPARATOR . "preload.php");
        }
    }

    echo "\n/* ArrowChat Version: " . ARROWCHAT_VERSION . " */";

    close_session();
    exit;
}

// ############################## START POPOUT JS ###############################
// This includes all the files required for the popout chat windows
if ($type == "pjs")
{
    header('Content-type: text/javascript; charset: UTF-8');
    header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 3600*24*7) . ' GMT');

    require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_PUBLIC . DIRECTORY_SEPARATOR . 'popout/js/popout_libraries.js');

    echo "\n\n// **********Main Script Start**********\n// \n";
    require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_PUBLIC . DIRECTORY_SEPARATOR . 'popout/js/popout_core.js');

    close_session();
    exit;
}

// ############################## START MOBILE JS ###############################
// This includes all the files required for the mobile chat
if ($type == "mjs")
{
    header('Content-type: text/javascript; charset: UTF-8');
    header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 3600*24*7) . ' GMT');

    require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_PUBLIC . DIRECTORY_SEPARATOR . 'mobile/includes/js/mobile_libraries.js');

    echo "\n\n// **********Main Script Start**********\n// \n";
    require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_PUBLIC . DIRECTORY_SEPARATOR . 'mobile/includes/js/mobile_core.js');

    close_session();
    exit;
}

?>

Ответить | Правка | ^ к родителю #6 | Наверх | Cообщить модератору

8. "Помогите настроить Apache+nginx"  +/
Сообщение от evgeniy123 (ok) on 14-Мрт-13, 12:19 
Был невнимательным и не залил папку с языками. при require_once совершалась Error 500
Ответить | Правка | ^ к родителю #6 | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2025 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру