Title: Correct your php code.
Last modified: March 25, 2019

---

# Correct your php code.

 *  [Sysadmin](https://wordpress.org/support/users/palanthir/)
 * (@palanthir)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/correct-your-php-code/)
 * Apache2 2.4.25 working in mpm prefork mode on Debian 9.8.0
    PHP 7.2.16-1+0~20190307202415.17
   +stretch~1.gbpa7be82 (cli) (built: Mar 7 2019 20:24:15) ( NTS ) Copyright (c)
   1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
   with Zend OPcache v7.2.16-1+0~20190307202415.17+stretch~1.gbpa7be82, Copyright(
   c) 1999-2018, by Zend Technologies
 * My Apache2 access.log and errors.log show this.
 * PHP Warning: Use of undefined constant DOING_AJAX – assumed ‘DOING_AJAX’ (this
   will throw an Error in
    a future version of PHP) in /var/www/html/example.com/
   public_html/wp-content/plugins/protect-wp-admin/pwa-class.php on line 170, referer:
   [https://example.com/wp-admin/index.php](https://example.com/wp-admin/index.php)[
   Mon Mar 25 17:39:44.476486 2019] [php7:warn] [pid 2284] [client 176.XXX.XXX.XX:
   31255] PHP Warning: getimagesize(): Filename cannot be empty in /var/www/html/
   example.com/public_html/wp -content/plugins/protect-wp-admin/pwa-class.php on
   line 271, referer: [https://example.com/wp-admin/index.php](https://example.com/wp-admin/index.php)[
   Mon Mar 25 17:46:08.347080 2019] [php7:warn] [pid 2274] [client 176.XXX.XXX.XX:
   31274] PHP Warning: getimagesize(): Filename cannot be empty in /var/www/html/
   example.com/public_html/wp -content/plugins/protect-wp-admin/pwa-class.php on
   line 271
    -  This topic was modified 7 years, 2 months ago by [Sysadmin](https://wordpress.org/support/users/palanthir/).

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

 *  [jrthor2](https://wordpress.org/support/users/jrthor2/)
 * (@jrthor2)
 * [7 years ago](https://wordpress.org/support/topic/correct-your-php-code/#post-11539397)
 * I am getting the same thing when going to my /wp-admn page:
 * Warning: Use of undefined constant DOING_AJAX – assumed ‘DOING_AJAX’ (this will
   throw an Error in a future version of PHP) in /home/treeof51/public_html/wp-content/
   plugins/protect-wp-admin/pwa-class.php on line 170
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 1251
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 1254
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-login.php on line 453
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-login.php on line 468
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-admin/includes/misc.php on line 1196
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 957
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 958
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 959
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 960
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 961
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 962
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 965
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 966
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 969
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 970
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 971
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 972
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 975
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 976
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 977
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 978
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/treeof51/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php:
   170) in /home/treeof51/public_html/wp-includes/pluggable.php on line 981
 *  [bluenox](https://wordpress.org/support/users/bluenox/)
 * (@bluenox)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/correct-your-php-code/#post-11579361)
 * [@palanthir](https://wordpress.org/support/users/palanthir/)
 * Same Issue for me and broke entire webshop of a client.
 * Seems that more have this problem:
    [https://wordpress.org/support/topic/php-warning-getimagesize-filename-cannot-be-empty/](https://wordpress.org/support/topic/php-warning-getimagesize-filename-cannot-be-empty/)
 * I suggest to get an other plugin for protecting you admin, Because the developer
   is not responding!
 *  [jrthor2](https://wordpress.org/support/users/jrthor2/)
 * (@jrthor2)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/correct-your-php-code/#post-11580109)
 * This fixed the issue on my site:
 * [https://wordpress.org/support/topic/php-notice-131/](https://wordpress.org/support/topic/php-notice-131/)

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

The topic ‘Correct your php code.’ is closed to new replies.

 * ![](https://ps.w.org/protect-wp-admin/assets/icon-128x128.png?rev=1016876)
 * [Protect WP Admin](https://wordpress.org/plugins/protect-wp-admin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/protect-wp-admin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/protect-wp-admin/)
 * [Active Topics](https://wordpress.org/support/plugin/protect-wp-admin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/protect-wp-admin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/protect-wp-admin/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [jrthor2](https://wordpress.org/support/users/jrthor2/)
 * Last activity: [6 years, 12 months ago](https://wordpress.org/support/topic/correct-your-php-code/#post-11580109)
 * Status: not a support question