Go to a website public page and see the home page
I get a prompt to download a file called “download”
Steps to reproduce
Provide a link to a live example, or an unambiguous set of steps to reproduce
this bug. Include code to reproduce, if relevant.
The downloaded file contains:
* Front to the ClassicPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells ClassicPress to load the theme.
* @package ClassicPress
* Tells ClassicPress to load the ClassicPress theme and output it.
* @var bool
/** Loads the ClassicPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
I had moved 16 sites to a new server and they were all working perfectly. I come back an hour or two later and get this behaviour.
I hadn’t touched them in the meantime, they just all suddenly give me the download prompt instead.
Edit: I just went to a site that has no CMS installed and the download file contains the index.php contents:
// Silence is golden.
So this may be a server problem and not a ClassicPress one.
Looks like apache is misconfigured. It is serving your homepage as
application/x-httpd-php instead of running it and serving
But they were working fine when I moved them. Was able to login, update my plugins etc.
Then they all just went kaput?
Can you use php from command line?
Do you mean in cPanel? This is simply shared hosting.
https://hostwithaussie.com/ is working
did you copy ant user.ini or php.ini files over?
I think I’ve found the problem. I set the PHP version to ea-php72
But that version has gone AWOL from the server since I moved the sites.
I changed to 7.0 on the site with no CMS and the problem went away. So it’s a server issue.
Will have to wait for a reply to my ticket.
Have you tried removing .htaccess?
On the site with no CMS, there is only index.php and .htaccess
All it contains is the PHP version number. So it changed to 7.0 and the error went away.
But on all my other sites .htaccess, user.ini and php.ini are set to 7.2. So it’s looking for a version that’s disappeared. Will just have to wait for the host to put it back.
Thanks for the ideas, I thought I was going nuts - or more nuts than I already am!
A few possibilities to look at:
You may have a completely unrelated issue such as a software WAF that modifies htaccess (WordFence comes to mind). Just take that code out of the htaccess file if it exists.
If you didn’t match PHP versions on the migration, it may have messed up the htaccess file - so expected configurations are not loaded correctly. cPanel will place a configuration file for the PHP version. For example:
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.
AddType application/x-httpd-ea-php70 .php .php7 .phtml
# php -- END cPanel-generated handler, do not edit
- Some hosts, such as HostGator have their own PHP handlers. That handler will completely mess up the PHP configuration, and result in blank pages, and all kinds of other errors. Look for the htaccess file above public_html in root. Specifically comment out any X-Handler applications.
AddHandler application/x-httpd-php54 .php
# AddHandler application/x-httpd-php54 .php
Let me know if any of those may be the issue.
Per above replies it looks like this was the issue.
No the problem was simply that 7.2 went missing after I had moved the sites. They put it, and ones higher, back and everything was working again.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.