Skip to content

Error when accessing some internal ajax uri #382

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

Closed
SoulRaven opened this issue Jan 7, 2014 · 9 comments
Closed

Error when accessing some internal ajax uri #382

SoulRaven opened this issue Jan 7, 2014 · 9 comments
Labels

Comments

@SoulRaven
Copy link

i get 400(Bad Request) when app call:

  • scp/ajax.php/config/scp
  • scp/ajax.php/users/lookup/form (when "New Ticket" button is clicked)

any ideea why? and how i manage to resolve this?

i am using: osTicket (1.8-git)

@greezybacon
Copy link
Contributor

Does it work for other URIs? Would you mind adding a var_dump to the bottom of scp/ajax.php just above the call to resolve, like this:

var_dump($_SERVER, $ost->get_path_info());
print $dispatcher->resolve($ost->get_path_info());

And add a comment with the output

@SoulRaven
Copy link
Author

i have manage to resolve the issue, with nginx config, but now, i get another related error,

when is called: scp/ajax.php/users?q=some 400 (Bad Request)

and inside is: "Query argument is required"

any ideea how to fix this?

@Hamsteren
Copy link
Contributor

nginx isnt supported for osticket. But you might take a look here: osTicket/osTicket-1.7#538
And see if that might help you in the right direction.

@ussenterprise1701
Copy link

Hi, I have the problem with the white bar in IIS 7.5 Windows Server 2008 R2. In case anyone searches. I'm using 1.8 all browsers display the white bar. Nothing is revealed with the developer tools in any broswer. If I clidk to open in another tab, I get "No Input File is Specified."

@greezybacon
Copy link
Contributor

This thread is about nginx. That said, what is the "white bar"? Sorry for being such a noob

@ntozier
Copy link
Contributor

ntozier commented Feb 27, 2014

@greezybacon "white bar" is what people have come to call the empty ajax pop up (usually from user selection) as seen in the image in this thread: http://osticket.com/forum/discussion/75497/1-8-0-1-creating-manual-ticket-show-blank-white-bar

@hmert
Copy link

hmert commented Jan 24, 2015

This works for me now.

#844 (comment)

@java2dev
Copy link

@SoulRaven How did you resolve the first issue regarding ajax.php/config/scp and user/form 404 bad request? I have the same issue and the ajax.php/config/scp is generated in loop.
Thanks in advance.

@java2dev
Copy link

java2dev commented Aug 25, 2016

This is my conf

`server {
listen 127.0.0.1:86
;
server_name localhost;

root   var/osticket/upload;
index  index.php index.html index.htm;

log_not_found off;
charset utf-8;

location ~ /\. {deny all;}

   set $path_info "";

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

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

if ($request_uri ~ "^/api(/[^\?]+)") {
set $path_info $1;
}

location ~ ^/api/(?:tickets|tasks).*$ {
    try_files $uri $uri/ /api/http.php?$query_string;
}

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

#location ~ ^/ajax.php/(.)$ {
#try_files $uri $uri/ /ajax.php;
#}
#location ~ ^/scp/ajax.php/(.)$ {
#try_files $uri $uri/ /scp/ajax.php;
#}

location ~ ^/scp/ajax.php/.$ {
try_files $uri $uri/ /scp/ajax.php?$query_string;
}
location ~ ^/ajax.php/.
$ {
try_files $uri $uri/ /ajax.php?$query_string;
}

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

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:8686;

#fastcgi_split_path_info ^(.+.php)(/.+)$;
#try_files $uri =404;
#fastcgi_index index.php;
#fastcgi_param SCRIPT_NAME $fastcgi_script_name;

}

}
`

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

8 participants