[Troubleshooting & Technical Issues] Common PHP Errors and solutions

[Troubleshooting & Technical Issues] Common PHP Errors & Solutions

Common PHP Errors & Solutions

PHP errors can manifest in various forms when using Link Whisper, from white screens to specific fatal error messages. This comprehensive troubleshooting guide covers the most common PHP errors, their causes, diagnostic techniques, and step-by-step solutions.

Understanding PHP Error Types

PHP errors come in different severity levels, each requiring different approaches.

Error Severity Levels:

Fatal Errors (Most Severe)

What They Are: Critical errors that completely stop PHP script execution

Symptoms:

  • White screen (blank page)
  • "There has been a critical error" message
  • Site completely inaccessible
  • WordPress cannot load

Examples:

  • Memory exhausted
  • Maximum execution time exceeded
  • Class not found
  • Function redeclaration

Warnings (Moderate Severity)

What They Are: Non-fatal errors that don't stop execution but indicate problems

Symptoms:

  • Site still works but may have issues
  • Error messages displayed on screen (if debug mode on)
  • Unexpected behavior

Examples:

  • Missing include file
  • Invalid arguments
  • Deprecated functions

Notices (Low Severity)

What They Are: Minor issues that rarely affect functionality

Symptoms:

  • Site works normally
  • Only visible with debug mode enabled
  • No user impact typically

Examples:

  • Undefined variable
  • Undefined index
  • Deprecated usage

Why PHP Errors Occur:

⚠️ Server limitations: Memory, execution time, resource constraints

⚠️ Plugin conflicts: Two plugins defining same functions

⚠️ PHP version incompatibility: Code using features not available in old PHP

⚠️ Missing dependencies: Required PHP extensions not installed

⚠️ File corruption: Incomplete uploads or disk errors

Common PHP Errors in Link Whisper

Error 1: "Fatal error: Allowed memory size exhausted"

Full Error Message:

PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /wp-content/plugins/link-whisper-premium/...

What It Means:

PHP ran out of allocated memory while processing.

268435456 bytes = 256MB (common default limit)

Link Whisper tried to allocate more memory but couldn't.

Why It Happens:

Large sites: Processing thousands of posts requires significant memory

AI processing: Sending content to AI for analysis is memory-intensive

Initial scan: First-time scanning indexes all content

Low server limits: Shared hosting often limits memory to 256MB

The Solution:

Step 1: Contact Hosting Provider

Email/Ticket Template:

"Hi, I'm getting PHP memory exhausted errors on my WordPress site. Can you please increase the PHP memory limit to 512MB or 1GB? Current limit is 256MB. Thank you!"

Recommended Settings:

  • Small sites (< 500 posts): 512MB
  • Medium sites (500-1,000 posts): 768MB
  • Large sites (1,000-5,000 posts): 1GB (1024MB)
  • Huge sites (5,000+ posts): 2GB (2048MB)

Response Time: Most hosts respond within 1-4 hours

Step 2: Alternative - Increase via wp-config.php

If your host allows, you can increase memory yourself:

How:

  1. Access your site via FTP or File Manager
  1. Navigate to root directory (where wp-config.php is located)
  1. Open wp-config.php for editing
  1. Find the line: /* That's all, stop editing! Happy publishing. */
  1. Above that line, add:
define('WP_MEMORY_LIMIT', '512M');
define('WP_MAX_MEMORY_LIMIT', '512M');
  1. Save the file
  1. Test Link Whisper again

Note: This only works if hosting allows. Many hosts override this setting at server level.

Step 3: Process in Smaller Batches

If memory limits cannot be increased:

For AI Processing:

Process 100-200 posts at a time instead of entire site.

Contact support for batch processing guidance.

For Manual Scans:

Use Automatic Background Scan (see Error 6 below) instead of manual scan.

Verification:

After increasing memory:

  1. Retry the action that caused the error
  1. Monitor for recurrence
  1. If error persists, increase further or contact support

Error 2: "Fatal error: Maximum execution time of XX seconds exceeded"

Full Error Message:

PHP Fatal error: Maximum execution time of 30 seconds exceeded in /wp-content/plugins/link-whisper-premium/...

What It Means:

The PHP script ran longer than the max_execution_time limit.

