Frequently Asked Questions

This guide will help you troubleshoot some common issues that you may encounter when using the library.

Problem: The mb_convert_encoding() function is not working

Solution: This problem can occur if the mbstring extension is not enabled on your server. Make sure that the mbstring extension is installed and enabled in your PHP configuration.

Problem: The mysqli_real_escape_string() function is not working

Solution: This problem can occur if the mysqli extension is not enabled on your server. Make sure that the mysqli extension is installed and enabled in your PHP configuration.

Problem: I'm getting a "headers already sent" error when using the library

Solution: This error is usually caused by whitespace or other output being sent before the $protectSite->startFile(); method is called. Make sure that the startFile() method is the first line of code in your PHP file, before any other output is sent.

Problem: My website is not blocking access as expected

Solution: This could be caused by a few different things. Make sure that you have correctly configured the library by modifying the constants defined in the library, such as GEOLOCATION_DATA, GLOBAL_GEOLOCATION_BLACKLIST, GLOBAL_IP_BLACKLIST, and GLOBAL_UA_BLACKLIST. Also, ensure that the endFile() method is called at the end of the HTML output.

Problem: My website is using a lot of memory when using the Zero Site Protector library

Solution: This problem can occur if the library is performing a lot of operations on large amounts of data. To reduce memory usage, try optimizing your code to use less memory-intensive operations, or limiting the amount of data that the library processes at once. Additionally, you can try to increase the amount of memory available to your website by modifying your PHP configuration.

Alternatively, you can try to limit the number of requests to your website, by using a caching mechanism or rate limiting technique, which can help to reduce the load on your server.