Parsing error using directives with aliases are not allowed people playground


  • пожаловаться
  • скопировать ссылку


Pereku
У меня тоже самое!

  • пожаловаться
  • скопировать ссылку


Pereku
Никак, это ошибка мододела, увы придётся ждать обновления самого мода.

  • пожаловаться
  • скопировать ссылку


Pereku
чел в Settings (настройки) в самый низ листай, там есть херня типо «Restrict suspended mods» или около того.
А если и это не поможет, значит полный капец, скорее всего ошибка кода на новые версии, но у меня все норм хотя моды старые а я на новой версии

  • пожаловаться
  • скопировать ссылку


IvanAsPolice_YTe1
спасибо большое

  • пожаловаться
  • скопировать ссылку


Попробуй переустановить моды. Если не помогло значит в модах отсутствуют нужные файлы

  • пожаловаться
  • скопировать ссылку


ТЫ с какого сайта скачивал?

  • пожаловаться
  • скопировать ссылку


DendyGamer Lines
с любых скачиваю не помогает

  • пожаловаться
  • скопировать ссылку


у тебя лицензия ?

  • пожаловаться
  • скопировать ссылку



Ребят: Даже не пытайтесь исправлять ошибки в модах, если вы не мододел. Если есть ошибка, значит мод предназначен на другую версию, т.к автор не переписал мод под новую

  • пожаловаться
  • скопировать ссылку


Моды для старых версий на новых могут плохо раьотать или вобще не работать а сейчас есть разные разные версии игры на которых может ничего не работать

  • пожаловаться
  • скопировать ссылку


в папке win64 есть файл config.txt там последнюю строку с «MaxModCompilationTime»: будет стоять 10. поменяйте на 20 если не помогло то на 10 больше

  • пожаловаться
  • скопировать ссылку


matvey2229
где эта папка?

  • пожаловаться
  • скопировать ссылку


Modding your game cause bugs loss of performance and other issues You install and use mods at your own risk в People Playground ПОМОГИТЕ У МЕНЯ ВЕРСИЯ НОВАЯ

  • пожаловаться
  • скопировать ссылку


Либо мод уже не работает на данной версии, либо вы что-то сделали в коде мода.

  • пожаловаться
  • скопировать ссылку


код модов не рабочий.

  • пожаловаться
  • скопировать ссылку


если ERROR то перезагрузите комп

  • пожаловаться
  • скопировать ссылку


klima009
не робит

  • пожаловаться
  • скопировать ссылку


помогите у меня лицуха

  • пожаловаться
  • скопировать ссылку


если винда 7, то скачай нужный пакет обновлений

  • пожаловаться
  • скопировать ссылку


The_ICC
а какой?

  • пожаловаться
  • скопировать ссылку


The_ICC
какие именно?

  • пожаловаться
  • скопировать ссылку


Pereku
Моё предположение:
1. Неправильно установлен мод.
2. Не подходящая версия.

  • пожаловаться
  • скопировать ссылку


Помогите решить проблему

  • пожаловаться
  • скопировать ссылку

My goal is to cache assets with query strings with a certain policy and assets that don’t have query strings with another. Unfortunately, nginx ignores query strings in location blocks, so I’m stuck using the if/error_page strategy helpfully suggested here:

location /static/ {
    alias /home/client/public/;
    error_page 418 = @long_lived_caching_strategy;

    if ($query_string = "example=querystring") {
      return 418;
    }
  }

  location @long_lived_caching_strategy {
    etag off;
    add_header Cache-Control "public";
    expires 1y;
  }
}

However, my error logs show me that in the above configuration, the alias directive is ignored. But when I try to move the alias directive into the @long_lived_caching_strategy, nginx tells me that alias isn’t allowed there!

What are my options for a workaround?

Alternatively, is there another way to set etag and add_header directives differently depending on whether the URL has a query string?

Community's user avatar

asked Apr 9, 2017 at 2:17

Jason Benn's user avatar

2

I found an easier solution to my problem thanks to this thread. My goal was really to conditionally add caching-related headers based on whether or not there was a query string, and using if to set strings turned out to be the easiest way to achieve that. Here’s my final configuration:

  location /static {
    alias /usr/local/etc/nginx/relative-paths/picasso/client/public;

    # If an asset has a query string, it's probably using that query string for cache busting purposes.
    set $long_lived_caching_strategy 0;
    if ($query_string) { set $long_lived_caching_strategy 1; }

    if ($long_lived_caching_strategy = 0) {
      # Cache strategy: caches can store this but must revalidate the content with the server using ETags before serving a 304 Not Modified.
      set $cache_control "no-cache";
    }

    if ($long_lived_caching_strategy = 1) {
      # Cache strategy: proxy caches can store this content, and it's valid for a long time.
      set $cache_control "public, max-age=86400, s-maxage=86400";  # 1 day in seconds
    }

    add_header Cache-Control $cache_control;

    # Some types of assets, even when requested with query params, are probably not going to change and should be cacheable by anyone for a long time.
    location ~* .(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|ttf)$ {
      add_header Cache-Control "public max-age=86400, s-maxage=86400";
      etag off;
      access_log off;
    }
  }