30 seconds is a common default but insufficient for large operations.

Why It Happens:

Large content processing: Scanning thousands of posts takes time

AI analysis: Sending data to AI and waiting for response

Database operations: Updating many records

Initial scans: First-time processing

The Solution:

Step 1: Contact Hosting Provider

Email/Ticket Template:

"Hi, I'm getting 'maximum execution time exceeded' errors on my WordPress site. Can you please increase the max_execution_time to 600 seconds (10 minutes)? Current limit is 30 seconds. Thank you!"

Recommended Settings:

  • Small sites: 300 seconds (5 minutes)
  • Medium/Large sites: 600 seconds (10 minutes)
  • Very large sites: 1200 seconds (20 minutes) or 0 (unlimited, if allowed)

Step 2: Alternative - Increase via .htaccess

Some servers allow increasing via .htaccess file:

How:

  1. Access site via FTP or File Manager
  1. Navigate to root directory
  1. Open .htaccess for editing (or create if doesn't exist)
  1. Add at the top:
php_value max_execution_time 600
  1. Save the file
  1. Test Link Whisper again

Note: This may not work on all servers (Nginx servers won't use .htaccess).

Step 3: Use Background Processing

For AI Processing:

Link Whisper uses WordPress cron for background processing.

Ensure cron is enabled (see "Background Processing" section below).

For Manual Operations:

Avoid manual "Scan All" on very large sites.

Use automatic background scan instead.


Error 3: "Fatal error: Class 'ClassName' not found"

Full Error Message:

PHP Fatal error: Class 'LinkWhisper\SomeClass' not found in /wp-content/plugins/link-whisper-premium/...

What It Means:

PHP cannot find a required class definition.

This means a file is missing or wasn't loaded properly.

Why It Happens:

Incomplete upload: Plugin upload didn't complete fully

File corruption: Disk error or interrupted transfer

Incorrect extraction: ZIP extraction failed partially

File permissions: Server cannot read necessary files

The Solution:

Step 1: Clean Reinstall

Complete Reinstallation Process:

  1. Deactivate Link Whisper (if possible)
  1. Delete Link Whisper via Plugins page
  1. Download fresh copy from LinkWhisper.com/my-account
  1. Upload and install the fresh ZIP file
  1. Activate

Important: Deleting the plugin does NOT delete your data (settings, link suggestions, reports remain in database).

Step 2: Verify File Integrity

Check File Permissions:

  1. Via FTP, navigate to /wp-content/plugins/link-whisper-premium/
  1. Check folder permissions: Should be 755
  1. Check file permissions: Should be 644

Fix Permissions:

If incorrect:

  1. Right-click folder → File Permissions
  1. Set to 755 (for folders) or 644 (for files)
  1. Apply to all files/subfolders

Step 3: Check Server Disk Space

Low disk space can cause incomplete writes.

How to Check:

  1. Log into hosting control panel
  1. Look for "Disk Usage" or "Storage"
  1. Ensure at least 500MB-1GB free space available

If Low: Delete unnecessary files, backups, or contact host for upgrade.


Error 4: "Fatal error: Cannot redeclare function_name()"

Full Error Message:

PHP Fatal error: Cannot redeclare function_name() (previously declared in /wp-content/plugins/other-plugin/file.php:123) in /wp-content/plugins/link-whisper-premium/file.php on line 456

What It Means:

Two plugins (or plugin and theme) are trying to define a function with the same name.

PHP doesn't allow duplicate function names.

Why It Happens:

Plugin conflict: Two plugins use same function name

Theme conflict: Theme defines function Link Whisper also uses

Namespace collision: Poorly coded plugins not using proper namespaces

The Solution:

Step 1: Identify Conflicting Plugin

Conflict Testing:

  1. Deactivate all plugins except Link Whisper
  1. Test - Does error persist?

If error is gone:

  1. Reactivate plugins one by one
  1. Test after each activation
  1. When error reappears, you've found the culprit

If error persists:

Check for theme conflict (Step 2)

Step 2: Check for Theme Conflict

Switch to Default Theme:

  1. Go to Appearance → Themes
  1. Activate a default WordPress theme (Twenty Twenty-Four, Twenty Twenty-Three)
  1. Test Link Whisper

If error is gone:

Your theme is conflicting.

Contact theme developer with error details.

Step 3: Contact Both Support Teams

Once you've identified the conflicting plugin/theme:

Email Link Whisper Support:

Subject: "Function Conflict with [Plugin/Theme Name]"

Include:

  • Full error message
  • Conflicting plugin/theme name and version
  • Error log excerpt

Email Other Plugin/Theme Support:

Provide same information.

Often, one team can rename their function to resolve conflict.


Error 5: "Parse error: syntax error, unexpected..."

Full Error Message:

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /wp-content/plugins/link-whisper-premium/file.php on line 123

What It Means:

PHP parser encountered code it doesn't understand.

Typically indicates PHP version incompatibility.

Why It Happens:

Old PHP version: Server running PHP 5.6 or 7.0

Modern syntax: Link Whisper uses features from PHP 7.2+

Incompatible code: Old PHP can't parse newer syntax (e.g., type hints, null coalescing)

The Solution:

Step 1: Check Current PHP Version

In WordPress:

  1. Go to Tools → Site Health → Info
  1. Expand "Server" section
  1. Find "PHP version"

Requirement: PHP 7.2 or higher

Recommended: PHP 7.4+ or 8.0+

Step 2: Upgrade PHP Version

In cPanel:

  1. Log into cPanel
  1. Find "Select PHP Version" or "MultiPHP Manager"
  1. Select your domain
  1. Choose PHP 7.4 or 8.0 or 8.1
  1. Click "Apply"

In Other Panels:

Look for "PHP Version", "PHP Settings", or "Server Configuration"

Via Hosting Support:

If you cannot find the setting:

Email: hosting support

Subject: "Request PHP Version Upgrade"

Body: "Please upgrade my account's PHP version to 7.4 or 8.0. Current version is [your version]."

Response Time: Usually within 1-4 hours

Step 3: Test Site After Upgrade

Important: Upgrading PHP can affect other plugins/themes.

Testing:

  1. After upgrade, visit your site
  1. Check frontend loads correctly
  1. Check admin dashboard works
  1. Test other plugins/features

If Issues Arise:

Some old plugins/themes may not support newer PHP.

You may need to:

  • Update those plugins/themes
  • Replace incompatible ones
  • Downgrade PHP temporarily while you fix conflicts (not recommended long-term)

Error 6: "503 Service Unavailable" or "cURL error 28: Operation timed out"

Full Error Messages:

503 Service Unavailable - The server is temporarily unable to service your request

or

cURL error 28: Operation timed out after 30000 milliseconds

What It Means:

Server or security system blocked or timed out a request.

Typically occurs during:

  • AI processing
  • API calls to Link Whisper servers
  • Large scan operations

Why It Happens:

Security plugins blocking: Wordfence, iThemes Security, All In One WP Security

Firewall blocking: Cloudflare, Sucuri

Rate limiting: Server throttling too many requests

Timeout settings: Connection timeout too short

Heavy processing: Manual scan overwhelming server

The Solution:

Solution A: Whitelist Link Whisper in Security Plugins

For Wordfence:

  1. Go to Wordfence → Firewall → All Firewall Options
  1. Scroll to "Whitelisted URLs"
  1. Add: /wp-json/link-whisper/*
  1. Save changes

For iThemes Security:

  1. Go to Security → Settings
  1. Navigate to "Ban Users" section
  1. Ensure Link Whisper's server isn't banned
  1. Add your server IP to whitelist (get IP from hosting provider)

For All In One WP Security:

  1. Go to WP Security → Firewall
  1. Check "Basic Firewall Rules" aren't too strict
  1. Whitelist /wp-json/ endpoints

Solution B: Whitelist in Cloudflare

Step 1: Create Firewall Rule

  1. Log into Cloudflare Dashboard
  1. Select your domain
  1. Go to Security → WAF
  1. Click "Create Firewall Rule"

Step 2: Configure Rule

Name: "Allow Link Whisper API"

When incoming requests match:

  • Field: URI Path
  • Operator: contains
  • Value: wp-json/link-whisper

Then: Choose Allow

Deploy

Alternative - Temporary Pause:

  1. In Cloudflare dashboard → Overview
  1. Click "Pause Cloudflare on Site"
  1. Wait 2-3 minutes
  1. Test Link Whisper (AI processing, scanning)
  1. Unpause Cloudflare
  1. Create firewall rule above to keep it working

Solution C: Use Background Scan (Not Manual Scan)

The Problem:

Manual "Scan All" sends hundreds of requests per second, triggering security blocks.

The Solution:

Enable Automatic Background Scan:

  1. Go to Link Whisper → Settings → General
  1. Find "Automatic Background Scan" option
  1. Enable it
  1. Set scan frequency to every 5 minutes (default)

How Background Scan Works:

Scans 10-20 links every 5 minutes using WordPress cron.

Much slower but:

  • Doesn't trigger security blocks
  • Server-friendly
  • No timeouts
  • Runs automatically

Verification:

After enabling:

  1. Wait 10-15 minutes
  1. Go to Link Whisper → Reports
  1. Check if broken links or orphan posts are being discovered

Note: Full site scan may take hours or days for large sites, but it completes without errors.


Error 7: "Headers already sent" Warning

Full Error Message:

Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/link-whisper-premium/file.php:10) in /wp-includes/pluggable.php on line 1234

What It Means:

Something sent output (text, whitespace, etc.) before WordPress/plugin tried to set HTTP headers.

PHP requires headers to be sent before any output.

Why It Happens:

Whitespace before <?php: Extra spaces/newlines in PHP files

BOM (Byte Order Mark): Invisible character at file start

Echo/print statements: Debugging code left in files

File corruption: Editing files with wrong encoding

The Solution:

Step 1: Identify Source File

The error message tells you exactly where:

output started at /wp-content/plugins/link-whisper-premium/file.php:10

The problem is in file.php at line 10.

Step 2: Check for Whitespace Before <?php

  1. Open the identified file via FTP or File Manager
  1. Look at the very first line
  1. Ensure nothing appears before <?php

Correct:

<?php
// Code starts here

Incorrect:


<?php  // <- Extra line above

or

<?php   // <- Invisible BOM character before this

Step 3: Remove BOM

If file has BOM (invisible character):

Using Notepad++ (Windows):

  1. Open file in Notepad++
  1. Go to Encoding → Encode in UTF-8 without BOM
  1. Save

Using Sublime Text / VS Code:

  1. Open file
  1. Save with Encoding → UTF-8 (not UTF-8 with BOM)

Step 4: Clean Reinstall

If you cannot find the issue:

  1. Delete Link Whisper completely
  1. Download fresh copy from LinkWhisper.com
  1. Upload and activate

Fresh files won't have BOM or whitespace issues.


Dashboard & General Errors

If the Link Whisper dashboard fails to load or displays generic error messages:

Symptom:

  • Dashboard page blank or partially loading
  • "An error occurred" message without details
  • Link Whisper menu appears but clicking causes errors

Diagnostic Steps:

Step 1: Download Support Data Export

  1. Go to Link Whisper → Settings
  1. Scroll to "Support" or "Troubleshooting" section
  1. Click "Download Support Data Export" or "Generate Debug Info"
  1. Save the file

This file contains:

  • System info
  • Conflict logs
  • Recent errors
  • Configuration details

Step 2: Check PHP Error Logs

In cPanel:

  1. cPanel → Errors or Error Log
  1. Look for recent errors mentioning link-whisper

Via WordPress Debug:

  1. Enable WP_DEBUG in wp-config.php (see "Checking Error Logs" section below)
  1. Check /wp-content/debug.log

Look For:

  • Fatal errors
  • Missing files
  • Database errors
  • Permission denied

Step 3: Test for JavaScript Conflicts

Disable JavaScript Minification:

If using optimization plugins (Autoptimize, WP Rocket):

  1. Temporarily disable JavaScript minification/combination
  1. Clear cache
  1. Test Link Whisper dashboard

If It Works:

The optimization plugin was breaking Link Whisper's JavaScript.

Solution:

Exclude Link Whisper files from minification:

  1. In optimization plugin settings
  1. Add to JavaScript exclusion list:
    • link-whisper
    • /wp-content/plugins/link-whisper-premium/

Checking Error Logs

Error logs reveal exact causes of failures.

Method 1: Enable WordPress Debug Mode

Step 1: Edit wp-config.php

  1. Access site via FTP or File Manager
  1. Navigate to root directory
  1. Open wp-config.php for editing

Step 2: Add Debug Code

Find the line:

/* That's all, stop editing! Happy publishing. */

Above that line, add:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

Step 3: Save File

Step 4: Trigger the Error

Perform the action that causes the error.

Step 5: Check Debug Log

  1. Navigate to /wp-content/debug.log
  1. Open the file
  1. Look for recent errors (newest entries at bottom)

Step 6: Disable Debug After

Once you've captured the error:

  1. Change define('WP_DEBUG', true); to define('WP_DEBUG', false);
  1. Save

Why: Debug mode can expose sensitive info and affect performance.

Method 2: Access Server Error Logs

In cPanel:

  1. Log into cPanel
  1. Find "Errors" or "Error Log" icon
  1. Click to view

In Plesk:

  1. Log into Plesk
  1. Domains → [Your Domain] → Logs
  1. Select Error Log

Other Hosts:

Contact support and ask: "Can you provide access to PHP error logs for my account?"

What to Look For in Error Logs:

Fatal Errors:

PHP Fatal error: ...

Memory Issues:

Allowed memory size of XXX bytes exhausted

Timeout Issues:

Maximum execution time of XXX seconds exceeded

Missing Functions/Classes:

Call to undefined function/class

Save or screenshot these errors for support tickets.


PHP Version Compatibility

Link Whisper has strict environment requirements.

Minimum Requirements:

PHP Version: 7.2 or higher

Recommended: PHP 7.4 or 8.0 or 8.1

NOT Supported: PHP 5.6, 7.0, 7.1 (very old)

Platform Requirements:

ONLY Self-Hosted WordPress:

Link Whisper works exclusively on self-hosted WordPress.org sites.

NOT Compatible With:

WordPress.com (hosted platform)

Squarespace

Wix

Shopify

Webflow

Joomla, Drupal, or other CMS

Non-WordPress PHP sites

Why: Link Whisper requires WordPress core functions and database structure.

Checking Your Setup:

Step 1: Verify WordPress Version

  1. Go to Dashboard
  1. Check bottom-right corner for WordPress version
  1. Must be WordPress 5.0 or higher

Step 2: Verify PHP Version

  1. Go to Tools → Site Health → Info
  1. Expand "Server" section
  1. Check "PHP version"

Step 3: Verify Self-Hosted

If your URL is:


Increasing Server Limits

Many errors are resolved by adjusting server configuration.

Recommended Settings for Link Whisper:

PHP Memory Limit: 512MB minimum (1GB for large sites)

Max Execution Time: 300 seconds minimum (600 seconds recommended)

Max Input Vars: 3000 minimum

Post Max Size: 64MB minimum

Upload Max Filesize: 64MB minimum

How to Request Increases:

Step 1: Contact Hosting Support

Open a support ticket with your hosting provider.

Template:

Subject: "Request PHP Limit Increases for WordPress Site"

Body:

"Hi,

I'm experiencing PHP errors on my WordPress site due to resource limitations. Can you please increase the following PHP settings for my account:

- PHP Memory Limit: 512MB (or 1GB if possible)

- Max Execution Time: 600 seconds

- Max Input Vars: 3000

- Post Max Size: 64MB

- Upload Max Filesize: 64MB

Current settings are causing timeouts and memory exhausted errors when using plugins that process large amounts of data.

Thank you!"

Step 2: Wait for Confirmation

Typical response time: 1-4 hours

Host will either:

  • Increase settings and confirm
  • ⚠️ Request upgrade to higher hosting tier
  • Deny (rare, usually means you need better hosting)

Step 3: Verify Changes

After confirmation:

  1. Go to Tools → Site Health → Info → Server
  1. Verify PHP memory limit and other values updated

Step 4: Test Link Whisper

Retry the operation that was failing.


Firewall & Security Plugin Whitelisting

Security systems often block Link Whisper's legitimate API requests.

When Whitelisting Is Needed:

⚠️ 503 errors during AI processing or scanning

⚠️ Timeout errors during API calls

⚠️ Connection refused messages

⚠️ Rate limiting messages in error logs

Endpoints to Whitelist:

WordPress REST API:

/wp-json/link-whisper/*

Link Whisper Domain:

linkwhisper.com
*.linkwhisper.com

Whitelisting in Common Security Plugins:

Full instructions provided in "Plugin Causing Site Errors? Emergency Fix Guide" article.

Summary:

Wordfence: Whitelist /wp-json/link-whisper/* in Rate Limiting settings

iThemes Security: Add server IP to whitelist

Cloudflare: Create firewall rule to allow wp-json/link-whisper

Sucuri: Whitelist Link Whisper in firewall settings


When to Contact Support

Some errors require developer assistance.

Contact Support If:

⚠️ Error persists after trying all solutions above

⚠️ Error logs unclear or contradictory

⚠️ Multiple errors occurring simultaneously

⚠️ Unique error message not covered in this guide

⚠️ Site completely inaccessible and emergency FTP disable didn't help

Information to Include:

Critical Information:

  1. Full error message (copy exactly as it appears)
  1. Error logs (from debug.log or server logs)
  1. Support Data Export (if accessible)
  1. Environment details:
    • PHP version
    • WordPress version
    • Link Whisper version
    • Hosting provider
    • Active plugins list

Helpful Information:

  1. What triggered the error (updating, activating, specific action)
  1. What you've tried (list all troubleshooting steps)
  1. Screenshots or Loom video showing the error
  1. When it started (after update, after activating plugin, etc.)

How to Send:

Subject: "PHP Error - [Brief Description]"

Example: "PHP Error - Memory Exhausted During AI Processing"

Response Time: Usually within 24 hours, often faster for critical errors


Preventing Future PHP Errors

Proactive measures reduce error occurrence.

Best Practices:

Keep PHP Updated: Upgrade to PHP 7.4 or 8.0+

Adequate Server Resources: Ensure 512MB memory minimum

Regular Backups: Use UpdraftPlus or similar (daily recommended)

Test on Staging: Test updates on staging site before production

Monitor Error Logs: Check logs weekly for warnings

Whitelist Preemptively: Whitelist Link Whisper in security plugins from day one

Use Quality Hosting: Invest in VPS or managed WordPress hosting for large sites

Keep Everything Updated: WordPress core, plugins, themes

Recommended Hosting for Large Sites:

VPS Providers:

  • DigitalOcean
  • Linode
  • Vultr

Managed WordPress:

  • WP Engine
  • Kinsta
  • Flywheel

Benefits:

  • Higher resource limits
  • Better performance
  • Fewer timeout/memory errors
  • Expert support

Frequently Asked Questions

Q: Can I use Link Whisper on WordPress.com?

A: No. Link Whisper only works on self-hosted WordPress.org sites. WordPress.com does not allow custom plugins.

Q: Will increasing PHP memory slow down my site?

A: No. Increasing the limit doesn't mean PHP always uses that much memory. It just allows PHP to use more if needed.

Q: How do I know if my hosting is good enough?

A: If you frequently encounter memory or timeout errors even after increases, your hosting may be inadequate for your site size. Consider upgrading.

Q: Can I run Link Whisper on PHP 8.2 or 8.3?

A: Link Whisper is compatible with PHP 8.0 and 8.1. For 8.2 or 8.3, check with support for current compatibility status.

Q: What if my host refuses to increase limits?

A: You may need to upgrade hosting plan or switch hosts. Shared hosting often has hard limits.

Q: Will these errors affect my site visitors?

A: If errors only occur in WordPress admin (dashboard), visitors typically aren't affected. However, fatal errors can crash the entire site.

Q: Should I disable Link Whisper if errors persist?

A: Temporarily disabling helps identify if Link Whisper is the cause. But focus on fixing the root cause (server limits, conflicts) rather than permanently disabling.


Need Help?

For PHP error assistance:

Subject: "PHP Error - [Error Type]"

Include:

  • Full error message
  • Error logs (debug.log or server logs)
  • Support Data Export
  • Environment details (PHP version, hosting, etc.)
  • What you've tried

Response Time: Usually within 24 hours

Most PHP errors are resolvable with proper server configuration!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us