snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Snipe-IT Document Root issue

Open Salman-Yousaf1 opened this issue 9 years ago • 14 comments

Expected Behavior (or desired behavior if a feature request)

Snipe-it Preflight Mode / Installation page


Actual Behavior

D'oh. If you're seeing this, your DocumentRoot is set incorrectly. It should be set to the public directory. httpd conf

NOTE: I am a beginner in this and reached this level after quite long. Kindly guide accordingly. Any guidance is appreciated in advance

Thanks


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running: 3.6.6
  • What OS and web server you're running Snipe-IT on: Windows 10 / Wamp-32
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc): Manual
  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproduceable on the demo.
  • Include any additional information you can find in app/storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

Salman-Yousaf1 avatar Jul 18 '17 05:07 Salman-Yousaf1

Kindly note that after change the httpd.conf file the server was restarted but the issue remains the same

Salman-Yousaf1 avatar Jul 18 '17 05:07 Salman-Yousaf1

Also worth running debug mode and revisit the site this will actually tell you the problem and you can search the tickets then.

I have just been all through this the past few days

rWaddles avatar Jul 18 '17 12:07 rWaddles

I will try turning on debug mode and look into it. But the prob seems to be in .env file where DocumentRoot is already point to public DIR but still the error is displayed

Salman-Yousaf1 avatar Jul 18 '17 12:07 Salman-Yousaf1

I would double check your path formatting ? Could be the mere face you are using '' instead of '/' on your root.

rWaddles avatar Jul 18 '17 12:07 rWaddles

The path has no issues as the cmd httpd.exe -t when in directory c:\wamp\bin\apache\apache2.4.23\bin it says syantax ok. Also i have tried bot "/" & "" the prob remains the same

Salman-Yousaf1 avatar Jul 18 '17 12:07 Salman-Yousaf1

Dear @rWaddles,

Debug Mode was turned on and the "" was replaced with "/" on DocumentRoot, restarted the server but still the same issue. Any other way out or changes required in anyother file than .env???? As I have followed the https://snipe-it.readme.io/v3.6.2/docs/wamp from first till the last step without any error

Anyone else @snipe ???

Salman-Yousaf1 avatar Jul 18 '17 19:07 Salman-Yousaf1

One more thing found, when i type localhost/snipe-it/public it redirects to "http://pksalmany-pc/c:/wamp/www/snipe-it/public//setup" and error observed is 403 Forbidden stating "You don't have permission to access /c:/wamp/www/snipe-it/public//setup on this server." Would it make the issue resolved if the permission to directory is granted? If so can you please guide me how to grant this permission.

Thanks

Salman-Yousaf1 avatar Jul 18 '17 19:07 Salman-Yousaf1

After the last try to open setup (and was unsuccessful) apache error log was checked and it says "[Wed Jul 19 00:56:37.277061 2017] [core:error] [pid 10020:tid 1236] (20023)The given path was above the root path: [client 169.254.179.217:53961] AH00127: Cannot map GET /c:/wamp/www/snipe-it/public//setup HTTP/1.1 to file"

Salman-Yousaf1 avatar Jul 18 '17 20:07 Salman-Yousaf1

I can't access my test install at the moment but there should not be '//' only one. Again not expert advise but try removing / from the end of your root and .env

rWaddles avatar Jul 19 '17 07:07 rWaddles

Its single "/" in original file. When it is executed the second "/" appears itself. When in file the end "/" is removed it gives out syntax error

Salman-Yousaf1 avatar Jul 19 '17 07:07 Salman-Yousaf1

Try removing so there isn't one? See if it still resolves

rWaddles avatar Jul 19 '17 07:07 rWaddles

I will give it a try once again and will update

Salman-Yousaf1 avatar Jul 19 '17 07:07 Salman-Yousaf1

Tried but same prob observed. Any-other expert opinion please?????

Salman-Yousaf1 avatar Jul 20 '17 05:07 Salman-Yousaf1

Issue resolved after doing a clean re-install from zero. Thank you all for the help

Salman-Yousaf1 avatar Jul 24 '17 05:07 Salman-Yousaf1