Php5-fpm gives unknown script error

Hello list,
I’m pretty new to Nginx, but I wanted to give it a shot. I like how it
is
configured–it makes more sense to me than Apache. However, I’m having a
hard time with getting php. I’m running on Debian 8, and Nginx was
installed with apt-get. I’ve installed php5-fmp, and can view php files
in
a browser.

The problem is that, during the installation of OSTicket, I got an
error. I
looked at Nginx’s log, and found a FastCGI error:

FastCGI sent an stderr: unknown script while reading response header
from
upstream

From what I’ve dug up thus far, this indicates a failure to resolve the
path to a php script. My suspicion is that OSTicket is calling a script
in
a folder somewhere, and that path isn’t resolving. My location for php
files looks like this:

server {
#all the usual, much (but none of the SSL stuff) copied from

osTicket | NGINX

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

I don’t claim to understand what all this stuff is doing, but I hoped
this
might work. I know OSTicket doesn’t officially support Nginx yet, but
since
other people are having this problem for all kinds of scripts and
situations, I thought maybe it was a more general problem I’d be able to
fix. If anyone has suggestions, please let me know. If you need to see
more
configuration files, I can try to do that. The setup here is awkward
(SSH
from Windows to Debian, with no SCP support currently and no way to copy
from or to the SSH session). I can copy files, but it’s a bit of a
process.
Anyway, thanks in advance for any ideas.

On Mon, May 09, 2016 at 05:52:47PM -0400, Alex H. wrote:

Hi there,

without knowing anything about OSTicket…

FastCGI sent an stderr: unknown script while reading response header from
upstream

That usually means that the fastcgi server could not find the file that
it was looking for, based on what nginx told it.

So: what http request do you make?

What (php) file do you want the fastcgi server to use for this request?

The setup here is awkward (SSH
from Windows to Debian, with no SCP support currently and no way to copy
from or to the SSH session). I can copy files, but it’s a bit of a process.

As an aside: if you can copy/paste words between your ssh session and
your windows command prompt, you can use “tar” and “base64”, possibly
also with “gzip”, to copy files from one to the other.

It can be annoying for large files, but anything that compresses down
to some tens of kB is usually quite quick and easy.

Cheers,

f

Francis D. [email protected]

Just a note to say that I worked it out. I had my root set one level too
deep, so the paths were rendering just fine but not matching up with
where
the root had them starting. Once I adjusted it, that problem went away.
I’m
still getting an error from OSTicket, but no longer am I seeing errors
in
my Nginx log. Incidentally, if anyone has gotten OSTicket to work under
Nginx and wouldn’t mind emailing me off list, I’d love to pick your
brain
about what might be going wrong with the installation.

On Tue, May 10, 2016 at 8:21 AM, Francis D. [email protected]
wrote:

it was looking for, based on what nginx told it.

So: what http request do you make?

What (php) file do you want the fastcgi server to use for this request?

Looks like the request is for js/jquery.[number].js,
ROOT/PATHcss/flags.css, and other files. I’m not sure which php file it
is,
since OSTicket is running its own installer. Well, the main file is
install.php according to the “referrer” of the request, but I don’t know
if
that’s the whole story.