Community's user avatar

answered Apr 9, 2017 at 16:37

Jason Benn's user avatar

Jason BennJason Benn

731 gold badge2 silver badges7 bronze badges

You can do this manually, if you have the headers_more module compiled into Nginx, for another way to make add_header available. Some distributions will include this, you may have to build Nginx from source — which is surprisingly quick and easy.

add_header Cache-Control "public, max-age=691200, s-maxage=691200";

You don’t need to use the expires header — reason is here.

Community's user avatar

answered Apr 9, 2017 at 2:48

Tim's user avatar

TimTim

31.1k7 gold badges49 silver badges77 bronze badges

2

За последние 24 часа нас посетили 11425 программистов и 1107 роботов. Сейчас ищут 183 программиста …


  1. Iveria

    С нами с:
    16 июн 2017
    Сообщения:
    5
    Симпатии:
    2

    Добрый день!
    Не могу найти ошибку в коде

    1.        return new EspoCoreFileStorageManager(
    2.                    $this->get(‘metadata’)->get([‘app’, ‘fileStorage’, ‘implementationClassNameMap’]),

    Пишет Parse error: syntax error, unexpected ‘[‘, expecting ‘)’

    Спасибо!


  2. Deonis

    С нами с:
    15 фев 2013
    Сообщения:
    1.523
    Симпатии:
    504

    @Iveria, у вас версия PHP ниже 5.4, а короткий синтаксис объявления массивов [ ] поддерживается, начиная именно с этой версии. Или же обновите версию PHP, что крайне желательно или же используйте обычный синтаксис — array()

    1. $this->get(‘metadata’)->get(array(‘app’, ‘fileStorage’, ‘implementationClassNameMap’))


  3. Iveria

    С нами с:
    16 июн 2017
    Сообщения:
    5
    Симпатии:
    2

    Ага, он самый. Стоит ли вообще с ним возиться, или есть хостинг попроще для новичка?


  4. mkramer

    Команда форума
    Модератор

    С нами с:
    20 июн 2012
    Сообщения:
    8.493
    Симпатии:
    1.732

    Не стоит. Основные варианты:

    • Если хочется локалку и просто, то современную сборку (XAMPP, Open Server и др.). PHP должен быть минимум 7.1 (в крайнем случае 7.0)
    • Если хочется локалку чуть более интересно, то можно самому поднять стек на windows (я, кстати, по началу, так и делал). PHP 7.1, mysql 5.7, apache 2.4 или ngnix (не знаю, какая последняя версия)
    • Если хочется локалку, но чтоб как на хостинге — поднять Linux в виртуальной машине, настроить стек там.
    • Ну или взять хостинг. Я, к примеру, купил на ihor.ru за 250 рублей в месяц VPS специально для разработки, и поиграться. Но на локалке у меня тоже есть, XAMPP


  5. Алекс8

    Алекс8
    Активный пользователь

    С нами с:
    18 май 2017
    Сообщения:
    1.730
    Симпатии:
    359

    у меня на сервере до сих пор стоит 5.4.)) на нем несколько форумов)) уже даже и обновления для форума вышло что бы он поддерживал mysqli и php7))) я уже и многим клиентам своим обновил движок и пофиксил проблемы с пхп7)) а сам никак не переведу свои проекты)


  6. Fell-x27

    Команда форума
    Модератор

    С нами с:
    25 июл 2013
    Сообщения:
    12.162
    Симпатии:
    1.770
    Адрес:
    :сердА

    Имхо, для разработки хостинг не нужен, когда можно намутить локальный сервер. С локальным удобнее же в разы.
    — Добавлено —

    Hostens! Дешевле и сочнее.


  7. Iveria

    С нами с:
    16 июн 2017
    Сообщения:
    5
    Симпатии:
    2

    @Fell-x27, спасибо за подробный ответ! Установила XAMPP — все работает, вроде.


  8. Iveria

    С нами с:
    16 июн 2017
    Сообщения:
    5
    Симпатии:
    2

I recently converted a website project to a web application project in Visual Studio 2008. I finally got it to compile, and the first page (the login screen) displayed as normal, but then when it redirected to the Default.aspx page, I received an error:

Parser Error Message: 'SOME.NAMESPACE.MyApplicationName.WebApplication._Default' is not allowed here because it does not extend class 'System.Web.UI.Page'.

All of my pages inherit from a class called «BasePage» which extends System.Web.UI.Page. Obviously the problem isn’t with that class because the login.aspx page displays without error, and it also inherits from that basepage.

