Title: PHP error
Last modified: September 3, 2022

---

# PHP error

 *  Resolved [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-error-542/)
 * WordPress: Version 6.0.2
    Plugin: Version: 5.0.3 PHP: Version: 8.0.22
 * `[03-Sep-2022 02:55:48 UTC] AIOS firewall error: unable to locate workspace.`
    -  This topic was modified 3 years, 9 months ago by [Seath](https://wordpress.org/support/users/seath/).
    -  This topic was modified 3 years, 9 months ago by [Seath](https://wordpress.org/support/users/seath/).

Viewing 13 replies - 16 through 28 (of 28 total)

[←](https://wordpress.org/support/topic/php-error-542/?output_format=md) [1](https://wordpress.org/support/topic/php-error-542/?output_format=md)
2

 *  Plugin Contributor [Prashant Baldha](https://wordpress.org/support/users/pmbaldha/)
 * (@pmbaldha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16031397)
 * Please follow the below steps:
    - Open your site’s file manager or FTP.
    - Open their `aios-bootstrap.php` file in the root folder.
    - Change the code line `$aiowps_firewall_rules_path = __DIR__.'/wp-content/uploads/
      aios/firewall-rules/';` to `$GLOBALS['aiowps_firewall_rules_path'] = __DIR__.'/
      wp-content/uploads/aios/firewall-rules/';`.
 * I’m hoping explicitly setting it as a global (rather than the implicit as it 
   is now) will resolve it. If not, I’ll implement something else.
 * Then let me know what will happen on your end.
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16034331)
 * [@pmbaldha](https://wordpress.org/support/users/pmbaldha/) I did as you asked.
   Unfortunately it didn’t work. Thank you for working on it.
 *  Plugin Contributor [Prashant Baldha](https://wordpress.org/support/users/pmbaldha/)
 * (@pmbaldha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16038233)
 * Thanks a lot for updating me. Please follow the below steps:
    - Download the development version of the AIOS plugin from [https://drive.google.com/file/d/1vE93u9OrS_O2_WatIJoJcpBzomc8zu-s/view?usp=sharing](https://drive.google.com/file/d/1vE93u9OrS_O2_WatIJoJcpBzomc8zu-s/view?usp=sharing)
      and update it in your site.
    - Open your site’s file manager or FTP.
    - Open their `aios-bootstrap.php` file in the root folder.
    - Change the code line `$aiowps_firewall_rules_path = __DIR__.'/wp-content/uploads/
      aios/firewall-rules/';` to `$GLOBALS['aiowps_firewall_rules_path'] = __DIR__.'/
      wp-content/uploads/aios/firewall-rules/';`.
 * I’m hoping explicitly setting it as a global (rather than the implicit as it 
   is now) will resolve it. If not, I’ll implement something else.
 * Then let me know what will happen on your end.
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16040047)
 * [@pmbaldha](https://wordpress.org/support/users/pmbaldha/) I did as you asked.
   The error is gone now. Thank you!
 * But, the developer version created new warning.
 * `Warning: Undefined array key "status" in /wp-content/plugins/all-in-one-wp-security-
   and-firewall/admin/wp-security-list-comment-spammer-ip.php on line 21`
 * it happens when I visit …. admin.php?page=aiowpsec_spam&tab=tab2 … in the admin
   area.
 *  Plugin Contributor [Prashant Baldha](https://wordpress.org/support/users/pmbaldha/)
 * (@pmbaldha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16044642)
 * Please follow the below steps:
    - Download the development version of the AIOS plugin from [https://drive.google.com/file/d/1vE93u9OrS_O2_WatIJoJcpBzomc8zu-s/view?usp=sharing](https://drive.google.com/file/d/1vE93u9OrS_O2_WatIJoJcpBzomc8zu-s/view?usp=sharing)
      and update it on your site.
    - Open your site’s file manager or FTP.
    - Open their `aios-bootstrap.php` file in the root folder.
    - Change the code line `$aiowps_firewall_rules_path = __DIR__.'/wp-content/uploads/
      aios/firewall-rules/';` to `$GLOBALS['aiowps_firewall_rules_path'] = __DIR__.'/
      wp-content/uploads/aios/firewall-rules/';`.
 * I’m hoping explicitly setting it as a global (rather than the implicit as it 
   is now) will resolve it. If not, I’ll implement something else.
 * Then let me know what will happen on your end.
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16045373)
 * [@pmbaldha](https://wordpress.org/support/users/pmbaldha/) I am little confused.
 * I did what you asked me to do in your last post.
 * As I mention in my previous post the error …
 * `[03-Sep-2022 02:55:48 UTC] AIOS firewall error: unable to locate workspace.`
 * Is fixed.
 * The developer version I have download, created new PHP Warning ….
 * `Warning: Undefined array key "status" in /wp-content/plugins/all-in-one-wp-security-
   and-firewall/admin/wp-security-list-comment-spammer-ip.php on line 21`
 * I see that the file
 * > aios-bootstrap.php
 *  already has the change to
    `$GLOBALS['aiowps_firewall_rules_path'] = __DIR__.'/
   wp-content/uploads/aios/firewall-rules/';` so I didn’t had to change that.
 * The warning I am getting now is still there. it happens when I visit Spam Prevention
   and click on the tab Comment Spam IP Monitoring.
 * Thank you.
 *  Plugin Support [damien7](https://wordpress.org/support/users/damien7/)
 * (@damien7)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16057302)
 * Hey, I’m glad to hear that the `Unable to locate workspace` is fixed. We have
   just released a new version. Does the new release also resolve the new issue 
   you’re having?
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16058220)
 * Still getting
    `Warning: Undefined array key "status" in /wp-content/plugins/
   all-in-one-wp-security-and-firewall/admin/wp-security-list-comment-spammer-ip.
   php on line 21` when visiting Spam Prevention and click on the tab Comment Spam
   IP Monitoring.
 *  Plugin Contributor [Prashant Baldha](https://wordpress.org/support/users/pmbaldha/)
 * (@pmbaldha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16065559)
 * We have resolved the issue in AIOS 5.0.8 and release it a few days ago. Can you
   please update the AIOS plugin on your site, test it and update me?
 * Thanks a lot.
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16065988)
 * [@pmbaldha](https://wordpress.org/support/users/pmbaldha/) I do have the newest
   version. Still getting error when visiting Comment Spam IP Monitoring.
 *  [RMWeb Elements](https://wordpress.org/support/users/rivermobstermedia/)
 * (@rivermobstermedia)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16153795)
 * What is the purpose of this file??
 * I’m having issues with it as well. Thanks.
 *  [klypnick](https://wordpress.org/support/users/klypnick/)
 * (@klypnick)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16206515)
 * A plugin creating a new file in the document root of your website seems like 
   a bad idea. That file having to exist or your whole site breaks is also very 
   frustrating.
 * Our CICD pipeline freshly builds sites using composer and wp-packagist. Fresh
   builds running the latest AIOWPS plugin immediately break with a 500 error because
   this file doesn’t exist until you access the UI, and you can’t access the UI 
   because the site is broken.
 * I’ve had to manually include this file in the sites git repo and have it added
   during the build, which will cause issues if the file ever changes.
 *  [annedatema](https://wordpress.org/support/users/annedatema/)
 * (@annedatema)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16252125)
 * Yes I have also an error 500 now because of this file aios-bootstrap.php, in 
   our kubernetes cluster when the pods are scaled horizontal. The new pods will
   not have this file because it is not persistent. Can this file not just be in
   the plugin directory itself? Please consider alternatives of the location of 
   this file.

Viewing 13 replies - 16 through 28 (of 28 total)

[←](https://wordpress.org/support/topic/php-error-542/?output_format=md) [1](https://wordpress.org/support/topic/php-error-542/?output_format=md)
2

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

 * ![](https://ps.w.org/all-in-one-wp-security-and-firewall/assets/icon-256x256.
   png?rev=2798307)
 * [All-In-One Security (AIOS) – Security and Firewall](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/reviews/)

 * 28 replies
 * 6 participants
 * Last reply from: [annedatema](https://wordpress.org/support/users/annedatema/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/php-error-542/page/2/#post-16252125)
 * Status: resolved