index_dev.php Causes Error

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

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:

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

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:

php composer.phar install

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