Title: Random HTML is being inserted into wp-admin/*
Last modified: August 18, 2016

---

# Random HTML is being inserted into wp-admin/*

 *  [clarkm](https://wordpress.org/support/users/clarkm/)
 * (@clarkm)
 * [19 years ago](https://wordpress.org/support/topic/random-html-is-being-inserted-into-wp-admin/)
 * Hello,
 * I have just made a fresh installation of WP 2.2 and am getting a very strange
   problem..
 * The index of wp-admin/ is displaying random HTML from my homepage, which is at../
   index.php!
 * It will display it sometimes as I submit a form field. Other form fields fail
   because this HTML appearing.
 * I spoke to my WebHost who told me to add the following to my .htaccess file (
   due to a previous issue post-installation, where there would be errors accessing
   the wp-admin).
 * Here is the contents of the .htaccess file:
 * `php_flag magic_quotes_runtime off`
 * Thanks
 * EDIT: A further error occurs when I click the submit element of some forms. Instead
   of submitting, I am sent to the domain root.
    (My wordpress installation is located
   in a subdir of this)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [ma8thew](https://wordpress.org/support/users/ma8thew/)
 * (@ma8thew)
 * [19 years ago](https://wordpress.org/support/topic/random-html-is-being-inserted-into-wp-admin/#post-580167)
 * So did this problem occur before you put that in .htaccess?
 *  Thread Starter [clarkm](https://wordpress.org/support/users/clarkm/)
 * (@clarkm)
 * [19 years ago](https://wordpress.org/support/topic/random-html-is-being-inserted-into-wp-admin/#post-580168)
 * Before adding the .htaccess content, the admin section was inaccessible.
 * The error I got accessing wp-admin was:
 *     ```
       Warning: Invalid argument supplied for foreach()
        in /path/to/wp-includes/capabilities.php on line 31
   
       Warning: Cannot modify header information -
       headers already sent by (output started at
       /path/to/wp-includes/capabilities.php:31) in
       /path/to/wp-login.php on line 12
   
       Warning: Cannot modify header information -
       headers already sent by (output started at
       /path/to/wp-includes/capabilities.php:31) in
       /path/to/wp-includes/pluggable.php on line 329
       ```
   
 *  [ma8thew](https://wordpress.org/support/users/ma8thew/)
 * (@ma8thew)
 * [19 years ago](https://wordpress.org/support/topic/random-html-is-being-inserted-into-wp-admin/#post-580171)
 * The only thing I can suggest is that your server has a weird configuration. You
   could try reinstalling wordpress, but I can’t help you beyond that. Sorry.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years ago](https://wordpress.org/support/topic/random-html-is-being-inserted-into-wp-admin/#post-580193)
 * Sounds like your installation failed to put some necessary data into the database.
   I’d try again with a fresh database and a freshly downloaded copy of WordPress.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Random HTML is being inserted into wp-admin/*’ is closed to new replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [19 years ago](https://wordpress.org/support/topic/random-html-is-being-inserted-into-wp-admin/#post-580193)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
