Last Updated on 1 week by Sachin G
If you’re managing websites via cPanel/WHM, you’ve likely run into that irritating “No input file specified” error. It caught me off guard one morning when a client reported that their site was showing this message instead of loading normally. I thought it would be a quick fix—turns out, FastCGI had other plans.
Let me walk you through how I fixed it, and hopefully save you hours of frustration.
What Happened When I Tried to Load a Site with FastCGI
Initially, everything was running fine. After switching the PHP handler to FastCGI for performance reasons, I expected a faster response time and more stable sites. But as soon as I hit refresh—boom:
"No Input File Specified"
I checked another domain on the server—same issue. Clearly, it wasn’t an isolated problem.
Step 1: Diagnosing the FastCGI No Input File Specified Error
Through trial and error, I figured out the real issue was a combination of .htaccess misconfiguration and FastCGI configuration in WHM.
My Experience Using WHM to Check Apache Settings
I logged into WHM and navigated to:
WHM > Service Configuration > Apache Configuration > Global Configuration
Here’s what I did:
- Verified that PHP-FPM wasn’t conflicting with FastCGI.
- Ensured that
fcgi
was selected correctly under PHP handlers.
Turns out, an improper handler was set, resulting in a PHP handler error. Once I adjusted that to use FastCGI with the correct PHP version, half the problem was solved .
Step 2: Fixing File Permissions in cPanel
Next, I checked the actual file permissions through cPanel’s File Manager. Some files had permission levels set to 640
or 660
, which can restrict access when using FastCGI. I changed those to 644
for files and 755
for directories.
Step 3: Editing the .htaccess File
I’ve often seen .htaccess misconfiguration break sites after changes in PHP handlers. Sure enough, this line was present:
Action application/x-httpd-php5 /cgi-sys/php5
This was outdated. After removing that line and letting cPanel regenerate the proper directives, the error vanished!
Points To Remember
- FastCGI is powerful but needs precise configuration.
- File permissions in cPanel and outdated
.htaccess
rules are often the silent culprits.
- Keep your WHM Apache settings consistent with the selected PHP handler.
- Documentation helps, but nothing beats hands-on fixes.
Troubleshooting Checklist for FastCGI Issues in WHM/cPanel
if you’re still facing issues, here’s a handy list:
- Ensure the correct PHP handler is selected (FastCGI)
- Remove outdated PHP entries in
.htaccess
- Fix file and folder permissions (644 for files, 755 for folders)
- Verify PHP-FPM isn’t interfering
- Use WHM’s EasyApache to rebuild configuration if needed
Want to learn more about WHM? Check out all my WHM tutorials
I’m Sachin Gupta — a freelance IT support specialist and founder of techtransit.org. I’m certified in Linux, Ansible, OpenShift (Red Hat), cPanel, and ITIL, with over 15 years of hands-on experience. I create beginner-friendly Linux tutorials, help with Ansible automation, and offer IT support on platforms like Upwork, Freelancer, and PeoplePerHour. Follow Tech Transit for practical tips, hosting guides, and real-world Linux expertise!