# index\_dev.php Causes Error

**URL:** <https://forum.mautic.org/t/index-dev-php-causes-error/2014>\
**Category:** Product Support\
**Created:** [July 1, 2015, 12:40pm UTC](https://forum.mautic.org/t/index-dev-php-causes-error/2014 "2015-07-01T12:40:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![petertl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/petertl/32/511_2.png) [@petertl](https://forum.mautic.org/u/petertl)\
**Post date:** [July 1, 2015, 12:40pm UTC](https://forum.mautic.org/t/index-dev-php-causes-error/2014/1 "2015-07-01T12:40:41Z")

</div>

Hi,  
  
  
  
I want to run index\_dev.php to debug an issue. For that, I removed the following block:

Code:

if (isset($\_SERVER['HTTP\_CLIENT\_IP']) || isset($\_SERVER['HTTP\_X\_FORWARDED\_FOR']) || !in\_array(@$\_SERVER['REMOTE\_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) ) { header('HTTP/1.0 403 Forbidden'); exit('You are not allowed to access this file. Check '.basename(\_\_FILE\_\_).' for more information.'); }

  
When I run index\_dev.php, I encounter the following exception:

Code:

ClassNotFoundException: Attempted to load class "TwigBundle" from namespace "SymfonyBundleTwigBundle" in /.../mautic/app/AppKernel.php line 184. Do you need to "use" it from another namespace?

  
Any ideas?  
  
Peter

---

<div class="post-metadata">

**Author:** ![petertl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/petertl/32/511_2.png) [@petertl](https://forum.mautic.org/u/petertl)\
**Post date:** [July 1, 2015, 12:40pm UTC](https://forum.mautic.org/t/index-dev-php-causes-error/2014/2 "2015-07-01T12:40:41Z")

</div>

Hi,

I want to run index\_dev.php to debug an issue. For that, I removed the following block:

`if (isset($_SERVER['HTTP_CLIENT_IP'])
    || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
    || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))
) {
    header('HTTP/1.0 403 Forbidden');
    exit('You are not allowed to access this file. Check '.basename( __FILE__ ).' for more information.');
}`

When I run index\_dev.php, I encounter the following exception:

```auto
ClassNotFoundException: Attempted to load class "TwigBundle" from namespace "SymfonyBundleTwigBundle" in /.../mautic/app/AppKernel.php line 184. Do you need to "use" it from another namespace?
```

Any ideas?

Peter

---

<div class="post-metadata">

**Author:** ![chad.windnagle](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@chad.windnagle](https://forum.mautic.org/u/chad.windnagle)\
**Post date:** [July 2, 2015, 2:14pm UTC](https://forum.mautic.org/t/index-dev-php-causes-error/2014/3 "2015-07-02T14:14:01Z")

</div>

Hi Peter

Since you have the index\_dev.php file, that probably means you’re using the github version of Mautic. So, its possible that your composer files are out of date.

To fix that, run:

```auto
php composer.phar install
```

Do that from the mautic root. Note: do not run the composer update command, that’ll cause big issues.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:59pm UTC](https://forum.mautic.org/t/index-dev-php-causes-error/2014/4 "2020-02-02T22:59:25Z")

</div>

Closed on February 2, 2020, 10:59pm UTC


