Dangerous — PHP not parsing
-
Hi all. I run WP 3.1.1 in its own directory with the ComicPress theme v1.4.9.7 on a GoDaddy Linux configuration and PHP 5.
I went to bed last night and everything was fine with my site. No plugins updated, no pages, php or even CSS changed. I woke up this morning, went about my day, and got a call from a reader today telling me my code wasn’t parsing. Anybody could walk right up and pluck the passwords, database and API keys out of the wp-config file if they knew where to look.
I rushed back to the office and sure enough — all code. The index file “this page doesn’t do anything by itself” loaded, but stopped at the wp-header. Every other page displayed as pure code.
I backed up, deleted all index files, .htaccess and wp-config from the site. I rolled back the files on GoDaddy to yesterday, when it still worked, and tried again. Still getting 403 and 404s, so I put the .htaccess file back in.
And back came the PHP. So plainly that’s where the problem is. I tried different versions of it, but nothing doing. Either PHP or broken page returns. Then BAM! I swear, I didn’t do anything I hadn’t done, was only testing the different results, but the front page starts working again, no .htaccess file even in the root. Still no .htaccess file in the wordpress directory.
However, none of the posts or pages (which are all in the wordpress directory) are functioning, owing to the missing .htaccess. And yet…when I restore it, back comes the code.
What happened? I didn’t update anything, so I can’t see an overwrite. I can’t find anything to indicate hacking.
Here’s what’s in the root .HTACCESS. I have to poke around in the backup to see if I nabbed the wordpress directory version as well.
addhandler x-httpd-php-cgi .php4 addhandler x-httpd-php5-cgi .php5 addhandler x-httpd-php5-cgi .php # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
The topic ‘Dangerous — PHP not parsing’ is closed to new replies.