May 17, 2011

1and1 and PHP5

While using Wordpress with 1and1, I wanted to enable the use of PHP5 for a plugin. Couple of mistakes on my part was that I named .htaccess incorrectly as ".htacess" in the folder of my site.

Then after getting PHP5 recognized on my site, I had to uninstall the plugin. Reinstall, and then re-enable, then lastly all was well.

From 1and1:

Enabling PHP5
With 1&1 Linux hosting packages you have the choice between PHP 4 and PHP 5. To distinguish a script as PHP 5, simply name the script with the file extension .php5.

While the PHP developers have done their utmost to ensure compatibility, we cannot guarantee that PHP 4 scripts will function 100% correctly under PHP 5.

Please note that in contrast to PHP 4, the default for the variable RegisterGlobals and allow_url_fopen is "off".

By default Apache uses PHP 4 for .php extension. If you don't want to rename all your scripts to .php5 you can do the following:

Create a .htaccess file and place the following line:

AddType x-mapp-php5 .php 

This will tell Apache to use PHP 5 instead of PHP 4 for the extension .php in the directory the .htaccess is placed and all sub-directories under it.

Checking your PHP version
One way to find out what version of PHP is currently being used by one of your sites is to create a PHP page with the phpversion(); function. Save this file as phpVersion.php to the same folder where all of your site files are located. Then access this page in a browser such as http://domain.com/phpVersion.php and view the output.

<?php 
echo "The current PHP version being used is: " . phpversion ( ); 
?> 

May 15, 2011

1and1 Webspace Explorer Error


Looks like 1and1 just recently changed their "1and1 Control Panel" interface. Probably, many were used to using Internet Explorer with "1and1 Webspace Explorer" because it was compatible, before the 1and1 interface change, whereas Google Chrome was not. As of 5/15/11, when attempting to use Webspace Explorer with Internet Explorer 9, commands clicked end up with an error being displayed.

The fix would be to switch to another browser like Google Chrome, which is faster anyway and more secure. You could try Firefox or Opera, but I haven't personally tested those browsers. For me, I will continue to develop in Dreamweaver, test in multiple browsers, and use Google Chrome for any 1and1 Webspace Explorer interactions.

May 13, 2011

DIY $10 GoPro Chest Mount w/Sample Vid :: HD


Quick and simple DIY GoPro chest mount. Can be had for even cheaper if you visit your local plastics store for some scrap lexan.

Time:
10~15 minutes

Tools:
Drill and drill bit

Materials:
1 1/4" thick rectangular piece of polycarbonate lexan (I'm using a scrap piece of aluminum layered plexiglass)
2 lashing straps (bought at walmart - Outdoor Products Lashing Straps)
1 flat gopro mount
1 curvy gopro base attachment

Tips:
From what I've read, sticking some electrical tape between the gopro mount and case may further reduce camera shake. Will try this on my next outting.

Disclaimer: Demonstration purposes only. Please use safety precautions whenever working with power tools. Do it at your own risk.

Apr 5, 2011

Post HTML code in Blogger post


So you've entered in your HTML code to display on a blog post, but Blogger ends up interpreting the HTML code, so your post ends up looking funky. No problem. 

Solution: 


It had been awhile since I had to insert some code into a post, and I did not realize Blogger changed the posting options? Either way, the new posting features look pretty cool. 

Apr 3, 2011

Add a Logo to your Header Text :: CSS :: Wordpress

Edit your header.php with the following:

<div id="header">
 <div id="samplelogo"><a href="<?php echo get_option('home'); ?>/"><img src="http://www.linktoyour/logo.png" alt="" width="60" height="60" />
 </div>
  
 <p id="logo"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></p>
 <p id="strapline"><?php bloginfo('description'); ?></p>
   
</div>

Then edit your style.css
#samplelogo {
 float: left;
 padding-right: 10px;
}

Mar 11, 2011

Fatal error: main() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.:/usr/lib/php') on line 17


Fatal error: main() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.:/usr/lib/php')  on line 17

Not sure what happened, either there was an error while I was updating the blog's header, and wp-blog-header.php was deleted, or something 1and1 was having an issue.

Anyway, the solution is to restore wp-blog-header.php to the root folder of your blog, which can be found in your original wordpress installation zip file.

For example, if I had a blog at imadethisdesign.com/blog, and I received this error, then I would download a copy of WordPress, then unzip it, then copy the wp-blog-header.php to imadethisdesign.com/blog

Also, you can try this solution as well when the above does not work:
http://wordpress.org/support/topic/wp-blog-headerphp-failed-to-open-stream

All should be well.



Feb 16, 2011

Toyota 4runner CEL P0171 and P0120 Fixed

Image from yotatech.com

Disclaimer: This is for demonstration purposes only. Removing and mishandling the MAF Sensor can be a costly mistake. Some of these newer sensors go for a few $100. Proceed at your own risk.

Click here for an Update Oct. 7, 2011

P0171 - Fuel system running lean
P0420 - TPS sensor

Completely clean the MAF sensor *FIXED*!

CEL light went on in our '00 Toyota 4runner a couple days ago. 100K miles and going strong. Using Toyota Techstream Software with a Tactrix cable, 2 codes were read. So I figured if I replace the TPS sensor, clean the MAF, replace spark plugs, and then reset the ECU by unplugging the battery, then all would be fixed. Not exactly.

Even after replacing the TPS sensor and spark plugs, the codes kept popping up. Turns out I only cleaned HALF of the MAF sensor. I only cleaned the orange bulb and wires. What I forgot to clean was the internal wires of the MAF sensor. 

When looking down the long shaft of the MAF sensor, you'll see 2 thin looking wires at the end of the shaft. After cleaning the two hidden MAF sensor wires with CRC/11 oz. Electronic Cleaner and a Q-tip, a chunk of soot was left on the Q-tip.

I switched back the old TPS sensor, and reset the ECU again, and BAM, all was well. The car drove like it was brand new again. I'm very confident that our 4runner will be getting kick butt gas mileage once again.

PS: On another note, I made an error while troubleshooting causing the car's idle to run screwy. I left the radiator cap slightly loose causing the IAC to malfunction resulting in a rough idle. *Face Palm* Once the radiator cap was tightened completely, the car was back to 100%. Thought I'd throw this out there in case others run into the same problem.