All the pages on the site, including the login page, are children of a masterpage.

After some testing, I have determined what it is that causes the error (although I don’t know WHY it does it).

On all the pages where I have the following tag, the error does NOT occur.

<%@ MasterType VirtualPath="~/MasterPages/MainMaster.master" %>

On all the pages that do not contain that line, the error DOES occur. This is throughout the entire application. I have the tag only on pages where there has been a need to reference controls on the MasterPage.

So, I thought I would just add that line to all my pages and be done with it. But when I add that line, I get a compile error:
‘object’ does not contain a definition for ‘Master’

This error is coming from the designer.cs file associated with the ASPX page that I have added the «MasterType» declaration to.

I’ve forced a rebuild of the designer file, but that doesn’t change anything. I compared the content of the Master reference in the designer files between the login.aspx (working) and the default.aspx (not working) but they are exactly the same.

Since I’d really like to get it to work without having to add the «MasterType» declaration to everypage, and since that «fix» isn’t working anyway, does anyone know why not having the «MasterType» declaration on an aspx file causes the parser error? Is there a fix for this?

Example Code:

Here is the code for login.aspx and login.aspx.cs which is working without error:

Login.aspx

    <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MainMaster.master" AutoEventWireup="true" Inherits="SOME.NAMESPACE.MyApplicationName.WebApplication.Login" Codebehind="Login.aspx.cs" %>
<%@ MasterType VirtualPath="~/MasterPages/MainMaster.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
    <table>
    <tr>
        <td>
            <asp:UpdatePanel ID="upLogin" runat="server">
                <ContentTemplate>
                    <asp:Panel ID="Panel1" runat="server" DefaultButton="Login1$LoginButton">
                        <asp:Login ID="Login1" runat="server" LoginButtonStyle-CssClass="button" 
                        TextBoxStyle-CssClass="textBoxRequired" 
                        TitleTextStyle-CssClass="loginTitle"  >
                        </asp:Login>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdatePanel ID="upPasswordRecovery" runat="server">
                <ContentTemplate>
                <asp:PasswordRecovery ID="PasswordRecovery1" runat="server" 
                SubmitButtonStyle-CssClass="button" TitleTextStyle-CssClass="loginTitle" 
                SuccessText="Your new password has been sent to you."
                UserNameInstructionText="Enter your User name to reset your password." />
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
    </tr>
    </table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SideBarPlaceHolder" Runat="Server">
    <h2>Login</h2>
    <asp:Button ID="btnCreateAccount" runat="server" Text="Create Account" OnClick="btnCreateAccount_Click" CausesValidation="false" />
</asp:Content>

Login.aspx.cs

    using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SOME.NAMESPACE.MyApplicationName.WebApplication;
using SOME.NAMESPACE.MyApplicationName.Bll;

namespace SOME.NAMESPACE.MyApplicationName.WebApplication
{
    public partial class Login : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Login1.Focus();
        }
        protected void btnCreateAccount_Click(object sender, EventArgs e)
        {
            Page.Response.Redirect("~/CreateUser/default.aspx");
        }
    } 
}

Here is the code for default.aspx and default.aspx.cs which is throwing the parser error when viewed in a web browser:

Default.aspx

    <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MainMaster.master" AutoEventWireup="True" Inherits="SOME.NAMESPACE.MyApplicationName.WebApplication._Default" Codebehind="Default.aspx.cs" %>
<%@ MasterType VirtualPath="~/MasterPages/MainMaster.master" %>
<asp:Content ID="MainContent" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
<div class="post">
    <h2 class="title">Announcements</h2>
    <p class="meta">Posted by Amanda Myer on December 15, 2009 at 10:55 AM</p>
    <div class="entry">
        <p>The MyApplicationName CMDB will be down for maintenance from 5:30 PM until 6:30 PM on Wednesday, December 15, 2009.</p>
    </div>
    <p class="meta">Posted by Amanda Myer on December 01, 2009 at 1:23 PM</p>
    <div class="entry">
        <p>The MyApplicationName CMDB is officially live and ready for use!</p>
    </div>
</div>
</asp:Content>
<asp:Content ID="SideBarContent" ContentPlaceHolderID="SideBarPlaceHolder" Runat="Server">
    <img src="images/MyApplicationName.jpg" alt="MyApplicationName Gremlin" width="250"/>
</asp:Content>

Default.aspx.cs

    using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using SOME.NAMESPACE.MyApplicationName.Bll;
using SOME.NAMESPACE.MyApplicationName.WebApplication;

public partial class _Default : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}

Thanks!

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Parsing error unexpected token expected react
  • Passive down error during connection collision
  • Passat cc не заводится ошибок нет
  • Parsing error unexpected character eslint
  • Passat b6 ошибка p0133

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии