The "I figured it out" Dept.

Wp-Admin Not Working In WP Today?

Posted by Justin on August 07, 2007
The "I figured it out" Dept. /

I’ve discussed plugin issues before with WordPress, but it looks like this really needs to be pounded in a little more (not to mention I learned something today).

WP-Admin failed for several people today while I was hanging out on the WordPress forums. I originally thought it was a Caching issue with one person and a plugin issue with another. Moral of the story, weird issues: rename the plugins folder first.

Today, it seemed to be the ALink plugin failing for both people. One got a 404 (file not found) and 403 (Forbidden) while another got: “Premature end of script headers: index.php”. Odd - never heard of a 404 with this error.

ANYWHO - perhaps the first thing that should be in anyone’s WP toolbox when they’re trying to problem solve is Firebug. That little booger of a plugin has helped me several times over the last few months both supporting internal and external issues between many sites. I also use Web Developer since it allows me to drill down to very specific things to troubleshoot.

Plugins are getting more and more reliant upon a home site. They may check for updates every time you log into your Admin section, they may check search engines for a digital finger print, they may even automagically update whenever you login(I see this more as a security issue though). My main point is, the more plugins that you install in your WP install, the more likely you are to have problems later on. If you blindly install several plugins, you’re asking for problems. If you take your time, select a few then look at the code of said plugins (which I always do), you’ll see weird things from time to time. I’ve personally seen advertisements (SEO text) inputted via plugins, I’ve seen code to attempt to add Google Adsense without your permission, I’ve even seen some nasty stuff that puts in a web based telnet session script with a password (otherwise known as a backdoor).

Moral of the story: Be careful what you install, where you get it from and watch what it contains before installing. After that, if you have weird issues all the sudden, rename the plugins folder to see what happens.

Oh - last thing. If you ask for help on any public forum and you scream about how no one is helping you, you’ll be ignored further. I don’t even bother with impatient people.

WordPress Blank Page Bug

Posted by Justin on May 13, 2007
Open Source Projects, The "I figured it out" Dept. /

The WordPress Support Forums have been up in arms over a bug that causes blank pages to show up all over the place. After installing the newest version of WP on a second website, I ran into the same bug. Unfortunately, the support forums where of no help, other than a lot of frustrated people. So, I spent about 3 hours (ok, so I goofed off a bit) working on a solution.

Webserver
My own Linux based Virtual Server
PHP 4.x
No caching plugins
no default plugins

Computer
Vista Home Premium (brand new laptop)
IE7 (don’t really use, but this won’t even show the Admin - Login page)
Newest Firefox

What I tried
Re-uploading files
Restarting VPC to clear any cache
Reset the .htaccess to:
order allow,deny
deny from xxxxxxxxxxxxxxxx (Spammer that wouldn't leave me alone.)
allow from all
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

The Fix
Its a plugin causing the problem - plain and simple. Don’t believe me? Rename your plugins folder on the server to something else and try your page again… Renaming the plugins folder back, you’ll see what’ll happen.

In my case, it was a plugin called “Digg That”, which is an upgrade from “Digg This”. Basically the plugin is not compatible with WP 2.1.x

If you can log in (some people have luck hitting “Edit this page”), deactivate your plugins one by one and try your blank page issue in another window each time. It may take a few clicks, but you’ll find it. You may also notice that your pages won’t redirect back to the plugins page, you have to hit back all the time. Refresh between doing this and once you deactivate one and it redirects, you’ve hit pay-dirt.

If you can’t log in, I would suggest that you rename your plugins on the server (maybe change pluginname.php to pluginname.bak) one by one and try it out.

After disabling my crazy plugin, IE works, Firefox now returns redirects properly, etc. Basically, the framework has changed just enough over the last few builds that it’s causing all sorts of problems for people.

IIS & MySQL

Posted by Justin on January 20, 2007
The "I figured it out" Dept. /

If you’re having problems with a PHP application on IIS, look no further…

My Setup: Win 2003 Server, PHP5, MySQL 4.x (MySQL 5 has a few buggy issues I don’t like)

  • Copy your php_mysql.dll & libmysql.dll to c:\windows\system32\ folder.
  • Search your computer for php.ini (the WHOLE computer) and rename all of them except for your PHP root php.ini file (ie: if you installed php in c:\php\ then leave the c:\php\php.ini alone) to php.bak (or delete at your own risk).
  • Now, MOVE that file (cut’n'paste) to the c:\windows\ dir
  • Restart IIS and check it out.

Some directions say to put the php.ini in System32 - that didn’t work for me. This actually can cause Windows to freak out a little and not look at the correct php.ini. Don’t know why, but it happens.

I know thats short and quick, but hey, after a full day of frustration, thats what worked for me.

WordPress 2.0.7 Weirdness

Posted by Justin on January 19, 2007
Open Source Projects, The "I figured it out" Dept. /

If you’ve installed WordPress 2.0.7 and have logged into the Admin panel, you’ve probably noticed a funky bug that baffles the mind.

Once you leave the Dashboard and try to come back via the menu, you get an empty page with a footer. If you take out the admin.php?page=index.php and hit enter, the DashBoard shows back up. Easy fix…

Delete the index.php file out of the Plugin directory.

You shouldn’t allow directory browsing on your server in the first place (if you do, you’re setting yourself and your server up for failure - disable it) and this extra index.php file is causing that blank issue.

MediaWiki::Win 2003 problems

Posted by Justin on January 05, 2007
The "I figured it out" Dept. /

Ever tried to install MediaWiki on Windows 2003 and didn’t get very far? Get all kinds of weird errors and get pretty frustrated, pretty quick? This can happen with IIS or Apache and your situation is probably due to Windows extracting the files wrong.

To check to see if you got bitten by the extraction bug, right click on any PHP file and click Edit or Open With. Open it in Notepad. Now, if it looks all neat and clean, like code should, you’re ok - keep pulling your hair out…

If it is all grouped up and has all kinds of ASCII boxes all over it - you’ve got extraction problems (technically this can cause problems with any program like WordPress or PHPmyAdmin, not just MediaWiki). To fix this, you can do a few things. The easiest fix: Install Winzip instead of using Windows’ Zip Extraction. Re-extract and view the files again - all better now. Your install should go much faster this time.

Now, like I said, this can happen with several programs, but I’ve found that MediaWiki is extremely picky about this situation. While WordPress will work like this, MediaWiki will fail over and over until you extract the files properly.