Skip to content
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

I'm trying to install snipe-it on a shared hosting and it's driving me crazy. #16137

Open
look-a-furry opened this issue Jan 27, 2025 · 3 comments

Comments

@look-a-furry
Copy link

look-a-furry commented Jan 27, 2025

- Version of Snipe-IT you're running.
7.1.16

- What OS and web server you're running Snipe-IT on

  • Ubuntu 22.04.5 LTS x86
  • aaPanel 7.0.15. Self-hosted.
  • NGINX
  • PHP 8.3
  • MySQL 5

- What method you used to install Snipe-IT
Manual Installation

- If you're getting an error in your browser, include that error.


Warning: file_exists(): open_basedir restriction in effect. File(/www/wwwroot/[REDACTED_URL].com/public/../storage/framework/maintenance.php) is not within the allowed path(s): (/www/wwwroot/[REDACTED_URL].com/public/:/tmp/) in /www/wwwroot/[REDACTED_URL].com/public/index.php on line 19

Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/[REDACTED_URL].com/vendor/autoload.php) is not within the allowed path(s): (/www/wwwroot/[REDACTED_URL].com/public/:/tmp/) in /www/wwwroot/[REDACTED_URL].com/public/index.php on line 34

Warning: require(/www/wwwroot/[REDACTED_URL].com/vendor/autoload.php): Failed to open stream: Operation not permitted in /www/wwwroot/[REDACTED_URL].com/public/index.php on line 34

Fatal error: Uncaught Error: Failed opening required '/www/wwwroot/[REDACTED_URL].com/public/../vendor/autoload.php' (include_path='.:/www/server/php/83/lib/php') in /www/wwwroot/[REDACTED_URL].com/public/index.php:34 Stack trace: #0 {main} thrown in /www/wwwroot/[REDACTED_URL].com/public/index.php on line 34

- Include any additional information you can find in storage/logs and your webserver's logs.
Error log from Nginx:

2025/01/27 14:42:16 [error] 36072#0: *586 FastCGI sent in stderr: "PHP message: PHP Warning:  file_exists(): open_basedir restriction in effect. File(/www/wwwroot/[REDACTED_URL].com/public/../storage/framework/maintenance.php) is not within the allowed path(s): (/www/wwwroot/[REDACTED_URL].com/public/:/tmp/) in /www/wwwroot/[REDACTED_URL].com/public/index.php on line 19; PHP message: PHP Warning:  require(): open_basedir restriction in effect. File(/www/wwwroot/[REDACTED_URL].com/vendor/autoload.php) is not within the allowed path(s): (/www/wwwroot/[REDACTED_URL].com/public/:/tmp/) in /www/wwwroot/[REDACTED_URL].com/public/index.php on line 34; PHP message: PHP Warning:  require(/www/wwwroot/[REDACTED_URL].com/vendor/autoload.php): Failed to open stream: Operation not permitted in /www/wwwroot/[REDACTED_URL].com/public/index.php on line 34; PHP message: PHP Fatal error:  Uncaught Error: Failed opening required '/www/wwwroot/[REDACTED_URL].com/public/../vendor/autoload.php' (include_path='.:/www/server/php/83/lib/php') in /www/wwwroot/[REDACTED_URL].com/public/index.php:34
Stack trace:
#0 {main}
  thrown in /www/wwwroot/[REDACTED_URL].com/public/index.php on line 34" while reading response header from upstream, client: 91.84.87.137, server: [REDACTED_URL].com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-83.sock:", host: "[REDACTED_URL].com"

PHP is saying that I doesn't have permission to reach the requested file. However there are no restriction set on which files it can reach. I have several word press installations running on the server and they all work with no issues.
Here's a snippet from the php config file:
Image

It took me and hour just to get it to display anything. A manual installation combined with the non-standard setup of the web server, and I cannot figure out what I'm doing wrong.
It's simple on paper: Git clone, set up the .env file, run composer, and you're golden. Well apparently not for me...

Anyways, any guidance is appreciated...

If you need the Public URL let me know and I'll share it.

Copy link

welcome bot commented Jan 27, 2025

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@snipe
Copy link
Owner

snipe commented Jan 27, 2025

I don't think this is actually a Snipe-IT issue, it seems more likely a configuration issue, perhaps with your control panel. Some info from Plesk that might be useful: https://www.plesk.com/kb/support/a-website-hosted-in-plesk-is-not-accessible-open_basedir-restriction-in-effect/

And I found something for aaHost - https://www.aapanel.com/forum/d/3551-require-open-basedir-restriction-in-effect

Plesk
A website hosted in Plesk is not accessible: open_basedir restriction in effect - Support Cases - Plesk Knowledge Base
aaPanel - Free Hosting control panel. One-click LAMP/LEMP.
Hello There was an issue installing the shortcut url. Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/site name/public_html/vendor...

@look-a-furry
Copy link
Author

look-a-furry commented Jan 28, 2025

Thank you for your answer!

Turning off The Anti-XSS attack toggle seemed to have done the trick.

But now it just throws an 404 Not found Error... what?

Image

I created an index.html file in the public folder and it works just fine so we know at leas that is working.

Image

I also created a PHP info file to see if PHP was working correctly and it seems like it is:

Image

Again.... I have several WordPress sites running with no issues on the server.... so I'm sure PHP isn't the issue here.

This is 100% not a snipe-it issue however I feel like this is the most appropriate place to post this... lemme know if it's not and I'll look for help somewhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants