Skip to content

hyperscale.at

Service-orientation-as-a-Service, SOA, PaaS, IaaS, and Economies of Autoscale

Archive

Category: uncategorized misfits

If you run into an error that says:

This service is not available

Gmail is not available for yesmyown.com. Learn more about Google products you can use with your-google-apps-account@yesmyown.com.

Did you use this product with a different Google Account? Sign out of your current Google Account and then sign in to the account you want.

Step 1

The typical solution is to make sure that Gmail is enabled under the Organization & Users Menu and under the submenu “services” … you can access this screen directly if you are now logged into your Google Apps account by modifying this URL:

https://www.google.com/a/cpanel/yesmyown.com/Organization#Organization/subtab=1

If you decide to make changes here, don’t forget to save them.

Step 2

The typical solution may not solve a niche problem that happens when you add several domain aliases to the primary google apps account and you haven’t clicked through the “yes I set up my MX records” validation process. If you added more than one domain to your account, you may also want to check under Domain Settings -> Domain Names:

https://www.google.com/a/cpanel/yesmyown.com/DomainSettingsDomains

Make sure that you aren’t missing anything in the domain validation process. You may need to set MX records for alias domains that aren’t the primary domain before you can access Gmail.

Once you have validated everything here, go back to the menu from Step one and disable Gmail, save changes, then re-enable it and save again. Don’t forget to re-enable it, because you will lose email if you leave it disabled for more than 30 days.

See Also:
Google’s Troubleshooting tips
Other reasons service may be unavailable in Google Apps

  1. The first step is to get the post ID of the blog post you are viewing. You can get the id of a post by using $post->ID in WordPress. Let’s pretend it’s 3987.
  2. You will also need to know the term ids for categories and tags associated with this blog post

Here is some PHP code you can use in wordpress to get the tags of your post ID.

 $tags = wp_get_post_tags( $post->ID );

Let’s assume the result is one category (264) and one tag (41).

  1. If you are not using WordPress Mu, you can simply select from wp_term_relationships and wp_posts
  2. If you are using WordPress Mu, you will need to specify the tables as wp_MU-BLOG-ID#_term_relationships and wp_MU-BLOG-ID#_posts. Let’s assume we are using WordPress Mu and our blog ID is 1. The tables we are working with are wp_1_term_relationships and wp_1_posts
SELECT p.ID, COUNT(tr.object_id) AS cnt
FROM wp_1_term_relationships AS tr, wp_1_posts AS p
WHERE tr.object_id = p.id
AND tr.term_taxonomy_id IN(264,41)
AND p.id!=3987
AND p.post_status='publish'
GROUP BY tr.object_id ORDER BY cnt DESC, p.post_date_gmt DESC LIMIT 5;

Notice that we have limited our results to the 5 most relevant posts. It is recommended that you limit this query because it can be a difficult query to process if you are running it on a blog that has thousands of posts. You can change LIMIT 5 to LIMIT 25 or so on blogs that are hosting less than 5,000 posts without seeing much of a difference in performance. On larger, more frequently updated blogs or WordPress MU sites which are hosting a lot of blogs on the same server, it is recommended that you cache the results of this query and only use it once an hour or once every time a blog entry has been updated.

update [table_name] set [field_name] =
replace([field_name],'[string_to_find]','[string_to_replace]');

Why is this useful for WordPress?

Well sometimes you want to update a code snippet or something pasted across multiple posts.

First, log in as a site administrator, then go to the blog you want to export from and choose manage -> export, and save your xml file.

Now log into the blog your importing to as a site administrator and choose manage -> import -> WordPress, and load up the xml file.

You probably get an error message like:

The uploaded file exceeds the upload_max_filesize directive in php.ini.

You could edit your php.ini, but I don’t recommend this because it’s the sledgehammer approach. You can probably use a little more finesse by simply editing your .htaccess file (assuming your web server allows .htaccess to override php.ini).

First try this.. edit:

/path/to/your_wordpress_mu_directory/.htaccess

Add these lines to the top (adjust the values how you need to):


php_value  upload_max_filesize  15M
php_value  post_max_size  15M
php_value  memory_limit  48M

If you have over ~1000 posts, you may also need to (temporarily) increase the amount of time php scripts are allowed to run before the web server kills the process. Here’s how you can set the maximum execution time of a php script as well as the http request time to (600 seconds) 10 minutes. Thank you Rosalyn Metz.

php_value max_execution_time 600
php_value max_input_time 600

Now try again. If you get the same problem, you will need to edit your php.ini or get your systems administrator / web hosting provider to do it for you. Some web server configurations don’t allow users to override php.ini with .htaccess.

If you are successful, you will probably get a different error:

This file is too big. Files must be less than 1500 Kb in size.

The good news is that this means you have already configured php to allow WordPress to import your large xml file, but you still need to configure WordPress Mu to allow this. When you install WordPress, MU… it creates a record for each blog setting a variable called “fileupload_maxk” to 1500. This is what is limiting you.

Here’s the SQL code you can use to fix it by changing the variable(s) for every mu blog to a higher number (in this case 15000 bytes, but you can change it to a higher or lower number.)

BE SURE TO PUT IN YOUR DATABASE NAME HERE:

UPDATE `__your_wordpress_mu_database_name_here__`.`wp_sitemeta`
SET `meta_value` = '15000'
WHERE (`wp_sitemeta`.`meta_value` = 1500)
AND (`wp_sitemeta`.`meta_key` like "fileupload_maxk");

When you create new blogs, they will still default to 1500. If you want to change this also, you must edit two files:

/path/to/your_wordpress_mu_directory/wp-includes/wpmu-functions.php

and

/path/to/your_wordpress_mu_directory/wp-admin/includes/mu.php

Just change:

get_site_option( 'fileupload_maxk', 1500 )

to

get_site_option( 'fileupload_maxk', 15000 )

(….. or some number of bytes you want instead of 15000.)

That’s it, you should be able to import wordpress blogs as large as you want now.

This plugin embeds an image in your blog and offers the code for others to copy so they can also easily post the same image on their site. The code also encloses your image in a hyperlink that links back to your blog post.

Installation:

  1. First you must download and install Erik Range’s Syntax Highlighter Plugin.
  2. Download and Unzip the Image Code Generator Plugin from here.
  3. Normal Installation: Upload the “imgcode” into your wp-content/plugins directory then just activate the plugin from your “Plugins” screen of wp-admin. (You’re Done!)
  4. ONLY If you are using WordPress Mu and you want to make this plugin available for ALL BLOGS that you are hosting: Upload the contents of “imgcode” (not the actual directory itself) into wp-content/mu-plugins. (You’re done!)

To use the plugin, put code like this in your new blog posts:

how to use imgcode plugin for wordpress

The plugin will automatically translate code like that into something that looks like this:
[imgcode]http://a162.ac-images.myspacecdn.com/images01/24/l_53b0882d564215ad8726072ac7b3f8d9.jpg[/imgcode]

If you want to include descriptive information about your image (for search engine optimization) just describe your image using alt= like this.