Cannot connect to Asterisk Manager

I am currently unable to connect to the Extensions Module, and I get the following message:

Cannot connect to Asterisk Manager with admin/amp111

This module requires access to the Asterisk Manager. Please ensure Asterisk is running and access to the manager is available.

I also constantly have the red bar at the top to apply changes.

When I click on it, I get a constant loop of errors at the bottom of the screen which locks up my browser.

I get these errors:

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/html/admin/common/php-asmanager.php in Line 150.
Warning: feof(): supplied argument is not a valid stream resource in /var/www/html/admin/common/php-asmanager.php in Line 171.
Warning: fgets(): supplied argument is not a valid stream resource in /var/www/html/admin/common/php-asmanager.php in Line 173.

The last two warnings, 171 and 173, repeat infinitly.

Can anybody help with this?