WordPress redirect to install.php Solved

I was setting up WordPress so the admin area was secured by https:. I tried to login but would get a redirect to wp-admin/install.php. The often recommended:

1. Login to phpMyAdmin.
2. Select the database and click on ‘Structure’ tab.
3. Right under the list of table there is a “Check All” link. Click on it to select all tables.
4. From a “With selected:” drop-down menu right next to it, choose “Check table”.

To Repair:

1. Login to phpMyAdmin
2. Choose the affected database. If you only have one database, it should choose it by default so you don’t need to do anything.
3. In the main panel, you should see a list of your database tables. Check the boxes by the tables that need repair.
4. At the bottom of the window just below the list of tables, there is a drop down menu. Choose “Repair Table”

was tried but to no avail.

I checked the wp-config file and found out the table prefix did not match the database’s table prefix. I changed it and everything worked.

What happened was I recently ran a plug-in’s option to rename the table prefix from wp_ to a random one. I believe that wp-config was not changed. I’m not sure why it took so long to rear its ugly head because I have been in the admin area after said incident.

Bookmark and Share
Posted in WordPress | Leave a comment

Flaky MySQL Connection? It may be your Antivirus Program.

Smartlab Software had an interesting problem occur: a client was having MySQL connection problems only on Windows 8 or 8.1. XP, Vista, and Windows 7 were fine. The problem manifested itself by showing the HTML part of a dropdown box.

I verified that Windows 7 worked but in my case, Windows 8.1 also worked. One piece of the puzzle.

After poking around the Internet, a thought was the IP4 vs IP6 connection problem. This affected Windows 7 and 8 so it was unlikely.

The client booted up in safe mode and didn’t have a connection problem. In safe mode, the antivirus was disabled. It turns out the Windows 8.1 computers were brand new and came with a trial version of Kapersky antivirus. After uninstalling it and replacing it with another antivirus program, everything is back to normal.

Bookmark and Share
Posted in PHP | Comments Off

Nice PHP Debugging Trick

I was working on a site that had PHP warnings turned off. The program I was working on showed a blank page. Creating and executing a new file, as shown below, solved the problem (which ended up being a parsing error). Indeed, a very nice php debugging technique.

<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
include("file_with_errors.php");
?>
Bookmark and Share
Posted in PHP | Comments Off

Fixing a WordPress SMTP Problem

I have been grappling with using SMTP in WordPress. For a while, it worked fine using an SMTP plug-in. The problem manifested itself by rejecting emails sent from a WordPress blog. In tracing the problem, debug told me I had a 550 error: recipient email address not found (which is not true). Finally, putting the same email address in “sender email” as in SMTP user name solved the problem.

I believe it is related to SPF (sender policy framework) record used by my host to prevent spamming. That is, the sending email address must be the same as the one that shows up in the ‘from’  email address. SPF prevents someone from putting a bogus email address in the ‘from’. Most major SMTP hosts and email companies use SPF (Google/gmail, yahoo, hotmail…).

Bookmark and Share
Posted in WordPress | Comments Off

How to Refresh a Browser Properly

I thought I knew how to refresh a browser – just hit F5 and you are done.

That is not quite true.

If you want to truly refresh a browser, the cache should be cleared out. The key sequences below will clear out the cache and refresh the screen.

Browser Control Keys
Firefox Ctrl-F5
IE Ctrl-F5
Chrome Shift-F5
Safari Ctrl-Alt-E
Bookmark and Share
Posted in browser | Comments Off

No cache for GoDaddy

Most of the sites Smartlab Software optimizes includes specifying an extended cache time for static files such as images and css. Imagine my surprise when this could not be done on GoDaddy shared hosting. I’m even more surprised because having a long cache time would reduce server load. It took a while to find this out. GoDaddy shared hosting does not support mod_expires.c (Linux) which means the webmaster cannot set an expiration date.  I also could not turn off the Etag (as recommended by Yahoo YSlow). Hopefully, they will change in the future.

Bookmark and Share
Posted in Web Site | Comments Off

Critical WordPress Update

WordPress.org announced a critical update, 3.0.4. You can read about it here. The update fixes a bug in the WordPress HTML sanitation library which is used extensively. The vulnerability is through XSS cross scripting. We recommend updating your WordPress installation immediately.

Bookmark and Share
Posted in WordPress | Comments Off

An Email Marketing Oops

I have probably deleted a lot of valuable emails.
Why?
Not because they are in the spam bucket, but because they look like spam. Like most business owners, I get tens to hundreds of emails a day. (Of course, having forty email accounts doesn’t help). Many of them are spam; many are not. The spam catcher does a decent job as it rarely gives a false positive on emails. But I digress.

In order to filter out more spam, I scan the ‘subject’ line and ‘from’ line of each email. If the subject line looks spammy, out it goes. If I do not recognize the ‘from’, out it goes…and therein lies the problem.

