Pages

WordPress error with capabilities.php, classes.php and the_excerpt_reloaded() fatal error

For some reasons, I just recently receive the following errors on one of my blog hosting account. Nothing has changed on the WordPress side. I was wondering what was changed on the hosting side. However, I could not get hold with the hosting company support. I finally found the resolutions.

Here is the error message suddenly appear. It seems to me something went wrong with the wordpress plugin.

Warning: Invalid argument supplied for foreach() in /home/powecha8/public_html/blogontshirt/wp-includes/capabilities.php on line 31

Warning: Invalid argument supplied for foreach() in /home/powecha8/public_html/blogontshirt/wp-includes/classes.php on line 88

I have also got the following error because I used the excerpt_reloaded plugin, which is using the above two php files.
Fatal error: Call to undefined function: the_excerpt_reloaded() in /home/powecha8/public_html/blogontshirt/wp-content/themes/silhouette-3column/home.php on line 20


Problem:
The problem is because the PHP magic_quote was on. I guess the hosting company reset the value and make it default to ON, which should be turned off.

Resolution:
Add the following line to the customized php.ini file under the root of the hosting account.

magic_quotes_runtime=off
magic_quotes_gpc=off


Or

Add the following lines in to the .htaccess file at your root of hosting account.

php_flag_magic_quotes_runtime off
php_flag_quotes_gpc off

Run PHP5 on Apache2.2.x as Module or CGI

This is a notes on how to run PHP5 on Apache 2.2 with either Module or CGI.

Open Apache http.conf file and make the following changes.

The following modification is only required for run PHP as CGI.
1. Find the default directory section
<Directory />
Options FollowSymLinks
AllowOverride None
#Order deny,allow
#Deny from all
Satisfy all
</Directory>


Comment out the following two lines
Order deny,allow
Deny from all

2. Add the following lines for Module or CGI
# RUN PHP as Module

PHPIniDir "D:/php5/"
LoadModule php5_module "D:/php5/php5apache2_2.dll"
AddType text/html .php .php5
AddHandler application/x-httpd-php .php . php5

# RUN PHP as CGI
ScriptAlias /php/ "C:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
<Directory />
Order allow,deny
Allow from all
</Directory>

Apache2.2 + PHP5

The purpose of this post is to run Apache2.2.x + PHP5 on Windows XP.

The goal is be able to run mod_rewrite module and load PHP5 by deafult. Due to the file system. use .htacess is not good idea. So I will be using htaccess.txt for Windows system.


Add the following to the http.conf under Apache 2.2 installation:
LoadModule php5_module "D:/php5/php5apache2_2.dll"

# configure the path to php.ini
#PHPIniDir "D:/php5" <-- This line seem to be unnecessary

AccessFileName htaccess.txt
<files>
order allow,deny
deny from all
</files>


Alias /wwwroot "D:/wwwroot/"
<directory>
Options Indexes MultiViews
AllowOverride FileInfo <--- Can simply set to ALL to allow custom htaccess.txt
Order allow,deny
Allow from all

AddType text/html .php .php5
AddHandler application/x-httpd-php .php . php5
</directory>
===============
Add the following line to htaccess.txt to automatically add trailing slash /

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

Probe Google’s Supplemental Index

Source: http://www.ritacatita.com/seo/truth-about-google-supplemental-index/

Simple Way To Probe Google’s Supplemental Index

You can go to Google search and type in:
site:www.yoursite.com *** -sjpked
replacing ‘yoursite’ with your domain/site to see what pages are indexed in Google’s Supplemental Index.
If you see any important pages there you should chëck your whole linking structure of your site. Are these pages linked properly? Are they orphaned? Are they well positioned in your internal site architecture? If there are obvious interior linking problems with these pages, fix them. It is also a good idea to see what percentage of your pages are in this index.

