Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an organisation in 1.9 #844

Closed
jasonflk opened this issue May 3, 2014 · 13 comments
Closed

Adding an organisation in 1.9 #844

jasonflk opened this issue May 3, 2014 · 13 comments
Labels

Comments

@jasonflk
Copy link

jasonflk commented May 3, 2014

Using both IE10 and FF29.0 I'm unable to bring up the add organization box in the admin panel users tab.

@andor-pierdelacabeza
Copy link

When I click on "Add organization" it shows up a blank box.
captura de pantalla 2014-05-05 a la s 10 28 55

@greezybacon
Copy link
Contributor

Can you check in the browser's developer tools to see if your getting HTTP 404 or HTTP 400 from the request to fetch the content?

@andor-pierdelacabeza
Copy link

I get a 500 for infinite loop when redirecting this two links:
http://support.kanteron.com/scp/ajax.php/config/scp
http://support.kanteron.com/scp/ajax.php/orgs/add

2014/05/05 10:02:00 [error] 8208#0: *271080 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 95.121.249.61, server: support.****.com, request: "GET /scp/ajax.php/orgs/add HTTP/1.1", host: "support.****.com", referrer: "http://support.****.com/scp/orgs.php"

That's probably a misconfiguration on nginx redirects. I've used a default php install, but I'm looking on detail on how to fix that...

@andor-pierdelacabeza
Copy link

