Title: 500 errors?
Last modified: June 16, 2022

---

# 500 errors?

 *  Resolved [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * (@scmsteve)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/500-errors-11/)
 * Is this something to be concerned about?
 * I am seeing a lot of requests like this in the log:
 * “POST /wp-content/plugins/ti-woocommerce-wishlist-premium/includes/api/ajax.php
   HTTP/2” 500 0 “[https://simplycharlottemason.com/store/using-language-well/&#8221](https://simplycharlottemason.com/store/using-language-well/&#8221);
 * To see if it was a server blockade/etc, I did try a GET request on /wp-content/
   plugins/ti-woocommerce-wishlist-premium/includes/api/ajax.php and it also returned
   a 500 error.
 * I can’t find anything in our configuration (modsecurity/etc) that would be disallowing
   access there, and it isn’t a 403 forbidden but rather a 500 error.
 * Any insight?

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

 *  Plugin Author [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * (@templateinvaders)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/500-errors-11/#post-15741648)
 * Hi [@scmsteve](https://wordpress.org/support/users/scmsteve/)
 * Could you post a PHP error log for this request?
 *  Thread Starter [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * (@scmsteve)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/500-errors-11/#post-15741686)
 * I am not correlating any errors to it. I see those in the webserver logs, but
   I don’t know the exact action that is causing them to duplicate it.
 * I did try a get request on that and I get a 500 response code, this is in the
   webserver log:
 * “GET /wp-content/plugins/ti-woocommerce-wishlist-premium/includes/api/ajax.php
   HTTP/1.1” 500 0 “-”
 * But there is nothing logged to the PHP error log. If I can produce some output
   I will come back and post it.
 *  Plugin Author [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * (@templateinvaders)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/500-errors-11/#post-15742047)
 * [@scmsteve](https://wordpress.org/support/users/scmsteve/) You can message us
   via our support chat or email and we can do a quick debug for you.
 *  Thread Starter [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * (@scmsteve)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/500-errors-11/#post-15758672)
 * I put a temporary php file in the same directory in your plugin, and I can call
   that and it executes, so it is not a permissions/restriction problem. I duplicated
   portions of your code into that file to verify that your logic is properly finding
   the wp-config.php and wp-load.php files.
 * If I try to execute “@require( $config_file )”, as you do in your code, I get
   the 500 error also. So it is that line that is causing the problem, which may
   also be why I am seeing no debug log output because it hasn’t initialized yet?
 * If I fire up a WP-CLI session and issue that [@require](https://wordpress.org/support/users/require/)
   with the file path, I get a return value of 1 which should indicate success, 
   so by itself that is not the issue.
 * I also find it interesting that I see this on two test sites running in separate
   droplets at Digital Ocean as well as our main site running on an entirely different
   hosting provider, so it seems it is maybe not a specific host configuration issue.
 *  Thread Starter [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * (@scmsteve)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/500-errors-11/#post-15758690)
 * Oh, I removed the @ from the require statement and received the error…
 * We have our wp-config.php one directory above the public_html directory, as supported
   by WordPress. So when it tries to load the wp-config.php it is looking for wp-
   settings.php in that same directory which is not found.
 * If I moved our wp-config.php to inside the public_html directory, then it works,
   but for security (however small it is) we do not want it placed there, and so
   far it has never caused us problems with other plugins.
 *  Thread Starter [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * (@scmsteve)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/500-errors-11/#post-15758699)
 * Ok, My last post because I think this may resolve it. I did not set this up, 
   it was set up quite a long time ago by someone else, but in just revisiting the
   topic of putting the wp-config.php in a parent folder, they all suggest that 
   setting the ABSPATH (at the bottom, and if it was not already set) in that file
   should reference the actual document root, and in our case it was returning the
   location of the wp-config.php file itself. Maybe the way that WordPress normally
   loads things it defines it properly before loading our wp-config.php file, but
   when called directly by your ajax.php file it was not. Setting this path properly
   seems to resolve the issue.

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

The topic ‘500 errors?’ is closed to new replies.

 * ![](https://ps.w.org/ti-woocommerce-wishlist/assets/icon-256x256.gif?rev=2469447)
 * [TI WooCommerce Wishlist](https://wordpress.org/plugins/ti-woocommerce-wishlist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ti-woocommerce-wishlist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ti-woocommerce-wishlist/)
 * [Active Topics](https://wordpress.org/support/plugin/ti-woocommerce-wishlist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ti-woocommerce-wishlist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ti-woocommerce-wishlist/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [scmsteve](https://wordpress.org/support/users/scmsteve/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/500-errors-11/#post-15758699)
 * Status: resolved