Diagnosing and Resolving Script Errors
General Recommendations
To optimize server and database performance, it’s important to consider several key factors that can impact query processing speed and overall site efficiency. Here are some steps you can take:
1. Increase Server Capacity:
Upgrade RAM: Increasing the server’s RAM can help process data faster.
Add More CPU Cores: Additional CPU cores can speed up computations and database operations.
2. Check Server Settings:
Eliminate Unnecessary Tasks: Ensure there are no redundant tasks or processes running on the server that could slow it down.
Optimize Configuration: Review server and database settings to ensure they are optimized for efficient operation.
3. Monitor Performance:
Use Monitoring Tools: Utilize specialized tools to monitor system performance, identify bottlenecks, and detect issues.
4. Experiment with Configuration:
Test Resource Adjustments: Experiment with increasing resources (e.g., memory, CPU cores) and evaluate their impact on performance.
5. Backup Data:
Create Regular Backups: Regularly backing up data ensures information security and protects against data loss.
Implementing these steps can help optimize server and database performance, improve system efficiency, and reduce query processing times. If needed, consult experienced system administrators for more precise configuration.
Common Issues and Solutions
Below are some potential errors that may occur when working with scripts, along with methods to resolve them.
Infinite Redirect/Error in Redirect
If you encounter an infinite redirect loop, adjust the server control panel settings (e.g., ISP Manager or similar). Enable the option "Redirect HTTP requests to HTTPS" (example for ISP Manager).

Slow or Failed Request Creation
If requests take too long to create or fail altogether:
Disable the SMTP server in the "Messages -> Email Templates" section if you are using outgoing mail. Then, check the request creation speed.
If the request creation speed improves, switch to one of the recommended SMTP servers.

Currency Selection Table Freezes
To resolve freezing issues when selecting currencies:
Go to the Cloudflare dashboard.
Under "Caching" -> "Configuration," set the caching option to "No query string."

Malformed Exported XML File
If the exported XML file fails validation, it’s often due to empty lines at the beginning of one or more script files.
Locate the root folder of your site (e.g.,
var/www/www-root/data/www/domain_name
) and navigate to it:cd var/www/www-root/data/www/domain_name
Use the following command to find files with empty first lines:
find . -name "*.php" -type f -exec sh -c 'if [ "$(head -n 1 "$1" | tr -d "\n")" = "" ]; then echo "$1: empty first line"; fi' _ {} \;
Open the identified files and remove the empty lines.
Additionally, ensure the first line of the XML file includes encoding and version information (prolog). If missing, re-upload the script files to update them.

Unstable HTTPS Site Performance
Verify the domain is correctly specified as https://your_domain in the "Settings" -> "General" section of the admin panel.
Check the database (
xxxx_options
table) to ensure the domain is also listed as https://your_domain.If using Cloudflare, set the encryption type to Flexible under "SSL/TLS" -> "Overview."
If using a self-signed certificate, select "Full (Encrypts end-to-end, using a self-signed certificate on the server)."
Disable the permanent redirect to HTTPS in the site settings within ISP Manager.

Theme Activation Error
If activating a theme results in an error like Unclosed '{' on line ...
:
Enable the
short_open_tag
option in the PHP configuration file (php.ini
).Access ISP Manager as root, navigate to PHP settings, or manually edit the
php.ini
file.Search for
short
and enable the displayed option.

Site Inaccessible on Certain Devices/Providers
If the site doesn’t load on some devices or networks:
Disable proxying in the Cloudflare dashboard:
Go to "DNS" -> "Records."
Edit the A-record and disable proxying in the "Proxy status" column.
Note: Disabling proxying exposes your server’s real IP address and removes DDoS protection. Only disable proxying as a last resort.

Site Inaccessible in Russia (Disabling ECH)
Roskomnadzor has started blocking Cloudflare due to its use of encrypted SNI headers (Server Name Indication). This technology prevents identifying the site being accessed via HTTPS, leading to blocks.
To disable Encrypted Client Hello (ECH) for your domain on Cloudflare:
Check if ECH is enabled:
Replace example.com with your domain in the following link:
https://dns.google.com/query?name=example.com&type=HTTPS
If the response includes the parameter
ech=
, ECH is enabled.
Follow Cloudflare’s instructions to disable ECH.
Note: Disabling ECH does not guarantee site accessibility but often resolves the issue.

