Title: Php errors when bots directly calls plugin php
Last modified: August 28, 2018

---

# Php errors when bots directly calls plugin php

 *  [htmltiger](https://wordpress.org/support/users/htmltiger/)
 * (@htmltiger)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-bots-directly-calls-plugin-php/)
 * Hi,
 * My php error log is filled with the errors due to bad bots calling php directly
 * PHP Fatal error: Uncaught Error: Call to undefined function plugin_basename()
   in /home/www/wp-content/plugins/contact-form-7/wp-contact-form-7.php:19
    Stack
   trace: #0 {main} thrown in /home/www/wp-content/plugins/contact-form-7/wp-contact-
   form-7.php on line 19
 * Can you please add a line in the main php file
 * if ( !defined(‘ABSPATH’) ) {exit;}
 * Thank you.

The topic ‘Php errors when bots directly calls plugin php’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [htmltiger](https://wordpress.org/support/users/htmltiger/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-bots-directly-calls-plugin-php/)
 * Status: not resolved