As a bit of a side project, I've been following a guide on how to set up an Nginx web server from here: http://arstechnica.com/information-technology/2012/12/web-served-part-4-get-your-database-on/2/
Everything went fine until I installed Sqlbuddy. When I try and navigate to {server address}/sqlbuddy the page stays white, and this appears in nginx's error.log:
2013/12/19 01:03:38 [error] 1949#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: include(/usr/share/nginx/html/sqlbuddy/includes/types.php): failed to open stream: No such file or directory in /usr/share/nginx/html/sqlbuddy/functions.php on line 28
PHP message: PHP Warning: include(): Failed opening '/usr/share/nginx/html/sqlbuddy/includes/types.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/nginx/html/sqlbuddy/functions.php on line 28
PHP message: PHP Warning: include(/usr/share/nginx/html/sqlbuddy/includes/class/GetTextReader.php): failed to open stream: No such file or directory in /usr/share/nginx/html/sqlbuddy/functions.php on line 29
PHP message: PHP Warning: include(): Failed opening '/usr/share/nginx/html/sqlbuddy/includes/class/GetTextReader.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/nginx/html/sqlbuddy/functions.php on line 29
PHP message: PHP Warning: include(/usr/share/nginx/html/sqlbuddy/includes/class/Sql.php): failed to open stream: No such file or directory in /usr/share/nginx/html/sqlbuddy/functions.php on line 34
PHP message: PHP Warning: include(): Failed opening '/usr/share/nginx/html/sqlbuddy/includes/class/Sql.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/nginx/html/sqlbuddy/functions.php on line 34
PHP message: PHP Fatal error: Class 'GetTextReader' not found in /usr/share/nginx/html/sqlbuddy/functions.php on line 128" while reading response header from upstream, client: 192.168.0.122, server: localhost, request: "GET /sqlbuddy/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.soc:", host: "192.168.0.123"
My setup in /etc/nginx/sites-available/www:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm index.php;
# Make site accessible from http://localhost/
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
location ~ /sqlbuddy/.*\.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location ~ /\. {access_log off; log_not_found off; deny all;}
location ~ ~$ {access_log off; log_not_found off; deny all;}
...unrelated...
}
Steps I've taken:
- chmod 755'ed the entire /html directory and everything below it
- chown www-data:www-data /sqlbuddy'ed directory
- made sure my username was part of the www-data group
- uninstalled and re-installed sqlbuddy several times according to the instructions above
- moved all the files from /sqlbuddy/src to /sqlbuddy (note that it's still broken whether I move those files or not)
- Restarted php-fpm, nginx, and the server itself several times
Needless to say this is very perplexing. I admit many things like this are above my pay-grade so to speak (those are some hardcore errors), but I have absolutely no reason to believe that it shouldn't just work if I follow all instructions as written.