I have had many emails sent by legitimate companies both as initial emails and emails in response to one I sent. BUT, the ‘from’ name is unrecognizable. Most of the time, it is some person’s name. Period. Out it goes.

One innocuous example was I put a hold on a book at our local library. Several days later I received an email with someone’s name on the ‘from’ line who I didn’t recognize. I accidentally clicked on the message and it was from our library. I sent an email back to them explaining what happened and suggested they include the library name in the ‘from’ line. Next time I put a book on hold, the email notice had the library name included on the ‘from’ line.

Oh, if the email looks legitimate, I do check the ‘from’ email address. Knowing this can be spoofed, when I read the content, I check the links, if any. Sometimes the links will indicate one thing but link to an unknown, spam URL.

Bookmark and Share
Posted in Marketing | Comments Off

Internet 2009 Stats

The Internet in 2009 brought us:

Email

  • 90 trillion – The number of emails sent on the Internet in 2009.
  • 247 billion – Average number of email messages per day.
  • 1.4 billion – The number of email users worldwide.
  • 100 million – New email users since the year before.
  • 81% – The percentage of emails that were spam.
  • 92% – Peak spam levels late in the year.
  • 24% – Increase in spam since last year.
  • 200 billion – The number of spam emails per day (assuming 81% are spam).

Websites

  • 234 million – The number of websites as of December 2009.
  • 47 million – Added websites in 2009.

Web servers

  • 13.9% – The growth of Apache websites in 2009.
  • -22.1% – The growth of IIS websites in 2009.
  • 35.0% – The growth of Google GFE websites in 2009.
  • 384.4% – The growth of Nginx websites in 2009.
  • -72.4% – The growth of Lighttpd websites in 2009.

Domain names

  • 81.8 million – .COM domain names at the end of 2009.
  • 12.3 million – .NET domain names at the end of 2009.
  • 7.8 million – .ORG domain names at the end of 2009.
  • 76.3 million – The number of country code top-level domains (e.g. .CN, .UK, .DE, etc.).
  • 187 million – The number of domain names across all top-level domains (October 2009).
  • 8% – The increase in domain names since the year before.

Internet users

  • 1.73 billion – Internet users worldwide (September 2009).
  • 18% – Increase in Internet users since the previous year.
  • 738 million – Internet users in Asia.
  • 418 million – Internet users in Europe.
  • 252 million – Internet users in North America.
  • 179 million – Internet users in Latin America / Caribbean.
  • 67 million – Internet users in Africa.
  • 57 million – Internet users in the Middle East.
  • 21 million – Internet users in Oceania / Australia.

Social media

  • 126 million – The number of blogs on the Internet (as tracked by BlogPulse).
  • 84% – Percent of social network sites with more women than men.
  • 27.3 million – Number of tweets on Twitter per day (November, 2009)
  • 57% – Percentage of Twitter’s user base located in the United States.
  • 350 million – People on Facebook.
  • 50% – Percentage of Facebook users that log in every day.
  • 500,000 – The number of active Facebook applications.

Images

  • 4 billion – Photos hosted by Flickr (October 2009).
  • 2.5 billion – Photos uploaded each month to Facebook.
  • 30 billion – At the current rate, the number of photos uploaded to Facebook per year.

Videos

  • 1 billion – The total number of videos YouTube serves in one day.
  • 12.2 billion – Videos viewed per month on YouTube in the US (November 2009).
  • 924 million – Videos viewed per month on Hulu in the US (November 2009).
  • 182 – The number of online videos the average Internet user watches in a month (USA).
  • 82% – Percentage of Internet users that view videos online (USA).
  • 39.4% – YouTube online video market share (USA).
  • 81.9% – Percentage of embedded videos on blogs that are YouTube videos.

Web browsers

The percent market share of popular web browsers:

Browser Percentage
Internet Explorer 62.7%
Firefox 24.6%
Chrome 4.6%
Safari 4.5%
Opera 2.4%
Other 1.2%

Malicious software

  • 148,000 – New zombie computers created per day (used in botnets for sending spam, etc.)
  • 2.6 million – Amount of malicious code threats at the start of 2009 (viruses, trojans, etc.)
  • 921,143 – The number of new malicious code signatures added by Symantec in Q4 2009.

The statistics were brought to you from pingdom.com

Bookmark and Share
Posted in Internet | Comments Off

Mismatching PHP Source Code and Debugging Messages

I was debugging PHP and the error/warning messages did not concur with the source code. After a bit of sleuthing, I found out that I was stripping out comments when I was publishing the code. Turning off ‘Optimize HTML during publishing’ fixed the problem.

BTW, I was using Expression Web but this tip is applicable to most IDEs.

Bookmark and Share
Posted in PHP | Comments Off