How To Calculate Your Supplemental Index Ratio
You can get your percentage of Supplemental results by dividing the number of pages in the supplemental index by the total number of pages in the main index.
site:www.yoursite.com *** -sjpked
site:www.yoursite.com
This will give you a good indication of the overall health of your site. If you have too high a ratio or too many pages in the supplemental index you should fix your site’s linking structure and remove duplicate pages. Make sure robots can crawl all of your pages or at least the ones you want them to crawl.
If you do find your site or too many of your pages in Google’s Digital Attic, simply try to íncrease the PageRank of those pages. This is the main remedy supplied by Matt Cutts:
“The approach I’d recommend in that case is to use solid white-hat SEO to get high-quality links (e.g. editorially given by other sites on the basis of merit).”
In other words, raise your PageRank to get those pages out of the supplemental index. This has always been the basic key to getting traffíc from Google. Quality content plus quality links equals quality traffíc from Google.


ANHosting vs BlueHost

Currently they are both the same price and support PHP4, 5 and with good tech support waiting time. However there are difference.

ANHosting.com
  • 50 Simultaneously accesses to MySQL database
  • 20 Domains on the same account ($3/mon to add 10 add-on domains and upto 300GB diskspace)
  • Access to .htaccess
  • default to PHP4/MySQL4.1, can request PHP5/MySQL5 after signup
  • Upgradeable to VPS account through http://www.singlehop.com

BlueHost.com
  • 20 simultaneously accesses to MySQL database
  • unlimited add-on domains
  • Access to PHP.INI and .htaccess
  • Shell access through SSH requires drive license and key confirmation
  • 300 accounts on the same share server (Lower CUP power server)
  • Can upgrade to higher power CPU Server
  • No dedicated/VPS hosting
  • Not guaranteed to PHP5/MySQL5 or PHP4/MySQL4. Will know after

Interesting article on Answer Yahoo

One way is by doing a press release. Below are suggested PR web sites

PR Directories
http://www.press-release-writing.com/...
http://www.brandrepublic.com/directories...
http://www.prweekblackbook.com/...
http://www.online-pr.com/markpr.htm...
http://www.netpreneur.org/resources/prse...

PR Announcements
http://www.pressreleasenetwork.com/index...
http://express-press-release.com/...
http://www.theopenpress.com/index.php?a=...
http://www.publicityinsider.com/prlinks....
http://www.free-press-release.com/...
http://www.prleap.com/
http://www.24-7pressrelease.com/...
http://dir.yahoo.com/business_and_econom...
http://www.prfree.com/
http://www.pr.com/press-releases...
http://i-newswire.com/
http://www.freepress.net/press/release.p...

There are two easy ways to get your link on other sites that you should be using.

#1. Find sites that you want to get links from and then custom write articles for each site and send them to the editors. Include your link in the "credits" at the bottom of the article, of course.

Make the articles interesting and useful to the readers of the sites and you can be sure that most of your articles will get published.

Take some of the articles you have already written and customize them for a niche. It's easier than you think and it does get results.

#2. The second way to get articles (with links) published is to submit the articles to sites that accept articles for distribution.

http://www.ezinearticles.com/
http://www.goarticles.com/
http://www.articleblast.com/
http://www.valuablecontent.com/...

FACTS ON IMPORTANCE OF YOUR LINKS ON OTHER WEB SITES
Link building has changed and this change is more precise in what engines look for. I cannot recommend a specific company. What I can do is provide you with information so you can be sure that whom ever you use provides the best in getting your site linked to other sites

You do not want to join link exchanges or link farms. Websites to house your text link is not easy. You need to do searches by keyword phrases and check out the top sites. their links partners and so on. Then develop a personal email to send to the sites webmaster requesting the placement of your anchor text link. Below is lots of info and details to help you.

Building Link Popularity is one of the most important and critical aspects to obtain high rankings campaign today. The 'off-page' factors such as link popularity, anchor text in incoming links play a major role in your site's ranking in the search engine results pages (SERP).

Search Engines consider your site more important if more links point to your site. Building link popularity improves the popularity of your web pages. The higher the popularity of your website, the higher its importance for search engines and higher it gets ranked in the search engine result pages. Search engines also take into account the popularity of the pages that link to your site and its industry relevance to your own industry. Links from higher popular pages and industry relevant sites give your site a higher value.

Types of Links
There are two types of links you can establish on the web. One way is to trade links (where you give a link from the links Page on your site to the partner sites.) The second method is to establish one way links which can boost you even higher

Page Relevance

Most sites offering links have several categories listed on their sites. Try and get a link from a category that closely matches your own industry. For instance, if you have a site related to hotels, then, on your partner site, a tickets site for example, try and identify a resource directory pertaining to hotels, resorts, reservations, vacation packages, travel, tourism, food and beverages etc. If the concerned site has a directory on hotels, you should request a link in that category, as a link from that page would be relevant to a hotels site, thus getting you more benefits. An algorithm called "Applied Semantics" determines the industry relevance of a page within a site. Applied Semantics algorithm studies various keywords on a web page and tries to determine the industry or business segment of each page. Applied Semantics estimates the industry segments that are relevant to a particular page. If the link to your page is coming from your business specific segment, then you are likely to draw more benefit.

Anchor Text

Anchor Text is the visible hyperlinked text on a web page. Since anchor text is very important, make sure that your most important keywords appear in anchor text from the link pointing to your site. You should try and work with at-least 10-20 keyword and link text options. If you are creating a large number of links using only one standard link text, then the search engines are likely to detect a pattern. It is possible that future algo updates may do away with all repetitive and similar looking links to your site.

Pre-Indexed Pages

Try and find link partners in Search Engines like Google and Yahoo, and check if the links page is already indexed in the search engines. Search Engines frequently re-index the pages in its database. They are likely to detect your link faster on a page already existing in their database as compared to a 'yet-to-be indexed' page. The safest way to check is to copy the prospective link page URL and paste it into Google Search. If the page is indexed, Google would show a result in response to your search, otherwise it would respond with a 'no result found'.

Dynamic Link Pages

You should also watch out for any link pages that are generated dynamically. Chances are that such pages would not get indexed soon enough, which means that a link from such a page would not benefit you. Some dynamic link pages are intentionally generated in such a way so as to prevent them from getting indexed. Some unscrupulous webmasters do this to trick you to prevent any PageRank leaking from their site to yours. Links from such pages therefore do not give you any benefit.

Java Script Link Pages

It is also important to identify pages that are generated through Flash or a Java Script, as Search Engines cannot read flash pages or the links embedded within flash. These are some of the tricks unethical webmasters use. While a site can claim to have placed a link to your web page, in effect they are not giving you any benefit.

Re-Directed Links

A link that is first re-directed to another page within your partner site before pointing to your site is a re-directed link. You should watch out for such links, as search engines do not give weight to re-directed links. It is very unlikely that your site would draw any benefit from a re-directed link.

Frame Sites
Avoid getting links from framed sites as search engines cannot read texts within frames. A link placed on a frame site would not get your site any benefit, as search engines would not be able to recognize such a link.

Directory Depth

It is important to evaluate the depth of the directory of the linking page. Avoid getting links from pages that are embedded in a very deep directory or pages that are more than two directories deep (e.g. www.domain.com/dir1/dir2/dir3/... is not a good link page). Deep directories seldom earn high PR. They are also slow in getting indexed, if at all.
One of the important factors in ranking high in search engine results is link popularity. It is not enough to just have the best website in the world—other sites have to point back to you. The thought is that if your site is good enough for others to link to you, then you must have a great site.

How do I increase link popularity?
Building link popularity is hard work. You've searched endlessly. You've sent every reciprocal link email you can think of. What else can you do? Surprisingly, writing articles on your topic can lead you to a wealth of link popularity.

What are the benefits of writing articles? Think about it. If you write articles, you get to use them on your website and you build your website content. You can also submit your articles to other sites. With both methods you get a lot in return:

You build your content. More is better when it comes to site content.

You promote your website. With more keyword-rich text on more pages, you will increase the number of pages indexed by the search engines.

Other websites link back to your website content. Sites focused on related topics link back to you.
You receive a link back to your website from the site you submitted the article to. Remember to include a link in all guest articles you submit.

You become an authority on your topic. Search engines reward sites with a larger number of inbound links from sites dealing with similar topics.

What do I write articles about?

The saying goes "write about what you know." Sometimes it takes thinking in a creative way to open the door to a new route for link popularity success. Think of what your visitors might be looking for. Why do they come to your site? What can you help them with when they arrive on your website? Answer their questions about your topic. We all search to find information, so give them what they are looking for.

So what are they looking for? That is easy enough to find out. Review your web server logs to see what keywords and phrases your visitors are using when they find your site through the search engines. Run your own searches using those keywords. What kinds of sites are returned in the search engine listings? Pay attention to visitor feedback. Know your visitors. Answer the questions they are asking, or even those questions they do not know yet to ask.

