Powered by Blogger.

Monday, March 14, 2011

Fix rss feed WordPress

Fix wordpress rss feed error “Error on line 2: The processing instruction target matching “[xX][mM][lL]” is not allowed.” while you burn wordpress rss feed from http://www.feedburner.com, also fix error “XML or text declaration not at start of entity” in firefox, and fix error “XML declaration not at beginning of document” in opera.

plugin url:  http://wordpress.org/extend/plugins/fix-rss-feed/
download url:   http://downloads.wordpress.org/plugin/fix-rss-feed.zip

install steps:

Upload to your plugins folder, usually wp-content/plugins/ and unzip the file, it will create a wp-content/plugins/fix-rss-feed/ directory.Activate the plugin on the plugin screen.done usage steps:

Into the Dashboard admin-> options -> fix rss feedClick on the “Fix wordpress rss feed error” button, then your feed error will be fixed. If there are any errors after fixed rss feed, you can click “restore fix” button to restore.All fix are completed, you will find your wordpress rss feed no mistake Uninstallation steps:

go into admin->plugins ,disable fix-rss-

feeddone.

Read More

Drupal:Unsupported operand types in ../common.inc on line 1426

If you`re using drupal, you might encounter this error, when upgrading to Drupal 6.16:
Fatal error: Unsupported operand types in path_to_drupal/includes/common.inc on line 1426
It happened to me when I tried to create a node that is unpublished (“Published” checkbox is unchecked) or trying to unpublish a published node.
There various modules that conflict with the 6.16 drupal core common.inc file which is changed in 6.16.
This is a fast fix of core file and it works for me.
Open up the includes/common.inc file, search for:

function url($path = NULL, $options = array()) {
(around line 1418)

Replace this code:

$options += array(
'fragment' => '',
'query' => '',
'absolute' => FALSE,
'alias' => FALSE,
'prefix' => ''
);

with this:

if (!is_array($options)) {
$options = array();
$args = func_get_args();
if (isset($args[1])) $options['query'] = $args[1];
if (isset($args[2])) $options['fragment'] = $args[2];
if (isset($args[3])) $options['absolute'] = $args[3];
}

Search for this line:
function l($text, $path, $options = array()) {

Replace code:
$options += array(
'attributes' => array(),
'html' => FALSE,
);

with:

if (!is_array($options)) {
$options = array();
$args = func_get_args();
if (isset($args[2])) $options['attributes'] = $args[2];
if (isset($args[3])) $options['query'] = $args[3];
if (isset($args[4])) $options['fragment'] = $args[4];
if (isset($args[5])) $options['absolute'] = $args[5];
if (isset($args[6])) $options['html'] = $args[6];
}

Save the common.inc file,

Read More

Install Compiz & Compiz Fusion plugins Ubuntu

sudo apt-get install compiz compizconfig-settings-manager

If you are running Kubuntu then use this command to install the most commonly needed packages.

sudo apt-get install compiz compizconfig-settings-manager compiz-kde compiz-fusion-plugins-main compiz-fusion-plugins-extra emerald librsvg2-common

If you are missing the window decorations, then you most likely need the compiz-kde, or emerald packages.

To run Compiz for the current session, hold Alt, then press F2, then enter the following command, or for better trouble shooting, open up a Terminal window and use the following command.

compiz --replace

To configure Compiz and associated plugins, hold Alt, then press F2, then enter the command, or use any Terminal.

ccsm

If ccsm is not found its installable from the compizconfig-settings-manager package.

Alternatively, for Ubuntu: System -> Preferences -> CompizConfig Settings Manager

And for Kubuntu: KMenu -> Settings -> CompizConfig Settings Manager or KMenu -> Settings -> Advanced Desktop Effects Settings

You can select different themes with the emerald-theme-manager tool. To download the themes for emerald You must first install subversion, then activate the theme repositories.

sudo apt-get install subversionsvn ls https://svn.generation.no/emerald-themes

You can then use the “Fetch GPL’d themes” button of The “emerald-theme-manager” tool.

Information on the 3 window decorators can be found at http://wiki.compiz-fusion.org/Plugins/Decoration

Currently there are 3 choices in what window decorator to use. They work with compiz to give your windows the various borders, and widgets.

For kde one normally uses the command

kde-window-decorator --replace

For Gnome the command

gtk-window-decorator --replace

If you perfer somthing different , the emerald decorator is worth checking out, Use it with.

emerald --replace

Go to System -> Preferences -> Desktop Effects and click ‘Enable Desktop Effects’

Open Konsole (KMenu -> System -> Konsole) and type in these commands:

echo "compiz --replace" > ~/.kde/Autostart/startcompiz.shchmod +x ~/.kde/Autostart/startcompiz.sh

This creates a ‘startcompiz.sh’ script in the ~/.kde/Autostart directory, if you wish you may also want to have the script start up ‘emerald –replace’ or other window decorator for your system, such as in this example.

$ cat ~/.kde/Autostart/startcompiz.shcompiz --replace &emerald --replace &

Information on the 3 window decorators can be found at http://wiki.compiz-fusion.org/Plugins/Decoration

Ubuntu 10.04 : ccsm/compiz config options don’t show any effect and are reset the next time ccsm is started ? go to Preferences, and if gconf is selected as a back-end, then make sure that the checkbox “Enable integration into the desktop environment” is UNCHECKED.

Under Kubuntu, some settings in the Compiz Settings Manager may not be selectable unless you enable the “Flat-File Configuration Backend” Under the CCSM tool -> Preferences -> (Backend drop down menu)

If you ran nvidia-settings, then your xorg.conf lost some info. To fix your compiz window decorations (titlebars) with an nVidia graphics card, run

sudo nvidia-xconfig --add-argb-glx-visuals -d 24

then restart X by logging out and back in again and selecting “Restart X Server” from the login menu.

If you want to stop Compiz and start the old window manager (metacity or kwin), just press Alt+F2 and put in the following for Ubuntu

metacity --replace# Alternate syntax if you receive: 'Window Manager error: Unable to Open X display'# when using the above command. The correct --display= value can be determined by# issuing the 'who' command and noting the values in parenthesis at line-end.metacity --display=:0.0 --replace

Or for Kubuntu

kwin --replace

It may happen that windows of specific programs might fully cover the desktop including the taskbar. This is due to a bug in the “workaround” plugin.

Read More

Drupal’s fatal error for memory size exhausted

Ideally, for a memory issue, you would want to change your php settings to increase php memory allotted. In the case of most hosting providers, you do not have permissions or the ability to change the php.ini file, so here is another option:

1. Log-in to your site via FTP
2. Locate the base install of your Drupal installation – often “www” or “public_html”
3. Open/edit the .htaccess file
4. Insert the following into the .htaccess file: php_value memory_limit 96M
5. Save the file and rewrite the .htaccess file on the server
6. Most memory issues should be resolved

Read More

Optimize and Repair Database Tables

From time to time it is a good idea to do a little housekeeping with your WordPress installation, especially if you’ve been experimenting with and deleting plugins. MySQL databases don’t clean themselves. Optimizing your database is something akin to when you defrag your hard drive or change the oil in your car. It will help to free up disk space and keep your database running smoothly.

Optimizing database tables can be done manually using phpMyAdmin or by using a plugin. I’m of the opinion that if you don’t absolutely require a plugin to do it, then it’s best not to add another. However, if you’re not familiar with phpMyAdmin, then a plugin may be a safer option for you.

WP-Optimize: This is a database cleanup and optimization tool. It allows you to remove post revisions, comments in the spam queue, un-approved comments within few clicks.

WP Database Optimizer: This plugin allows you to optimize your WordPress tables on a schedule. It uses the WordPress Database Class to do the work, and you can set the number of days in between optimizations.

Clean Options: This plugin finds orphaned options and allows for their removal from the wp_options table.

If you’re slightly more adventurous and you want to get a hands-on idea of what’s going on with your database, open up phpMyAdmin.

As shown in the image above, you’ll be able to check all the tables that need to be optimized. Once they are checked, select “optimize table” from the drop down menu. This will take care of all of your tables at once. You should see this kind of success message:

Occasionally you may have a table crash. When this happens, one symptom might be that all of your posts seem to have disappeared, or perhaps all of your drafts. You may even get a message in phpMyAdmin telling you that one of your tables haves crashed. No need to worry. Repairing tables is very easy.

Choose the database that pertains to your WordPress blog. If you have only one it should be automatically selected.

Once the boxes are selected, go to the drop down menu and choose “Repair Table”. You should see a success message when it’s completed.

Occasionally, your database may become so corrupt that you cannot login. This is a time when you might want to enable WordPress’ own ability to optimize the database. WordPress 2.9 and later has automatic database optimization support, which you can enable by adding the following define to your wp-config.php file only when the feature is required:

define('WP_ALLOW_REPAIR', TRUE);

You can find the script it uses at: at {$your_site}/wp-admin/maint/repair.php

Above all else, make sure to backup your database before making major optimization efforts or attempting to repair tables. You may thank yourself later. There are many more ways that you can optimize your WordPress database, but these are a couple of the basics to get you started. Set up a regular schedule for optimization and keep your sites running smoothly!

Read More

Drupal:Can’t connect to local MySQL

You can fix Drupal when you get an error “Can’t connect to local MySQL server through socket” by doing one of the following one at a time or a combination of them:

1 . If you are using the MySQL driver then try:
Open your sites/default/settings.php (or sites/YOUR_SITE/settings.php) and add a line like this:
ini_set(‘mysql.default_socket’, ‘/var/run/mysql/mysql.sock’);

Or if you are using the MySQLi driver then try:
Open your sites/default/settings.php (or sites/YOUR_SITE/settings.php) and add a line like this:
ini_set(‘mysqli.default_socket’, ‘/var/run/mysql/mysql.sock’);

2. Change your database server in your settings.php file from localhost to 127.0.0.1

Read More

5 Ways to Repair a Broken WordPress

WordPress, like any software, has the ability to break and that then can cause a blog owner quite a bit of anxiety. This can be caused by plugins not working properly, file corruption, database problems, or many other things. Even though your data is usually just fine, having a blog down is not what a blog owner wants.

Before trying to fix any issues, make sure to back up your blog! The fixes below should not cause any harm, but it’s always better to have a backup you don’t need than not to have a backup when you need it.

Items to back up:

Your /wp-content/ folderYour blog’s database. Use the wp-backup plugin to make backups easy.

Plugins add a lot of additional features and functionality to a blog but can cause also cause unexpected issues such as admin pages that show nothing but a white screen, slow loading pages, or PHP error messages on public facing pages.

To disable plugins you can go to the plugins screen on the admin side, select all, and then disable them. Once disabled, go back through and ensure the issue is gone. Then, enable the plugins one at a time until you find the one causing the issue.

If for some reason you can’t get to the plugins page, you can FTP into your blog and rename the plugins folder. The next time that you try to load the plugins page in WordPress, it’ll not be able to locate the plugins folder and de-activate all plugins. Renaming the folder back will bring all the plugins back but keep them deactivated. Then, enable the plugins one at a time until you find the one causing the issue.

Once the plugin with the issue is located, you can choose to remove it or check the plugins homepage for updates.

If you’re blog is not loading at all, and you see an error message that says ‘cannot connect to database,’ connect to the site via FTP and check the wp-config.php file to ensure the username, password and database names are correct. If it is, and you’re still having issues, contact your hosting provider to see if there are any database related changes or issues that you should know about.

Most of the WordPress files can be re-installed without causing any issues with the blog. The only directory NOT to touch is /wp-content/.

You can re-install WordPress’ files by logging into WordPress and going to Tools -> Upgrade and selecting the re-install option. WordPress will use the built-in updater to re-install all core files but not touch any theme or plugin files.

If you can’t use the built-in WordPress tool to re-install WordPress, you can upload the files via FTP. Just be sure not to overwrite the /wp-content/ folder as this contains your theme, upload, and plugins folder.  The best solution is to first delete the old files before uploading the new ones.

If your problem doesn’t appear to be with a plugin or the core WordPress files, you can always try to repair the database tables via phpMyAdmin.

Log into the blog’s database via phpMyAdmin, check all the database tables, and select Repair. You can also choose to optimize them as well.

To get access to your blogs phpMyAdmin, contact the hosting provider.

If the blogs issue still exists then it’s time to head over to the WordPress support forums and ask for help or do a search on the error message, or problem, and see if someone else is having the issue. Chances are you aren’t the only one and the solution is just waiting for you to find it.

In my experiences with WordPress, there have been very few big issues. At times a plugin has gone rogue, or comments have disappeared, but a few maintenance items and things have gone back to normal with no loss of posts or comments.

WordPress is a smart blogging platform and most issues can be fixed quickly without any harm to the blog content.

Read More