Ok, I've fixed it following this: http://wiki.nginx.org/OSTicket
But now I have an error 400 Bad Request :(

@andor-pierdelacabeza
Copy link

Finally got it fixed following that same link. I just had to be sure the proper parameters where being sent to ajax.php... This was the essential part of the config:

        location ~ \.php$ {
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
            fastcgi_param  PATH_INFO    $path_info;
            fastcgi_pass   127.0.0.1:8888;
        }

(Knowing that I'm using a different cgi method, php-pm, and I had to change the fastcgi_pass...)
Sorry to be this annoying...

@bateller
Copy link

The key for me (and I'm sure others) was adding the PATH_INFO pass to .php files executed by fastcgi/php-fpm. Because the .php execution section of my nginx.conf (and probably most others) isn't right next to my osTicket specific config settings... the change wasn't immediately obvious.

Key part of code:

fastcgi_param PATH_INFO $path_info;

@BentHaase
Copy link

So my nginx file currently looks like this:

server {
    listen  80;
        server_name someurl.com;

    root /var/www/SOMEDIR;
    index index.php index.html index.htm;

    client_max_body_size 1G;
    keepalive_timeout 70;

    set $path_info "";
    # Requests to /api/* need their PATH_INFO set, this does that
    if ($request_uri ~ "^/support/api(/[^\?]+)") {
        set $path_info $1;
    }

    # /api/*.* should be handled by /api/http.php if the requested file does not exist
    location ~ ^/support/api/(tickets|tasks)(.*)$ {
        try_files $uri $uri/ /support/api/http.php;
    }

    # /scp/ajax.php needs PATH_INFO too, possibly more files need it hence the .*\.php
    if ($request_uri ~ "^/support/scp/.*\.php(/[^\?]+)") {
        set $path_info $1;
    }

    # Make sure requests to /scp/ajax.php/some/path get handled by ajax.php
    location ~ ^/support/scp/ajax.php/(.*)$ {
        try_files $uri $uri/ /support/scp/ajax.php;
    }


    fastcgi_read_timeout 300;

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param  PATH_INFO    $path_info;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
    }

    location ~ /\. {
        deny all;
    }
}

But I still cant get the ajax windows working. Is there another fix I need to apply?

The error message I get in my nginx -> error.log looks like this:

[error] 28983#0: *53 open() "/var/www/SOMEDIR/scp/ajax.php/tickets/status/delete" failed (20: Not a directory), client: SOMEIP, server: someurl.com, request: "GET /scp/ajax.php/tickets/status/delete?count=1&_uid=1439564225485 HTTP/1.1", host: "someurl.com", referrer: "http://someurl.com/scp/"

@guidokuehler
Copy link

We us osTicket successfull with NGINX
Our Config is followed

osTicket-Version v1.9.9-1-gbe2f138 (be2f138)
Server-Software nginx/1.8.0
MySQL-Version 5.5.44
PHP-Version 5.6.4-4ubuntu6.2

Our Nginx-Config is followed for HTTP and HTTPS:


server {
    server_name my.domain.com;
    listen 80;
    listen [::]:80;
    access_log /var/log/nginx/my.domain.com_access.log;
    error_log /var/log/nginx/my.domain.com_error.log;
    # set client body size to 20mb
    client_max_body_size 20M;
    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;
    add_header cache-control    "public, max-age=1800";
    root /var/www/my.domain.com/support;
    index index.php index.html index.htm;
        set $path_info "";
 
        location ~ /include {
            deny all;
            return 403;
        }
 
        if ($request_uri ~ "^/api(/[^\?]+)") {
        set $path_info $1;
    }
 
    location ~ ^/api/(?:tickets|tasks).*$ {
        try_files $uri $uri/ /api/http.php?$query_string;
    }
 
    if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
        set $path_info $1;
    }
 
    location ~ ^/scp/ajax.php/.*$ {
        try_files $uri $uri/ /scp/ajax.php?$query_string;
    }
 
        location / {
            try_files $uri $uri/ index.php;
        }
 
location ~ ^/ajax.php/.*$ {
    try_files $uri $uri/ /ajax.php?$query_string;
}
    location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
    location /nginx_status {
    stub_status on;
    access_log off;
    allow ::1;
    deny all;
    }
}
server {
    server_name my.domain.com;
    listen 443 ssl spdy;
    ssl on;
    ssl_certificate /etc/nginx/ssl/my.domain.com.pem;
    ssl_certificate_key /etc/nginx/ssl/my.domain.com.pem;
    ssl_ciphers 'AES128+EECDH'; #:AES128+EDH';
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_session_cache shared:SSL:10m;
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_trusted_certificate /etc/nginx/ssl/gd/full_chain.pem;
    ssl_prefer_server_ciphers on;
    access_log /var/log/nginx/my.domain.com_access.log;
    error_log /var/log/nginx/my.domain.com_error.log;
    # set client body size to 20mb
    client_max_body_size 20M;
    # Add HSTS
    add_header Strict-Transport-Security "max-age=15768000; includeSubdomains";
    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;
    add_header cache-control    "public, max-age=1800";
    root /var/www/my.domain.com/support;
    index index.php index.html index.htm;
        set $path_info "";
 
        location ~ /include {
            deny all;
            return 403;
        }
 
        if ($request_uri ~ "^/api(/[^\?]+)") {
        set $path_info $1;
    }
 
    location ~ ^/api/(?:tickets|tasks).*$ {
        try_files $uri $uri/ /api/http.php?$query_string;
    }
 
    if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
        set $path_info $1;
    }
 
    location ~ ^/scp/ajax.php/.*$ {
        try_files $uri $uri/ /scp/ajax.php?$query_string;
    }
 
        location / {
            try_files $uri $uri/ index.php;
        }
location ~ ^/ajax.php/.*$ {
    try_files $uri $uri/ /ajax.php?$query_string;
}
 
    location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
}

@infectormp
Copy link

@guidokuehler canned responce is work for you?

@guidokuehler
Copy link

Canned Response work but not with properties from custom Lists!!!

@mlipok
Copy link

mlipok commented Feb 8, 2018

To OP please veryfi whether current version stil have this issue.

@andor-pierdelacabeza
Copy link

In my case (first commenter), I just fixed it with some changes on nginx.
Regarding OP, he/she never answered, and I don't see any activity on his profile since the opening of this ticket. I wouldn't expect any answer. I would close it.

@cheasingh
Copy link

problem solved for me when i comment snippets/fastcgi-php.conf on version 1.10.7
location ~ \.php$ { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; #include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.2-fpm.sock; fastcgi_param PATH_INFO $path_info; #fastcgi_pass 127.0.0.1:8888; }

@JediKev JediKev closed this as completed Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants