Keep getting logged out of BANS or PHP applications?

Do you keep getting logged out of your BANS (Build a Niche Store) website, your Frog CMS web site, Joomla or other PHP programs? Maybe it logs you out every few minutes or so or just randomly. Or it's not saving your session when you switch from HTTP to HTTPS. Or your sessions are just behaving inconsistently. In any case, you have a problem with your PHP sessions.

Chances are that your web site needs to write data to the /tmp directory and something is interfering with it. You'll need to edit your php.ini file and set session.save_path

In Media Temple (is it MediaTemple?), that crappy web host, the solution is to go to your php.ini file and uncomment the line in there that starts with session.save_path

It'll look something like this

session.save_path = /home/19810/data/tmp

The numbers will be different though.

That should take care of your problem and allow you to use your BANS, Frog, Joomla and other PHP web applications with no session problems.

Labels: , , ,

Posted at 2:20 PM | 0 comments read on

How many adsense ads can you put on a page?

I keep having to look this up, so I'm posting it here.

This is straight from the AdSense Program Policies document:

  • Up to three ad units may be displayed on each page.

  • A maximum of two Google AdSense for search boxes may be placed on a page.

  • Up to three link units may also be placed on each page.

  • Up to three referral units may be displayed on a page, in addition to the ad units, search boxes, and link units specified above.

  • AdSense for search results pages may show only a single ad link unit in addition to the ads Google serves with the search results. No other ads may be displayed on your search results page.

  • No Google ad or Google search box may be displayed in a pop-up, pop-under, or in an email.

  • Elements on a page must not obscure any portion of the ads.

  • No Google ad may be placed on any non-content-based pages.

  • No Google ad may be placed on pages published specifically for the purpose of
  • showing ads, whether or not the page content is relevant.

In other words, you can put A LOT. 3 ad units, 3 link units, 2 search boxes, 3 referral units. Holy macaroni! I don't even know if I can fit that many ads onto this site. I guess I can try :)

You all like ads, don't you?


Posted at 11:27 AM | 1 comments read on

Your template could not be parsed as it is not well-formed - SOLVED!!

If you were trying to install a blogger template or layout from somewhere and maybe you pasted it in or just uploaded it--it doesn't matter. But when you tried to save it, Blogger threw some nasty red error message at you saying something like "Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly..." or whatever. Before you say to Blogger, "Can't parse, eh? How about you KISS MY ARSE?" you can try this simple trick.

I found it from this dood's website:
If you receive the following error message 'Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: The markup in the document preceding the root element must be well-formed.' scroll down the page and click on Revert to Classic Template.

Revert to Classic, as in kick it back old school style. Works like a charm!

Labels: , ,

Posted at 4:00 AM | 3 comments read on

WordPress problem: Fatal error: Allowed memory size of 8388608 bytes exhausted

Can you imagine that?

Everything looks great on your WordPress blog until after you log in and then you get that big 'ol error message "Allowed memory size of 8388608 bytes exhausted" instead of your WordPress dashboard.

Well it's easy to fix.

This is what I found from this guys page:
1. Try looking for php.ini file on the root of your site. Mine was located in public_html folder.
Open up php.ini file with any text editor and change the values for memory_limit. By default you should see memory_limit = 8M. Try changing it to 12M. If it doesn’t work, increase it to 16M or even 24M if 16M doesn’t work.

2. If you can’t find the php.ini file, open up the PHP file that requires more memory, and add a line below just after ini_set(’memory_limit’, ‘12M’);
Same thing. Memory can be increased but do try it with 12M first.

3. Final way is to look for .htaccess in your root, and add a line that looks like below.
php_value memory_limit 12M

If you're using Media Temple, that sucky web hosting service, the php.ini file is at:


All I did was add this to the end of the php.ini file:
memory_limit = 12M

And all is well and happy again.
Posted at 1:02 AM | 0 comments read on