For Free Cloudflare Plans
If you are on a free Cloudflare plan, additional steps may be required to resolve the issue.
Here’s the translation of the provided text into natural, fluent English:
Disabling ECH on the Free Plan is only available via the service API.
You will need the following:
Email — the email address associated with your Cloudflare account.
Global API Key — a key used to authenticate your API requests.
Zone ID — the unique identifier for your zone (domain) in Cloudflare.
Step 1: Global API Key
Go to the Cloudflare dashboard via the following link and copy your Global API Key: https://dash.cloudflare.com/profile/api-tokens


Step 2: Zone ID
Navigate to the management page for your domain in Cloudflare and scroll down. Locate the Zone ID field and copy it.

Disabling ECH via curl (Option 1):
Now that you have your Global API Key and Zone ID, you can disable ECH using curl
.
Install curl
Curl is a tool for sending HTTP requests, which you’ll need to interact with the Cloudflare API.
On Windows:
Download and install curl from the official website.
For CMD:
Press
Win + R
.Type
cmd
and press Enter.Check the version by running the following command:
curl --version
For PowerShell:
Press
Win + R
.Type
cmd
and press Enter.Check the version by running the following command:
curl.exe --version
On Linux/MacOS:
Curl is usually pre-installed. Verify by running:
curl --version
Now that you have your Zone ID and API Key, execute the following command:
Replace
{ZONE_ID}
with your Zone ID from the Cloudflare dashboard.Replace
{ACCOUNT_EMAIL}
with your Cloudflare account email.Replace
{GLOBAL_API_KEY}
with your Global API Key.
For Windows CMD:
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/{ZONE_ID}/settings/ech" ^
-H "X-Auth-Email: {ACCOUNT_EMAIL}" ^
-H "X-Auth-Key: {GLOBAL_API_KEY}" ^
-H "Content-Type: application/json" ^
--data "{\"id\":\"ech\",\"value\":\"off\"}"
For Windows PowerShell:
curl -Method PATCH "https://api.cloudflare.com/client/v4/zones/{ZONE_ID}/settings/ech" `
-Headers @{
"X-Auth-Email" = "{ACCOUNT_EMAIL}";
"X-Auth-Key" = "{GLOBAL_API_KEY}";
"Content-Type" = "application/json"
} `
-Body '{"id":"ech","value":"off"}'
For Linux:
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/{ZONE_ID}/settings/ech" \
-H "X-Auth-Email: {ACCOUNT_EMAIL}" \
-H "X-Auth-Key: {GLOBAL_API_KEY}" \
-H "Content-Type: application/json" \
--data '{"id":"ech","value":"off"}'
If the request is successful, Cloudflare will return a response confirming that ECH has been disabled:
{"result":{"id":"ech","value":"off","modified_on":null,"editable":true},"success":true,"errors":[],"messages":[]}
Disabling ECH via Postman (Option 2):
You can also perform this action using Postman. Postman is a tool for testing APIs that allows you to send requests to a server, receive responses, and analyze them. It supports HTTPS and enables you to create requests with headers, parameters, and body content.
To disable ECH in Postman, create a new request and select the PATCH method. Replace zone_id
in the URL with your Zone ID:
https://api.cloudflare.com/client/v4/zones/zone_id/settings/ech
In the Headers
tab, add the following keys:
X-Auth-Email
— your Cloudflare account email.X-Auth-Key
— your Global API Key.Content-Type
— set the value toapplication/json
.

In the Body tab, select raw and enter the following JSON:
{"id": "ech", "value": "off"}
Then click the Send
button.

If You Have a Paid Cloudflare Plan:
Log in to your Cloudflare account.
Select your site.
Go to the SSL/TLS section.
Open the Edge Certificates tab.
Locate the Encrypted Client Hello (ECH) option.
Simply toggle it to the Off position.

The rest of the document contains troubleshooting steps for various issues, such as missing images, email delivery problems, QR code generation, and more. Let me know if you’d like me to translate those sections as well!
Here’s the translated text in natural English:
Let me know if you need further refinements!
Script Control Panel or Website Freezing/Errors When Creating Requests
If the script's control panel or website is freezing, lagging, or displaying errors during request creation, follow these steps to troubleshoot and resolve the issue:
Session Deletion
To clear old sessions, execute the following commands via SSH:
Navigate to the appropriate directory:
cd /var/www/<your_website_user>/data
Run the command to delete sessions older than 2 days:
find mod-tmp -name "sess_*" -mtime +2 -type f -print0 | xargs -0rn 20 rm -f
This will remove all session files older than 2 days.
Additionally, you can check disk usage by opening another SSH session and running:
df -i
This command will display the disk's inode usage (the number of files). Depending on your server's configuration, clearing sessions may take anywhere from 10 minutes to 5 hours.
Server Configuration Settings
Check the Settings -> Cron section to ensure the settings match the provided instructions. If you’ve modified these settings previously, revert them to their original state.
PHP Configuration
Log in to the ISP Manager control panel as the root user and verify the PHP version used by your website.
PHP Version Check Open the settings for the required PHP version.
PHP Settings Ensure the following parameters are set as shown in the screenshot. If they differ, update them accordingly.
PHP Parameters To fully clear temporary files, run:
find mod-tmp -name "sess_*" -type f -print0 | xargs -0rn 20 rm -f
After completing these steps, temporary files will be removed, and PHP will handle automatic file cleanup.
Increasing Memory Limit
If the script processes large amounts of data, it may require more memory than currently allocated. To increase the memory limit:
Open the
wp-config.php
file for your domain and add the following lines after:define('WP_DEBUG', false);
define('WP_MEMORY_LIMIT', '512M'); define('WP_MAX_MEMORY_LIMIT', '1024M');
Update your server configuration to set:
MEMORY_LIMIT = 512M
Memory Limit
Switching the Geo IP Service
To improve IP-based country detection:
Go to the GEO IP -> IP Detection Settings section.
Change the source to sypexgeo.net.
Set the timeout to 7 seconds and save the changes.
Geo IP Settings
Admin Panel and Server Actions
Disable all modules in the Modules section (make note of their current state beforehand). Check if the website runs faster.
If performance improves, re-enable the modules gradually (3-5 at a time) and identify which module causes the slowdown.
If the module
\wp-content\plugins\premiumbox\moduls\courselogs
exists, consider removing it, as it may heavily impact system performance.
If none of the above steps resolve the issue, contact your hosting provider's technical support team. Request a server load analysis and diagnostic report.
Increasing Maximum File Upload Size
To allow users to upload larger files (e.g., for account or identity verification):
By default, the upload limit is 2 MB. To increase it:
If using ISP Manager, log in as the root user and navigate to PHP Settings.
Select the PHP version used by your website and adjust the Max File Size option.
PHP File Size Settings
Alternatively, edit the
php.ini
file directly and update the following directives:upload_max_filesize = 128M post_max_size = 128M memory_limit = 256M max_execution_time = 300 max_input_time = 300
upload_max_filesize
: Set to a value larger than your backup file size.post_max_size
: Set to a value larger than your backup file size.memory_limit
: Ensure it exceeds your backup file size.max_execution_time
: Set to0
for unlimited execution time.
Restart the server after making these changes.
If you encounter errors after increasing the file size limit, refer to the official PHP documentation for troubleshooting.
Setting the "Under Review" Status
In the settings for all merchant modules, locate the Request Status Handling section. Select Under Review for all options and save the changes.
Merchant Status Settings In the settings for all auto-payout modules, disable payouts for requests with the Under Review status by selecting No for the relevant option.
Auto-Payout Settings
DNS Records for Email Configuration
If you need to troubleshoot email-related issues, refer to this DNS configuration cheat sheet for SPF, DKIM, DMARC, and other email verification records.
Additional Resources
QR Generator Module: Download here
class-form.php for Script Versions:
Version 2.6: Download here
Version 2.5: Download here
Last updated