XAMPP and snipe-it
Hi there, I have configured XAMPP and snipe-it following https://snipe-it.readme.io/docs/installation on a windows server. all went smooth till the end but it seems like I messed up somewhere - maybe .env file. my APP_URL in env is http://x.x.x.x/setup but this address doesn't work as it says object not found and if I take setup out and use just the IP it takes me to XAMPP dashboard. Maybe I have some conflicts or something misconfigured but I just can't figure it out... hoping for some pointers from you all. Thanks in advance
Please confirm you have done the following before posting your bug report:
- [ ] I have enabled debug mode
- [ ] I have read checked the Common Issues page
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
- Snipe-IT Version
- OS: [e.g. Ubuntu, CentOS]
- Web Server: [e.g. Apache, IIS]
- PHP Version
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Error Messages
- WITH DEBUG TURNED ON, if you're getting an error in your browser, include that 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 reproducible on the demo: https://snipeitapp.com/demo.
- Include any additional information you can find in
storage/logsand your webserver's logs.
Additional context
- Is this a fresh install or an upgrade?
- What OS and web server you're running Snipe-IT on
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
- 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
Add any other context about the problem here.
Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.
Try APP_URL=http://localhost
or 127.0.0.1
Then make sure your Apache VHOST configuration is correct in XAMPP.
The /setup will definitely cause problems if it's in the APP_URL
Thanks for the input. I tried localhost and it's still taking me to xampp dashboard and 172.0.0.1 fails with "Site can not be reached" though webserver/apache is running.
Here's my .env (key removed)
APP_ENV=production
APP_DEBUG=true
APP_KEY=.....
APP_URL=http://localhost
APP_TIMEZONE='US/Central'
APP_LOCALE=en
MAX_RESULTS=500
And here's my virtual host: httpd.vhosts.conf
<VirtualHost localhost:80>
DocumentRoot "C:/xampp/htdocs/"
ServerName localhost.com
ErrorLog "logs/localhost.com.log"
</VirtualHost>
Anything wrong with this configuration?. Any other files I need to check? Thank you for your help
My setup:
C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
ServerName snipe.test
DocumentRoot "D:/programs/snipe-it-pb/public"
<Directory "D:/programs/snipe-it-pb">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
in windows host file:
127.0.0.1 snipe.test
Change "D:/programs/snipe-it-pb/" anywhere to be your snipe root folder. Change "snipe.test" to be whatever url you want. Would suggest getting ssl setup with lets encrypt for domains you do own.
Access via snipe.test or whatever url you put
Thank you for the help. When launched the page, I got this exception (connector.php: line#663-665)
SQLSTATE[HY000] [1045] Access denied for user 'snipe_user'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = snipeit and table_name = users)
I thought I granted access as:
grant all on snipeit.* to 'snipe_user'@'localhost' identified by '*****';
Has the user not been granted access? Any help would be appreciated
I tried to update the access/privilege but no luck This what's in user_privileges in information_schema: GRANTEE | TABLE_CATALOG | PRIVILEGE_TYPE | IS_GRANTABLE 'snipe_user'@'localhost' | def | USAGE | NO
Fixed. I had wrong password for DB_PASSWORD in .env file. Hope this helps other folks
♥Don't forget to close this out♥