partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.38k stars 401 forks source link

ERROR 405 Not Allowed #544

Closed Shibonja closed 8 years ago

Shibonja commented 8 years ago

Hi,

I am trying to install partkeepr on my web server. I am using Ubuntu Trusty (14.04) with nginx. I configured nginx like in this link https://wiki.partkeepr.org/wiki/KB00005:Web_Server_Configuration , but with no success. In chrome console I am getting this error:

POST http://localhost:8080/setup/tests/check-php.php 405 (Not Allowed)Ext.define.start @ ext-all-debug.js:24380Ext.define.request @ ext-all-debug.js:25448Ext.define.run @ AbstractTest.js:89Ext.define.run @ TestRunner.js:36Ext.define.runTests @ AbstractTestCard.js:123Ext.define.retest @ AbstractTestCard.js:93fire @ ext-all-debug.js:19779doFireEvent @ ext-all-debug.js:20685Ext.define.doFireEvent @ ext-all-debug.js:63295prototype.doFireEvent @ ext-all-debug.js:53639fireEventArgs @ ext-all-debug.js:20539fireEvent @ ext-all-debug.js:20498Ext.define.fireHandler @ ext-all-debug.js:128460Ext.define.onClick @ ext-all-debug.js:128449fire @ ext-all-debug.js:19779Ext.define.fire @ ext-all-debug.js:31904Ext.define.publish @ ext-all-debug.js:31880Ext.define.doDelegatedEvent @ ext-all-debug.js:31930Ext.define.onDelegatedEvent @ ext-all-debug.js:31917(anonymous function) @ ext-all-debug.js:6404 ext-all-debug.js:24380 XHR finished loading: POST "http://localhost:8080/setup/tests/check-php.php".

Any help?

Drachenkaetzchen commented 8 years ago

As I'm no nginx expert I can't provide help here. Your best option is to ask in an nginx community forum to find out why a POST to a PHP file returns in a 405 error.

Shibonja commented 8 years ago

Hi @felicitus

I solved the issue by adding this to my nginx conf file

error_page 405 = $uri;

but now I am getting another error

/** Read more…"]}'; } else { echo '{"success": true, "message": "PHP Version '.phpversion().' found"}'; } exit; ?> */ { "success": false, "message": "You don't have PHP installed on your server, or the module is not activated.", "errors": [ "In order to run PartKeepr, you need to have the PHP module activated on your web server.

I installed php5, this is the output for php:

php -v 
PHP 5.6.16-2+deb.sury.org~trusty+1 (cli) 
Drachenkaetzchen commented 8 years ago

See https://wiki.partkeepr.org/wiki/KB00001:PHP_Module

No wonder you get the 405 error - you simply don't have PHP installed in nginx. You installed the CLi version of PHP.

The package on debian is called php5-fpm, I'm pretty sure it's the same package on ubuntu.

I'll close the issue since it is not a PartKeepr bug; please use IRC or the mailing list for further assistance.

Shibonja commented 8 years ago

Hi @felicitus

I made all the needed changes from the link you provided me in the previous comment, any other proposal to check. I configured my server block in nginx like this:

https://wiki.partkeepr.org/wiki/KB00005:Web_Server_Configuration