Most importantly, write because you have something to say. If in the process of building your content and inbound links, you benefit your readers with your content, all the better in terms of providing visitor satisfaction. This is the best reason to write, which is the way of the web, to seek out and share information.

Where do you put articles?

On your site. The first and obvious answer is to put them on your site. After all, you have all this knowledge; why not share it with your visitors? You may want to create an Articles page on your site. This will give you a place to put your articles, and any new ones that you write. Make sure to add this new page into your site navigation, and especially to add it to your sitemap page. Add a link to your main articles page on your sitemap, and a link to each new article on your articles page, and you are on your way to having your good content indexed. Make sure your visitors and the search engine robots can find your new pages.

Adding article content not only answers your visitors' questions, it adds to your website. Your visitors will have a richer experience with your site when there is more content. Not only can they buy the widgets you are selling, but they can also learn more about how to select widgets, exciting news from the world of widgets, and so on.

The more pages you add to your website, the better chance the already visiting search engine robots will also pick up your new pages to be indexed. More pages mean more links. Be sure to make an archive of your articles on your website. Always keep your pages in directories close to the root of your site for optimum indexing by the search engine robots.

Submit to the search engines. As always you will want to submit your new pages to the mainstream search engines and directories. In addition, look for specialized, topical directories that deal with your particular subject. There are also many general business directories available.

Submit guest articles. In addition to submitting your articles to the various search engines and directories, think about submitting the articles themselves. Submit your articles to sites that accept guest articles. It may take a little detective work to find some of these locations. You can start small, submitting to lesser-known portals seeking information on your topic. Some sites are focused on one topic; others need articles about all sorts of topics. Get searching and you should be able to come up with a healthy list of sites to submit to. Searching in Google and in categories in Yahoo! and ODP (Open Directory Project/Dmoz) would be helpful.

Once you are featured as a guest writer on a website, you will notice that most sites archive these articles. How many articles can you write? How many articles are archived and linked? How many different search engines indexed those pages? You get the idea.

Always include a bio of the author, article re-print instructions, copyright information and a link back to your website. Add an active link in your link text in your submission or request one for your listing. Be aware of dynamically generated pages—a static URL also increases the chance that the article you have submitted has the optimum chance of indexing by the search engine robots.

What if I don't write?

What if writing is just not your thing? You are in luck, because there are sites out there that have free content and articles available to you. When you add them to your site, you still build the content on your website.

Legitimate links, no spam

The best part is that your new links are all legitimate and not just junk links. You add important information to your site, and that is good for your visitors and good for your image. Naturally, using your keyword phrases in your Title/META tags and the text of your articles as you would in your regularly optimized pages makes sense for good search engine ranking.

Annoying Magic Quotes in PHP on Shared hosting

In some case, the PHP4 configuration on Linux shared hosting will be default "ON" for magic_quotes_gpc. This cause the single and double quote will be escape with backslash (\). It doesn't matter if you do addslashes or not.

So the magic_quotes_gpc has to be turned off. Tried the following in the .htaccess file. Put this file under the web root.


<ifModule mod_php4.c>
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
</ifmodule>


If it doesn't work, them put the following php.ini file in every folders that is root of the script.

magic_quotes_runtime=off
magic_quotes_gpc=off
magic_quotes_sybase=off

MySQL 4.0 Fulltext search

Now FindyPages.com has added the fulltext search features for searching pages. It creates a better search results on page keywords, page description, page name and page url.

However, as far as I can tell that MySQL 4.0 is having some restriction on the fulltext search.

Restrictions

A few restrictions affect MySQL FULLTEXT indices. Some of the default behaviors of these restrictions can be changed in your my.cnf or using the SET command.

  • FULLTEXT indices are NOT supported in InnoDB tables.
  • MySQL requires that you have at least three rows of data in your result set before it will return any results.
  • By default, if a search term appears in more than 50% of the rows then MySQL will not return any results.
  • By default, your search query must be at least four characters long and may not exceed 254 characters.
  • MySQL has a default stopwords file that has a list of common words (i.e., the, that, has) which are not returned in your search. In other words, searching for the will return zero rows.
  • According to MySQL's manual, the argument to AGAINST() must be a constant string. In other words, you cannot search for values returned within the query.

