snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.95k stars 3.16k forks source link

Artisan error: Undefined index: #1201

Closed Seema-agarwal closed 8 years ago

Seema-agarwal commented 9 years ago

cant seem to resolve the following

php artisan optimize {"error":{"type":"ErrorException","message":"Undefined index: Asia\/Kolkata","file":"C:\inetpub\wwwroot\Snipe-it\vendor\laravel\framework\src\ Illuminate\Foundation\start.php","line":167}}

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ddreier commented 8 years ago

Look in the web.config file around line 5 for duplicate entries. If there are some, you'll need to remove the duplicates.

Or you could try renaming all of the rules in URL Rewrite to be different and unique.

Seema-agarwal commented 8 years ago

@snipe ; while installation of snipe It I copied the example app config from app/config/production/app.example.php to app/config/production/app.php and changed 'url' => 'http://localhost',

and let 'domain' => 'yourserver.com',

IS THAT THE PROBLEM?

ddreier commented 8 years ago

@Seema-agarwal Nope. You're getting an IIS error, not a Snipe-IT error.

Though, you should probably change url in app/config/production/app.php to reflect the actual name of the computer Snipe-IT is running on, unless you're only ever going to access it from that server.

Seema-agarwal commented 8 years ago

ok

ddreier commented 8 years ago

Have you checked Web.config for duplicate rewrite rules? It's most likely located in C:\inetpub\wwwroot\web.config

Seema-agarwal commented 8 years ago

web.config does not exist in C:\inetpub\wwwroot\web.config

But one exists in C:\inetpub\wwwroot\snipe-it\public\web.config

Seema-agarwal commented 8 years ago

That too has the following; <?xml version="1.0" encoding="UTF-8"?>

Seema-agarwal commented 8 years ago

<?xml version="1.0" encoding="UTF-8"?>

Seema-agarwal commented 8 years ago

the rest does not seem to be showing?????

webconfig

ddreier commented 8 years ago

I'd suggest removing everything between the nodes and then re-import the .htaccess file.

Seema-agarwal commented 8 years ago

Would you mean removing everything from ths web.config file?

Seema-agarwal commented 8 years ago

I removed the text and re-imported rules but now the index page doesnot load at all error2

Seema-agarwal commented 8 years ago

In internet explorer the following is seen

error3

ddreier commented 8 years ago

So, I think you have a couple options here.

  1. Rename the Rewrite rules and see if that fixes it (i.e. change "Imported" to "Snipe-IT" in the three rules).
  2. Create a separate site in IIS for Snipe-IT, either with a different port number or a different host name/URL. This will (probably) fix the issue here, which is the inheritance of URL Rewrite rules from the default site to the Snipe-IT site/Application.
  3. Try disabling inheritance for URL Rewrite rules. I found this forum post after a quick Google search for "iis 7.5 rewritemodule cannot add duplicate collection entry of type rule". I make no guarantees that it is valid or works.

At the end of the day, this is an IIS problem. Which is your problem to troubleshoot and resolve. I will continue to try and help as I can, but there's only so much that I can do over the internet.