No input file specified
When upgrading Anchor CMS to version 0.8, encountering a "No input file specified" error immediately after running the installer is a frustrating stopper. While it is easy to blame .htaccess rules on shared hosting like GoDaddy, the root cause here is almost certainly a mismatch between your deployment structure and how the application expects to serve its entry point.
The error message itself points directly to PHP's require() or include() logic failing to locate the intended file. In modern PHP applications, including frameworks like Laravel, the entry point is typically public/index.php. However, if you are running a legacy CMS or a self-hosted script like Anchor, the expectation might be different depending on how the installer unpacks files.
The Entry Point Mismatch
The core issue usually stems from a missing or incorrectly referenced index.php in your web root. When PHP processes a request, it looks for the file specified in the script directive. If that directive points to public/index.php, but your actual entry point is located at index.php in the document root, or vice versa, you will hit this specific error.
In many Anchor CMS setups, the installer expects the application to be served directly from a folder structure where index.php resides in the web-accessible directory. If you deployed the update and the installer script is looking for public/index.php, but your .htaccess or server configuration is routing everything to index.php at the root level, PHP cannot find the file at the path it was told to load.
Diagnosing the .htaccess Configuration
Your current .htaccess block attempts to force all requests through index.php:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase {base}
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ {index} [L]
</IfModule>
There is a subtle but critical syntax error here. The line RewriteRule ^(.*)$ {index} [L] references {index}. In standard Apache rewrite rules, you must specify the full path or a relative path to the file. Writing just {index} does not resolve to index.php in the context of the document root unless you have previously defined it with RewriteBase, but even then, it is ambiguous and often fails on strict PHP configurations.
It should explicitly point to the script:
RewriteRule ^(.*)$ /public/index.php [L,QSA]
Or, if your application expects files in the root:
RewriteRule ^(.*)$ index.php [L,QSA]
If you are using GoDaddy, ensure that mod_rewrite is enabled. You can verify this by checking the .htaccess file permissions; sometimes shared hosting providers strip write access or disable specific modules for security. If mod_rewrite is disabled, the fallback block you have (<IfModule !mod_rewrite.c>) will trigger, but it only sets a 404 error document rather than routing to the installer script, which exacerbates the confusion.
Verifying the Deployment Structure
Before tweaking .htaccess, verify where your index.php actually lives after the upgrade. Run this command in your terminal:
ls -la public/index.php
ls -la index.php
If only one exists, your rewrite rule must point to that specific location. If the installer script itself is located in a subdirectory (e.g., /install/), your .htaccess might be incorrectly rewriting that request to the main app index.php, preventing the installer from running.
In some cases, upgrading Anchor CMS involves changing the entry point from the root to a public folder for security hardening. If you did not update your .htaccess accordingly, or if you kept the old structure while the new code expects a different one, the "No input file specified" error is the direct result of that structural drift.
The Fix
To resolve this, ensure your .htaccess explicitly references the correct path to your entry script using an absolute path relative to the server root:
RewriteRule ^(.*)$ /index.php [L,QSA]
If you are using a public folder structure common in modern PHP apps:
RewriteRule ^(.*)$ /public/index.php [L,QSA]
Once the path aligns with where PHP is actually looking, the installer will execute correctly. If issues persist, check your php.ini to ensure display_errors is enabled during development so you can see if a different file is missing entirely. For production environments, consider using a dedicated tool like LaravelCompany for deployment scripts that handle entry point validation automatically, ensuring you don't miss structural updates during major version upgrades.