select count(members_pages.pageid) as record_count
from members
inner join members_pages on members.memberid = members_pages.memberid
where members.status_access = 1
and members_pages.status_access = 1
and members_pages.status_viewable_by = 1
and (
MATCH(members_pages.page_name, members_pages.page_keywords, members_pages.page_desc, members_pages.page_url) AGAINST ('" . trim(strtolower(addslashes($keywords))) . "' IN BOOLEAN MODE)
or lower(members_pages.page_url) like '%" . trim(strtolower(addslashes($keywords))) . "%')";

Extend Expired TrendMicro Internet Security license

These instruction will guide you to extend expired TrendMicro Internet Security 2005 License.
  • Stop TrendMicro
  • Go to the folder on C: drive the software is installed.
  • Go to "Internet Security" Folder and rename the following files.pcclient.exe ->
    • pcclient.exe -> pcclient.exe.BK_
    • pc-cillin.ini -> pc-cillin.ini.BK_
    • result.htm.tag -> result.htm.tag.BK_
    • result.htm -> restul.htm.BK_
  • Copy pcclient.exe and pc-cillin.ini from the licensed pc to the new pc.
  • Restart TrendMicro
  • Check if the license is update
  • Click "Update Component" to download the new updates.

"You've opened a new tab" annoyance on IE7

It's annoying to see the following page everytime I open a new tab window on IE7. Even after I check the "Don't show this page again" checkbox, it is still opening a new tab with this annoying "You've opened a new tab" tab.

How do I turn this off to just show my blank home page?

Open the registry by going to Start -> Run -> Type regedit
Look for the following registry
HKEY_CURRENT_USER \Software\Microsoft\Internet Explorer\TabbedBrowsing
TabBrowsing

Right click on the right window and open a new DWORD value.
TabbedBrowsing

Give the name "ShowTabsWelcome", and right click to modify the value. Make sure is shows 0.


Now open a new tab in IE7, the annoying "You've opened a new tab" page is gone!

Annoying Runonce.msn.com start page in IE7

Recently, I did a spyware scan on my laptop, but found few annoying ActiveX Controls running under IE7. So I change the security setting in IE7 to stop most of the ActiveX Controls. However, I restart the IE7 browser and getting the annoying "Customize Your Settings" home page every time. Even I change the default home page to "about:blank", it still starts with the "RoundOnce" page from http://rononce.man.com/runonce2.aspx.


I have no idea what this page does, but I believe that Microsoft is trying to guide the IE7 user to setup their IE7 and download new add-on from an non-Microsoft web sites. That looks weird!

Solutions:
After digging into the registry for IE7 and found a place to turn off the Runonce.msn.com start-up page. Basically, it requires two registry key to do the magic.

Open Regedit and go to the following section.
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
Look for the following two keys.
RunOnceComplete
RunOnceHasShown

if they do not exist. Add them by right click mouse -> New -> DWORD Value as shown in the image below.


Modify the value and set the value to 1 for both DWORD values as the images below.


Restart your IE7 browser. The annoying Runonce page is gone!

Remove unwanted startup program under msconfig

Once a while, there are unwanted startuup items in MSConfig that need to be disabled or removed. For example, the Quick Button service (EabServr).

Open MSConfig, under the StartUp tab, I can see an entry of the EabServr is disabled. I would like to remove it totally from the registry.

If you look at the location of the entry, it says "SOFTWARE/....." It's actually under the registry under the following path.
My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSCOnfig\Startupreg

As seen here.

It's simpliy just right click on the key "eabconfg.cpl", and choose to delete the entry.

MSSQL-PHP-ADODB Issues

MSSQL-PHP-ADODB Issues
  • MSSQL only support FETCH_MODE_ASSOC
  • $rs->EOF cause unlimited loop
  • Only the first select statement in the procedure are returned as query object
  • the rest of query are return as true array
  • You can only fetchRow once
  • text, ntext, image fields can not be local variables
  • index on datetime will not be used if date range is in the query select statement

The following features are not working in the linked server env.
  • @@IDENTITY insert won't return at all
  • SET ROWCOUNT 500 for insert/update/select
  • Need to use SET XACT_ABORT ON to be able to write to the linked server